Question
Asked Oct 28, 2019
52 views

Create a subclass of Vehicle called CarCar should have additional attributes of:

make (String)
model (String)
regType (String - values will be either "new" or "renew")
regFee (float)

In addition to the get/set methods for make, model, and regType, include the method calcFee, to calculate the registration fee according to the following conditions:

if regType = renew, then the fee is $36
else if regType = new, then the fee is $58.50

check_circle

Expert Answer

Step 1

Creation of subclass “Car” which is extended from “Vehicle” class:

The "Car" subclass contains "make", "model", "regType" and "regFee" variables.

The "make", "model", and "regType" are the "String" data type and "regFree" is the "float" data type.

Create the "get" and "set" methods for "make", "...

Want to see the full answer?

See Solution

Check out a sample Q&A here.

Want to see this answer and more?

Solutions are written by subject experts who are available 24/7. Questions are typically answered within 1 hour.*

See Solution
*Response times may vary by subject and question.

Related Computer Science Q&A

Find answers to questions asked by student like you
Show more Q&A
add
question_answer

Q: Assign secretID with firstName, a space, and lastName. Ex: If firstName is Barry and lastName is All...

A: To correct the given program code to assign the secretID as firstName,  space, and lastName, as show...

question_answer

Q: An administrator has received a call indicating that some users are having difficulty logging on aft...

A: Domain Controller:Domain controller is a server computer on Microsoft servers.The purpose of domain ...

question_answer

Q: In C++ I need to compose a function that accepts an array of integer values as an argument and retur...

A: Program Instructions:Pass array to the function getSum().Use the reference of the array to get the s...

question_answer

Q: Write a program that uses one loop to process the integers from 300 down to 200, inclusive. The prog...

A: This question ask from a given set inputs how a user should print the count of the numbers with a co...

question_answer

Q: How can we check if a table has minimum redundency?A) There is no way to checkB) See if a table has ...

A: Data redundancy:File replication occurs in the database when one or more copies of file are present ...

question_answer

Q: Python 3.7.4 Open the file hostdata.txt for reading.

A: To open the file hostdata.txt for reading, the statement is: f=open('hostdata.txt','r')The following...

question_answer

Q: Programming Problem 1Write a program that has the user input their height in inches and convert it t...

A: Program Algorithm-STARTStep1: Import the essential packagesStep2: Define a class ConvertStep3: Decla...

question_answer

Q: EXPLAIN ALL STEPS: Determine the output of the following Pep/9 machine language program. The left co...

A: In this question our first duty is to discuss what is pep/9:pep/9:Pep/9 CPU simulator for use with C...

question_answer

Q: Python 3.7.4 Given four files named asiasales2009.txt, europesales2009.txt, africasales2009.txt, and...

A: Statements for creating objects:#for first file asiasales2009.txt for writingasia = open("asiasales2...