Professional Documents
Culture Documents
Faculty of Computer Science and Information Technology SSK 3101 (Computer Programming II) Semester I 2010/2011 Lab 1 (Individual) Learning Objective
Faculty of Computer Science and Information Technology SSK 3101 (Computer Programming II) Semester I 2010/2011 Lab 1 (Individual) Learning Objective
Lab 1 (Individual)
Learning Objective:
Construct A Simple Object-Oriented Program (P4)
Instructions:
1. Find solution to each problem and get help from your demonstrator whenever you
encounter any problem.
2. Demonstrate your source program and the output to your demonstrator.
3. Submit UML diagram for each problem after the lab session.
Questions:
Construct a program named TestCar that demonstrates that each methods work.
Calls accelerate() five times and after each call, get the current speed of the car and
display it. Then call brake() five times and display the current speed.