Complete Section 4 Project - Create a new Java project called Inventory. Then create an object class called Product and a driver class called ProductTester. Follow the instructions provided.
Remember your object class will have the following:
Instance field declarations (variables)
Constructors
Setters
Getters
toString method
Once you have the object class created then create a driver class (ProductTester) that will create instances of your products.
Use the Vehicle class as an example of your object class.
Use the Vehicle driver class as an example of your tester class.
If you have completed section 5.2 begin on the 5.2 project which is a continuation of the section 4 project.
NOTE: Strings are always enclosed in "double quotes" while characters are enclosed with 'single quotes'.
Section 5 Lesson 2: Control Statements Vocabulary:
- A post-test loop that executes an unknown number of times until a condition is met, but always executes the first time through the loop.
-
A pre-test loop that uses an iterator to keep track of how many times a loop will execute.
-
A keyword used to skip over the remaining code in a loop and return program control to the beginning of the loop to execute again.
-
A pre-test loop that executes an unknown number of times until a condition is met.
-
A keyword used to terminate a loop from executing before the loop condition is met.
Complete Section 5 Lesson 2: Control Statements slides
Complete work on the Section 5 Lesson 2: Control Statements practice on school loop.
Section 5.2 Coding - show your programs to your instructor for teacher check:
1.
Message Decoder - you must use only one println to print out the decoded message.
4. Anagram - hint sampleString.indexOf( characterX ) will return a -1 if the characterX is NOT found in sampelString. You will need to use a loop to pull out each character in the first word and see if it is in the second word.