Test 2 Study Guide

Post on 15-May-2017

222 views 5 download

Transcript of 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...

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

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?

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

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

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

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?

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?

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

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

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

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?

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 ++ )

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

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

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?

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

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)?

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?

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

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?

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)?

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?

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

Database Processing:

What does ADO stand for?

Active X Data Objects

What does the ADO.NET technology support?

Datasource/datasets data binding

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

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

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

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?

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

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

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

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

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

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

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

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