Parameterized Constructor . This includes calling the Vehicle's default constructor Accessors and Mutators for each variable This must also take in via parameter the manufacturer's name, number of cylinders, and the owner's name in addition to the load and towing capacity. MAKE SURE THE MUTATORS CHECK FOR VALID VALUES! Create the following methods. 0 equals - This should override the vehicle's equals method return true if all the properties of vehicle and truck are equal toString - This should also override the vehicle's toString method and also return the Vehicle's toString along with the towing and load capacity Write another class Car which is a Vehicle Some of the attributes of Car are Gas Mileage: a nonnegative number of gallons represented by a decimal number Number of passengers: a nonnegative number of passengers represented by a whole number Create the following constructors 0 Default sets everything to default values CSCE 145: Algorithmic Design I ▪ This includes calling the Vehicle's default constructor Parameterized Constructor This must also take in via parameter the manufacturer's name, number of cylinders, and the owner's name in addition to the load and towing capacity. Accessors and Mutators for each variable MAKE SURE THE MUTATORS CHECK FOR VALID VALUES! Create the following methods equals - This should override the vehicle's equals method return true if all the properties of vehicle and car are equal toString - This should also override the vehicle's toString method and also return the Vehicle's toString along with the gas mileage and number of passengers. Task: Write Java classes to represent a vehicle system. First download the tester file FleetOfVehicles java and put it in your project. • DO NOT ALTER THE TESTER! Write a Java class called Vehicle . Some of the attributes are • Manufacturer's name . • Number of Cylinders (must be greater than 0) Owner's name Create the following Constructors Default - sets everything to default values • Parameterized Constructor • Check for valid values. Accessors and Mutators for each variable • MAKE SURE THE MUTATORS CHECK FOR VALID VALUES! 0 Create the following Methods equals takes in another instance of a Vehicle and returns true only if the names and the number of cylinders are equal toString-returns a String that contains the Manufacturer's name, number of cylinders, and the owner's name. Write another Java class Truck which is a Vehicle CSCE 145: Algorithmic Design I Some of the attributes of Truck are • Load capacity: a nonnegative number of tons represented by a decimal number Towing capacity: a nonnegative number of tons represented by a decimal Create the following constructors Default - sets everything to default values • This includes calling the Vehicle's default constructor Parameterized Constructor This must also take in via parameter the manufacturer's name, number of cylinders, and the owner's name in addition to the load and towing capacity. Accessors and Mutators for each variable • MAKE SURE THE MUTATORS CHECK FOR VALID VALUES! Create the following methods equals - This should override the vehicle's equals method return true if all the properties of vehicle and truck are equal

Oh no! Our experts couldn't answer your question.

Don't worry! We won't leave you hanging. Plus, we're giving you back one question for the inconvenience.

