Comp 170

Top Ten Things to Know

Some of this applies to Java, C#, and C++, but not to Python.

1. Be able to distinguish between class and instance

Class is abstract representation or model (class aka type, abstract type, factory for objects). Class has field definitions (or attribute definitions) and operations (or methods) to implement its behaviors.

Instance (aka class instance, variable) is an actual, specific, concrete thing and has specific field values (or attribute values). All instances of a class share the same operations and attribute definitions.

2. Know syntax rules and coding style

Learn the basic picky language syntax rules and use them correctly. Key items: placement of “;” use of case (“ClassSchedule” vs. “classSchedule”); distinguish declarations and executable statements.

Format code readably according to agreed upon style.

3. Use conditional control structures fully and correctly

Construct programs with “if….then”, and “if….then…else”. Understand nesting of control statements and blocks ( “{“ and “}”).

4. Construct loops with control structures

Use “while”, “do”, and “for” control structures to implement algorithms successfully.

Briefly, “Avoid never ending loops, Avoid off-by-one problems”

5. Use the primitive types and operators appropriately

Understand the use and limitations of the primitive types. Know the most useful arithmetic, relational, and logical operators and use them in expressions, with parentheses when necessary.

6. Create good OO encapsulation

Achieve a deep understanding of the proper use of the access modifiers “private”, and “public”. Be able to design well structured classes.

Know when and how to use “static”.

7. Construct class methods and understand them fully

Define and use class methods, including formal parameters and return values. Distinguish between formal parameters (aka parameters) and arguments in the call to a method.

Comprehend scope and lifetime of objects. Understand visibility of objects and how to implement finding the right object at the necessary time. Know how to ask a particular instance of a class to do something. Know how to construct associations between classes.

Understand what is happening is a nested stack of method calls.

8. Use and understand important library container classes and arrays

Be able to declare and use arrays and container classes from the library for lists. Understand how to find things in containers and arrays. Use index variables effectively.

9. Perform simple Input / Output processing

Lean how to do basic input and output statements with an interactive user and with files. Be able to work with Strings.

10. Understand OO Interfaces

Know how to define and use simple Interfaces like for an abstract list.

Application in programming projects:

Synthesize all of the programming techniques discussed to solve problems involving basic classes you have created, and containers for collections of such class instances. The programming logic may involve nested loops, compound conditions, and a combination of loops and decisions. Document your programs. Be able to use basic testing approaches to have obtain confidence in your programs' correctness.

Note: This Top Ten list is intended to be a useful guide to the course and to help you study and review appropriately. It is not a complete list of everything that you may need to know. It is not a complete list of what will be on exams.