Learning Outcome
At the end of this lesson, you will be able to:
- understand encapsulation and constructors
Silent Watching
Review
- review "UML" & "Class Diagrams"
Lesson
- go over "Using OOP", Chapter 9
- Computer Based Problem Solving
- read "Encapsulation" & "Constructors"
Activity
- see how constructors are used in C#
Daily Assignment
- create a program that has a class "Vehicle". All vehicles have the following properties:
- License plate number
- Colour
- # of doors
- Speed (ReadOnly Property)
- Maximum speed (ReadOnly Property)
- they also have 2 "Protected" methods:
- create the Vehicle class that has the above 5 private fields and 2 methods
- then create a stub program (like my bicycles one) that creates 2 vehicles, changes their fields and gives back their state
Object-Orient Analysis & Design
- read over and do the questions asked in Lesson 1 below
- do the Airplane class in code
- once done, then look at Lesson 2 and the answers
Extra
- work on weekly assignment