CSCI 1103 Exercise 1
You will create a single file using Violet for Part 1 and 2 below. Submit the file to your instructor for grading using Blackboard.
Part 1 (4 pts)
Using Violet create a class diagram for a Vehicle class. The Vehicle class has a make, model, and year attributes. (Example: “Subaru”, “Outback”, “2015”). Make sure that you show the visibility of all fields and methods of the class.
Part 2 (12 pts)
Extend the above class diagram for shape by adding three derived classes; Automobile, Pickup, Bus and their attributes:
- Automobile
- fuelType (Example: “gas”, “diesel”, “electric”)
- Pickup
- cargoCapacity (in cubic feet)
- Bus
- passengers (number of passengers the bus can carry)
- fuelType (Example: “gas”, “diesel”, “natural gas”)
Make sure that you show the visibility of all fields and methods of the class.


0 comments