Answers
Hi, Since you have provided a question with 10 subparts, I am providing answer to first 4 subparts. For further subparts please ask seperately. Also if you find any difficulty in understanding any part of the code, feel free to comment.
Chassis.java
public interface Chassis { public final String chassis = "Chassis"; public Chassis getChassisType(); public void setChassisType(String vehicleChassis); }
Engine.java
import java.util.Date; public interface Engine { void setEngineCylinders(int engineCylinders); void setEngineManufacturedDate(Date date); void etEngineManufacturer(String manufacturer); void setEngineMake(String engineMake); void setEngineModel(String engineModel); void setDriveTrain(String driveTrain); void setEngineType(String fuel); }
VehicleChassis.java
public class VehicleChassis implements Chassis{ String chassisName; public VehicleChassis() { this.chassisName = chassis; } public VehicleChassis(String chassisName) { this.chassisName = chassisName; } @Override public Chassis getChassisType() { return new VehicleChassis(); } @Override public void setChassisType(String vehicleChassis) { chassisName = vehicleChassis; } @Override public String toString() { return "Chassis Name : " + chassisName; } public static void main(String[] args){ VehicleChassis vehicleChassis = new VehicleChassis(); VehicleChassis vehicleChassis1 = new VehicleChassis("chasis name"); System.out.println(vehicleChassis); System.out.println(vehicleChassis1); } }
VehicleFrame.java
public class VehicleFrame implements Chassis{ String vehicleFrameType; public VehicleFrame() { vehicleFrameType = "Unibody"; } public VehicleFrame(String vehicleFrameType) { this.vehicleFrameType = vehicleFrameType; } @Override public Chassis getChassisType() { return new VehicleChassis(); } @Override public void setChassisType(String vehicleChassis) { vehicleFrameType = vehicleChassis; } @Override public String toString() { return "Chassis : " + chassis + "\n" + "Vehicle Frame : " + vehicleFrameType; } public static void main(String[] args){ VehicleFrame vehicleFrame = new VehicleFrame(); System.out.println(vehicleFrame); vehicleFrame.setChassisType("Ladder Frame"); System.out.println(vehicleFrame); } }
Sample Output : VehicleChassis.java
Sample Output : VehicleFrame.java
Hope it helps!
Vocabulary: Identify the vocabulary word for each definition below. Constructor final final class A specialized method that creates an instance of a class.
A keyword that qualifies a variable as a constant and prevents a method from being overridden in a subclass. A class that it can't be overridden by a subclass, in fact it can't be subclassed. Defines constants and methods without implementation interface
C:\Program Files Javaljdk1.8.0_1011binljava Chassis Name: Chassis Chassis Name : chasis name Process finished with e xit code 0
"C:\Program Files\Javaljdk1.8.0 1011binljava" Chassis: Chassis Vehicle Frame:Unibody ChassisChassis Vehicle Frame Ladder Frame .. Process finished with e xit code 0
.
Similar Solved Questions
1 answer
Please show work. thank you 1. Consider the vectors: (a) Determine if b = 0 is...
please show work. thank you 1. Consider the vectors: (a) Determine if b = 0 is a linear combination of a, a, and a bi (b) Determine the set of values of b1,b2, bg such that b2 is not a linear combination of a as, and 2. Explain why the nullspace of R the same as that of M, where R is the RREF of M....
1 answer
BSW Inc. had a weekly payroll of $2,500 for three employees with mandatory withholdings of social...
BSW Inc. had a weekly payroll of $2,500 for three employees with mandatory withholdings of social security tax (7.65%), federal withholdings of $500, and state withholdings of $100. Voluntary withholdings included retirement plan contributions of $50, and health care savings account contributions of...
1 answer
1 7) Show that the series converges/diverges 1 1 8) Show that the sequence a N...
1 7) Show that the series converges/diverges 1 1 8) Show that the sequence a N + 1 N+ 1 is monotonic....
1 answer
2. [0.04/0.9 Points] DETAILS PREVIOUS ANSWERS SESSCALCET2 12.5.513.XP. MY NOTES ASK Set up, but do not...
2. [0.04/0.9 Points] DETAILS PREVIOUS ANSWERS SESSCALCET2 12.5.513.XP. MY NOTES ASK Set up, but do not evaluate, integral expressions for the mass, the center of mass, and the moment of inertia about the z-axis. The solid enclosed by the cylinder x2 + y2 = 9 and the planes y + z = 5 and 2 = 1; p(x, ...
1 answer
20 minus 3 squared times 2 plus eight equals 110
20 minus 3 squared times 2 plus eight equals 110. where do i put the parentheses?...
1 answer
. Newlin Inc. has a depreciable asset that cost $24,000, has a residual value of $2,000,...
. Newlin Inc. has a depreciable asset that cost $24,000, has a residual value of $2,000, and an expected life of 5 years. The adjusting entry to record one full year’s depreciation on this asset will (ignore taxes): (a) Increase total liabilities $4,400. (b) Increase total assets $4,400. (c) D...
1 answer
A parallel-plate capacitor has capacitance 7.50 uF. (a) How much energy is stored in the capacitor...
A parallel-plate capacitor has capacitance 7.50 uF. (a) How much energy is stored in the capacitor if it is connected to a 19.00-V battery? ա․ (b) If the battery is disconnected and the distance between the charged plates doubled, what is the energy stored? uJ (c) The battery is subseque...
1 answer
When you were born, your parents opened an investment account in your name and deposited $1,500...
When you were born, your parents opened an investment account in your name and deposited $1,500 into the account. The account has earned an average annual rate of return of 5.3percent. Today, the account is valued at $42,856. How old are you? 71.47 years 70.67 years 61.08 years 67.33 years 64.91 yea...
1 answer
Reduce the following equation using Boolean algebra and show all of your steps. Q = A'B'C'D'...
Reduce the following equation using Boolean algebra and show all of your steps. Q = A'B'C'D' + A'B'C'D + A'B'CD' + AB'C'D' + AB'C'D + AB'CD' + AB'CD...
1 answer
Read the following descriptions and identify the type of risk or term being described: Description Terms...
Read the following descriptions and identify the type of risk or term being described: Description Terms A standard measure of the risk per unit of return This type of risk relates to changes in the interest rate This can be used to reduce the stand-alone risk of an investment by combining it with o...
1 answer
If the humidity in a room of volume 695 m3 at 25°C is 60%, what mass...
If the humidity in a room of volume 695 m3 at 25°C is 60%, what mass of water can still evaporate from an open pan?...
1 answer
Assignment/take AssignmentMain.do?inprogress=true eBook Show Me How E Calculator Dividing Partnership Net Income Required: Steve Queen and...
Assignment/take AssignmentMain.do?inprogress=true eBook Show Me How E Calculator Dividing Partnership Net Income Required: Steve Queen and Chelsy Bernard formed a partnership, dividing income as follows: 1. Annual salary allowance to Queen of $88,920. 2. Interest of 7% on each partner's capital ...
1 answer
Gy" + 2y' +y=e-ing 3 sint; b. 3". - y Problem 5. Solve non-homogeneous equations.
gy" + 2y' +y=e-ing 3 sint; b. 3". - y Problem 5. Solve non-homogeneous equations....
1 answer
ConstantsPeriodic Table Part A A 50 HC point charge is at the origin. Find the electric...
ConstantsPeriodic Table Part A A 50 HC point charge is at the origin. Find the electric field at the point 1 -45 cm, 0 Express your answers using two significant figures. Enter the x and y components of the electric field separated by a comma. Previous Answers Correct Part B Find the electric field ...
1 answer
Select all of the true statements regarding chemical equilibrium. The concentrations of reactants and products are...
Select all of the true statements regarding chemical equilibrium. The concentrations of reactants and products are equal. The concentrations of reactants and products remain constant. Reactants are being converted to products and vice versa. The rates of the forward and reverse reactions are equal. ...
1 answer
The patient recovery time from a particular surgical procedure is normally distributed with a mean of...
The patient recovery time from a particular surgical procedure is normally distributed with a mean of 4 days and a standard deviation of 1.8 days. Let X be the recovery time for a randomly selected patient. Round all answers to 4 decimal places where possible. a. What is the distribution of X? X-N |...
1 answer
The mall building job was started and completed during the month. Direct materials used totaled $33,000;...
The mall building job was started and completed during the month. Direct materials used totaled $33,000; Direct labor costs were $42,000; manufacturing overhead applied was $21,000. Job 101 was for a total of 3,000 units. -What is the total cost that should have been recorded on a job cost card for ...