Monday, January 13th

 

Complete Section 4: Lesson 2 - Object and Driver Classes slides
Add comments to your code that explains what each line does.
Complete the practice questions and code. Demonstrate the Student, StudentTester, Person and ManagingPeople classes.

Section 4: Lesson 2 - Object and Driver Classes Vocabulary:
- A group of related Java classes.
- Sections of code that are enclosed inside a set of curly braces. {}
- First letter uppercase and the first letter of each internal word capitalized. Example: SavingsAccount
- A named value that does not change.
- First letter lowercase and the first letter of each internal word capitalized. Example: studentFirstName - A class that contains a main method.
- A code statement in a Java class file that includes java code from another package or class.
- A class that defines instances of objects to be used in another class.
- Code that is preceded by //. Comments are used to clarify programming logic. Comments are ignored by the compiler.
- A word that has a special function in the Java language, and cannot be used as names for classes, methods, or variables.
- The library of Java classes available to import into a programmer-created class.
- The outline of an object, including class variables, constructors, and methods.
- A special kind of method that is a template for an object.
- Values that are sent into a method or constructor to be used in a calculation or substituted with values from the class.
- Values, such as numbers, characters, or booleans. References to objects, such as a BankAccount object. - Keywords used to specify the accessibility of a class (or type) and its members. Ex: public, private, protected, default
- A block of code inside a class that is used to change or access information about the class.

Code Blocks format - just like an essay format { }
Programmer Created Classes - no main method - will NOT run, must be called by another class - a Driver class
The Driver (Test) class has a main method and within that main method it calls the methods of the programmer created class.
BOTH files must be in the same package to work!
Accessor/getter and Mutator/setter methods - required so the Driver Class can access the data in the Object Class.
Java Key Words and camelCase
Variable names are short but meaningful in lower camel case.
Constant names are declared in uppercase letters with the final modifier.
Constructors are named the same as the class name.
Methods are verbs named in lower camel case.


 

Homework

Install Eclipse on your home computer if you would like to be able to work on your java at home.

 

What

Objectives for Section 4 Lesson 1
In this lesson, you will learn how to:
• Identify components of Eclipse
• Compile an application
• Test to ensure application is complete
• Write the code for GalToLit.java
• Continue coding until error free compilation and execution is reached
• Modify the program to compute a different number of gallons into its equivalent number of liters

 

Why

Eclipse is an efficient and easy to use a development environment for creating Java programs. It is a well known tool by many Java programmers and is used in many development environments.
Learning Eclipse in this lesson will give you additional skills with tools used in the Java programming space.

 

How

By completing the slides, quiz and practice exercises.