Answered step by step
Verified Expert Solution
Question
1 Approved Answer
CS1180 Lab 9 Students will learn how to create a user-defined class. Part 1. Create a user-defined class. 1. Follow the UML diagram below to
CS1180 Lab 9 Students will learn how to create a user-defined class. Part 1. Create a user-defined class. 1. Follow the UML diagram below to create a user-defined class, Automobile When implementing the constructors, use the default value of 0 for numeric types and "unknown" for VehicleMake and VehicleModel when not given as a parameter Implement the toString method in a format ofyour choosing, as long as it clearly includes information for all four member variables Make sure to include Javadoc comments for each method of the class. Automobile -vehicleMake: String vehicleModel: String - num - estMPG: double berCylinders: int +Automobile 0 +Automobile (vehicleMake: String, vehicleModel : String) +Automobile (vehicleMake: String, vehicleModel : String, numberCylinders : int, estMPG: double) + setVehicleMake (String vehicleMake) : void + getVehicleMake O: String + setVehicleModel (String vehicleModel) void +getVehicleModel 0: String +setNumberCylinders ( numberCylinders : int): void +getNumberCylinders: int + setEstMPG(estMPG: double) void + getEstMPG ): double +toString0 String
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started