Test 2 Study Guide

37
Object-Oriented Programming (classes): What is a class? A definition of a data type ex:blueprint of house What are the properties of a class? Properties... code,description,price etc...

Transcript of Test 2 Study Guide

Page 1: Test 2 Study Guide

Object-Oriented Programming (classes):

What is a class?

A definition of a data type ex:blueprint of house

What are the properties of a class?

Properties... code,description,price etc...

Page 2: Test 2 Study Guide

variables

What are the methods of a class?

Used to determine properties/variables

What is the difference between Public and Private variables?

Public var can be used outside of the class

Page 3: Test 2 Study Guide

What is the difference between Public and Private methods?

Public methods can be accessed by other classes

What is the difference between Instance and Static variables?

A static variable is shared by all instances

What is a constructor and what could it be used for?

Page 4: Test 2 Study Guide

A method used to create objects with properties

Can a constructor be overloaded?

Yes

What are the rules in naming a constructor?

Should be same name as class

Page 5: Test 2 Study Guide

What is a destructor?

Destructors are used to destruct instances of classes.

What is an object?

A self contained unit that consists of members, ex properties,methods

What does instantiate mean?The creation of an object

Page 6: Test 2 Study Guide

What does encapsulation mean?

How data is passed down to other classes

What does polymorphism mean and what are some examples of it in object-oriented programming?

An object that can be modified to take any shape

Page 7: Test 2 Study Guide

What is method overloading?

Sending different data types to the same method

What is method overriding?

Sending the same type of data from different methods

Which class is referred to as the base class in inheritance?

Page 8: Test 2 Study Guide

The parent class, superclass

Which class is referred to as the derived class in inheritance?

The child class, subclass

What is an abstract class?

Can be inherited by other classes but can't create objects

What is an interface class?

Page 9: Test 2 Study Guide

Indicates what members must be defined by any class that implemets the interface

What is a delegate?

A special type of object that wires an event to a method

What is an event?

A signal that notifies other

Page 10: Test 2 Study Guide

objects that something noteworthy has happened

List Boxes and Loops:

Can the list items be added to list and combo boxes at design-time and run-time?ya

The list items in a list box or

Page 11: Test 2 Study Guide

combo box is a collections object (true).

True?

What are some properties and methods that allow us to manage the lists at run-time?

Properties :item count, selected index Methods: add, remove, clear

What does the Sorted property

Page 12: Test 2 Study Guide

of list boxes do?

Sorts the list items alphabetically

What are the main differences between the while and do-while loops?

While – pretested loop, do while- posttested

What is meant by nested loops?

Page 13: Test 2 Study Guide

Yo dawg, I heard you like loops so we put a loop in your loop

What causes an infinite loop?

Ratards that make loops with no exit

In the statement for (number = 0; number < 10; number ++ )

Page 14: Test 2 Study Guide

What is the initial value?

0

What is the Boolean condition?

While the number is less than 10, continue loop

What is the update action?

Increase the number by 1

Page 15: Test 2 Study Guide

Is the for loop more like a while or do-while loop and why?

It compares to the pretest while loop

File Processing:

What is meant by File I/O?

File input/output

Page 16: Test 2 Study Guide

What does reading a file mean?

To read the data of a file, ie open/load

What does writing to a file mean?

Writing data to a file, ie Save

What is the external filename?

Page 17: Test 2 Study Guide

The filename on the computer ie coffee.txt

What is the internal filename?

The name of the file in the compiler

What is the difference between the Write and Writeline methods?

Writeline adds data to a new line

Page 18: Test 2 Study Guide

How is a file opened?

streamreader

Why should a file be closed after processing it?

Other users can be locked out if still open, housekeeping

Why is it important for a programmer to check for End of File (EOF)?

Page 19: Test 2 Study Guide

So they don't use readline/writeline in the wrong spot

What command can be used to checked for EOF?

A loopy loop

What type of loop is best to process an input file that may be empty?

Page 20: Test 2 Study Guide

A pretest loop, while

What is meant by sequential file processing?

Files processed in a certain sequence

Arrays:

The array declaration of string[] strName = new

Page 21: Test 2 Study Guide

string[5]; declares how many variables of type string?

5What should be the first valid subscript value for the above array?

0

What should be the last valid subscript value for the above array?

Page 22: Test 2 Study Guide

4

What subscript values would be out of range?

5+

An array is a collection of variables of (different or the same) data type?

Same datatype

What is stored in GetUpperBound(0)?

Page 23: Test 2 Study Guide

Last valid subscript value

Why must we count how many elements are loaded into an array?

To determine if the array is full

Can a single array element be passed through a method's argument?

Page 24: Test 2 Study Guide

no

How many subscripts would be required to reference a single array element in a two- and three-dimensional array?

1

How many dimensions can be defined for an array?

32 dimensions , but more than 3 is rare

Page 25: Test 2 Study Guide

Database Processing:

What does ADO stand for?

Active X Data Objects

What does the ADO.NET technology support?

Datasource/datasets data binding

Page 26: Test 2 Study Guide

What is usually stored in database file?

Data...

What does an ADO.NET connection do?

Establishes connection to data source

What does an ADO.NET data

Page 27: Test 2 Study Guide

adapter do?

Handles retrieving and updating the data and creates the dataset

What does an ADO.NET dataset do?

Bind columns in the dataset to controls

What does it mean that in ADO.NET datasets are

Page 28: Test 2 Study Guide

disconnected?

It lost the connection to the datasource

Does an ADO.NET data adapter allow for retrieving and updating of data?

yes

What does data binding mean?

To connect data elements to a

Page 29: Test 2 Study Guide

control (txtbox)

What is simple data binding?

Connecting one data element to a control

What is complex data binding?

Connecting more than one data elements to a control

What does SQL stand for?

Page 30: Test 2 Study Guide

Structured query language

Why does knowing SQL make a programmer more versatile?Its a basic structure comon in all DBMS

What SQL statement is used to retrieve data from a database?

Select

Which SQL clause is added to

Page 31: Test 2 Study Guide

the Select statement to create query with selection criteria?

From

Additional Control Objects - MDI, ToolStrip, and Dates:

What are single document interface (SDI) projects?

Each form is in a seperate

Page 32: Test 2 Study Guide

window and runs independently

What are multiple document interface (MDI) projects?

Multiple Forms in the same window

In MDI, what is the difference between parent and child forms?

Parent form is the main

Page 33: Test 2 Study Guide

window that contains the child forms

Which property is set to make a form a parent form?

IsMdiContainer

How are child forms created?

MdiParent property

Which property is set on a menu to allow users to manage

Page 34: Test 2 Study Guide

the child forms?

MdiParent

What are the layout options for child forms (LayoutMdi)?

Tile vertical/horizontal, cascade windows

How much code does it take to implement the layout options?

Not a lot

Page 35: Test 2 Study Guide

Does each button on the toolStrip have its own click event or is it one for the entire toolStrip?

Each button has its own click event

How does the DateTimePicker control appear to the user on a form?

A drop down list

Page 36: Test 2 Study Guide

In which property is the selected date stored in for DateTimePicker?

Value property

How does the MonthCalendar control appear to the user on a form?

As a selectable calendar

In which properties are the

Page 37: Test 2 Study Guide

selected dates stored in for MonthCalendar? SelectionRange.Start/End