Submit your question and receive a step-by-step explanation from our experts in as fast as 30 minutes.
You have no more questions left.
Message from our expert:
Hi and thanks for your question! Unfortunately it looks incomplete. Please resubmit the question with detail. We've credited a question back to your account. Apologies for the inconvenience.
Your Question:
import java.util.Scanner; //A class that keeps a fleet of different types of vehicles public class FleetOfVehicles { //An array of vehicles private Vehicle[] fleet; public static final int MAX_VEHICLES = 100; public FleetOfVehicles() { fleet = new Vehicle[MAX_VEHICLES]; } public Vehicle[] getFleet() { return this.fleet; } //Adds a new vehicle to the first empty spot in the fleet array public void addVehicle(Vehicle aV) { for(int i=0;i
Parameterized Constructor
.
This includes calling the Vehicle's default constructor
Accessors and Mutators for each variable
This must also take in via parameter the manufacturer's name, number of cylinders, and
the owner's name in addition to the load and towing capacity.
MAKE SURE THE MUTATORS CHECK FOR VALID VALUES!
Create the following methods.
0
equals - This should override the vehicle's equals method return true if all the properties of
vehicle and truck are equal
toString - This should also override the vehicle's toString method and also return the Vehicle's
toString along with the towing and load capacity
Write another class Car which is a Vehicle
Some of the attributes of Car are
Gas Mileage: a nonnegative number of gallons represented by a decimal number
Number of passengers: a nonnegative number of passengers represented by a whole number
Create the following constructors
0 Default sets everything to default values
CSCE 145: Algorithmic Design I
▪
This includes calling the Vehicle's default constructor
Parameterized Constructor
This must also take in via parameter the manufacturer's name, number of cylinders, and
the owner's name in addition to the load and towing capacity.
Accessors and Mutators for each variable
MAKE SURE THE MUTATORS CHECK FOR VALID VALUES!
Create the following methods
equals - This should override the vehicle's equals method return true if all the properties of
vehicle and car are equal
toString - This should also override the vehicle's toString method and also return the Vehicle's
toString along with the gas mileage and number of passengers.
Transcribed Image Text:Parameterized Constructor . This includes calling the Vehicle's default constructor Accessors and Mutators for each variable This must also take in via parameter the manufacturer's name, number of cylinders, and the owner's name in addition to the load and towing capacity. MAKE SURE THE MUTATORS CHECK FOR VALID VALUES! Create the following methods. 0 equals - This should override the vehicle's equals method return true if all the properties of vehicle and truck are equal toString - This should also override the vehicle's toString method and also return the Vehicle's toString along with the towing and load capacity Write another class Car which is a Vehicle Some of the attributes of Car are Gas Mileage: a nonnegative number of gallons represented by a decimal number Number of passengers: a nonnegative number of passengers represented by a whole number Create the following constructors 0 Default sets everything to default values CSCE 145: Algorithmic Design I ▪ This includes calling the Vehicle's default constructor Parameterized Constructor This must also take in via parameter the manufacturer's name, number of cylinders, and the owner's name in addition to the load and towing capacity. Accessors and Mutators for each variable MAKE SURE THE MUTATORS CHECK FOR VALID VALUES! Create the following methods equals - This should override the vehicle's equals method return true if all the properties of vehicle and car are equal toString - This should also override the vehicle's toString method and also return the Vehicle's toString along with the gas mileage and number of passengers.
Task: Write Java classes to represent a vehicle system.
First download the tester file FleetOfVehicles java and put it in your project.
• DO NOT ALTER THE TESTER!
Write a Java class called Vehicle
.
Some of the attributes are
• Manufacturer's name
.
• Number of Cylinders (must be greater than 0)
Owner's name
Create the following Constructors
Default - sets everything to default values
• Parameterized Constructor
• Check for valid values.
Accessors and Mutators for each variable
• MAKE SURE THE MUTATORS CHECK FOR VALID VALUES!
0
Create the following Methods
equals takes in another instance of a Vehicle and returns true only if the names and the
number of cylinders are equal
toString-returns a String that contains the Manufacturer's name, number of cylinders, and
the owner's name.
Write another Java class Truck which is a Vehicle
CSCE 145: Algorithmic Design I
Some of the attributes of Truck are
• Load capacity: a nonnegative number of tons represented by a decimal number
Towing capacity: a nonnegative number of tons represented by a decimal
Create the following constructors
Default - sets everything to default values
• This includes calling the Vehicle's default constructor
Parameterized Constructor
This must also take in via parameter the manufacturer's name, number of cylinders, and
the owner's name in addition to the load and towing capacity.
Accessors and Mutators for each variable
• MAKE SURE THE MUTATORS CHECK FOR VALID VALUES!
Create the following methods
equals - This should override the vehicle's equals method return true if all the properties of
vehicle and truck are equal
Transcribed Image Text:Task: Write Java classes to represent a vehicle system. First download the tester file FleetOfVehicles java and put it in your project. • DO NOT ALTER THE TESTER! Write a Java class called Vehicle . Some of the attributes are • Manufacturer's name . • Number of Cylinders (must be greater than 0) Owner's name Create the following Constructors Default - sets everything to default values • Parameterized Constructor • Check for valid values. Accessors and Mutators for each variable • MAKE SURE THE MUTATORS CHECK FOR VALID VALUES! 0 Create the following Methods equals takes in another instance of a Vehicle and returns true only if the names and the number of cylinders are equal toString-returns a String that contains the Manufacturer's name, number of cylinders, and the owner's name. Write another Java class Truck which is a Vehicle CSCE 145: Algorithmic Design I Some of the attributes of Truck are • Load capacity: a nonnegative number of tons represented by a decimal number Towing capacity: a nonnegative number of tons represented by a decimal Create the following constructors Default - sets everything to default values • This includes calling the Vehicle's default constructor Parameterized Constructor This must also take in via parameter the manufacturer's name, number of cylinders, and the owner's name in addition to the load and towing capacity. Accessors and Mutators for each variable • MAKE SURE THE MUTATORS CHECK FOR VALID VALUES! Create the following methods equals - This should override the vehicle's equals method return true if all the properties of vehicle and truck are equal
Knowledge Booster
Class
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781305480537
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage