| |
Objects and Classes - Elementary Concept
(ii) Values and types
(iii) Conditionals and non-nested loops
Class as the Basis of all Computation
Objects encapsulate state and behavior – numerous examples; member variables; attributes or features.Variables define state; member functions; Operations/methods/ messages/ functions define behavior. Classes as abstractions for sets of objects; class as an object factory; concept of type, primitive data types, composite data types.Variable declarations for both types; difference between the two types. Objects as instances of a class. Modeling by composition.
Constructors
Default constructor, constructors with arguments, default initialization. Overloading constructors.
Functions
Function as a way to define operations/methods/ messages; pure functions return values and do not change state; impure functions may return values but also change state, return types arguments to functions, function prototype and function signature, overloading. Variables of class type as references to an object, invocation of functions on objects through the reference, the concept of this. Argument passing in functions, pass by value, what happens when a reference is passed - side effects.
Class as a User Defined Type
Class as a composite type, distinction between primitive type and composite or class types.
Decision Making
Application of if-then, if-then-else, switch (default, break).
Iterations.
Utilization of loops. Fixed number of iterations. The for loop, Unknown number of iterations - while loop, do-while loop, (for loop can also be used but should be used mainly when number of iterations are fixed), continue, break. Nested loops.
Using Library Classes
Simple input, output. String, static variables and static methods, packages and import statements.
Encapsulation
Private, public, scope and visibility rules. ; packages and package level access.
Arrays
Arrays and their usage; sorting algorithms - selection sort and bubble sort; Search in sorted arrays. The class
Object - compatible with all class types.
Operations on Files
Streams - byte and character streams, files and operations on files, tokens and String Tokenizer and Stream Tokenizer classes. Important: The teachers may write classes for I/O and give them to the students to use. The students may need Operations on Files for their projects. However no questions shall be asked in the theory paper from Operations on Files.

|
|