Week of February 21

Topics for this week: Classes and Objects

Activity checklist
  Read chapter 8 in your course packet.
  Review the slides Classes and Objects
  Review the Box class program. The complete program is here
  Complete lab #14. It is due by 11:59pm on Tuesday.
  Complete lab #15. It is due by 11:59pm on Thursday.
  Complete project #5 and submit it to Canvas before 11:59pm Sunday night. Late programs will lose 20% of the possible points for each day that they are late. If you turn this program in prior to 11:59pm Saturday night, you will receive a 5 point bonus, if it meets all of the specifications and gives the correct answers.

It is expected that you will meet the objectives outlined here by the end of the week. You might want to test yourself to see how well you fare. You can be guaranteed that you will be tested on these concepts on your next exam. By the end of this unit, you should be able to:

Reading assignment
  1. Chapter 8 of the course packet will show you how to create and use classes in your own programs.
Important Concepts
Be sure that you understand the following important ideas presented in this unit.
  1. A class embodies the data members of the class and the methods used to operate on that data.
  2. Getter methods return something from the object. They do not change any data inside of the object.
  3. Setter methods do not return a value, but they do take a parameter. The parameter is used to chnage some data insde of the obejct.
  4. Constructors are used to initialize an object when it is created.
  5. Messages are sent to objects by using the name of the object, followed by a dot, and then name of the method to be executed.
  6. A static data member is shared by all instances of a class.

Lab Assignment
This week you should complete labs #14 and 15. Lab #14 will help you understand how to use domain objects in your programs. Lab #15 gives you some additional practice.

Project #5
This week you should complete project #5. In this project you will write the code for a sales invoice class and test it in a GUI application.