Write a JAVA program to solve the following problem. Your program should properly
compile and run. Your code MUST follow the documentation style used in your textbook.
You need to upload into Moodle the following:
The electronic version of your SINGLE source code file after you successfully
compiled and ran it. Please label your file appropriately.
i do the first steps you will find in the file name lab1
code MUST follow the documentation style used in your textbook you find it in lab1Code
lab1 org.eclipse.jdt.core.javabuilder org.eclipse.jdt.core.javanature
eclipse.preferences.version=1 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve org.eclipse.jdt.core.compiler.compliance=1.8 org.eclipse.jdt.core.compiler.debug.lineNumber=generate org.eclipse.jdt.core.compiler.debug.localVariable=generate org.eclipse.jdt.core.compiler.debug.sourceFile=generate org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.source=1.8
package lab1; public synchronized class Car { private static final Object egn; Engine eng; Wheel whe; Wheel[] Window; public void Car(); public boolean equals(Object); }
package lab1; public synchronized class Engine { public void Engine(); }
package lab1; public abstract synchronized class Vehicle { private String vehicleName; public void Vehicle(); public void AbstrtactVehicle(String); public String getVehicleName(); public String toString(); }
package lab1; public synchronized class Wheel { public void Wheel(); }
package lab1 ;
public class Car {
private static final Object egn = null ;
/*
Data fields
*/
Engine eng ;
Wheel whe ,
Window [] windows = new Window [ 4 ];
public boolean equals ( Object obj ) {
if ( obj == this ) return true ;
if ( obj == null ) return false ;
if ( this . getClass () == obj . getClass ()) {
Car other = ( Car ) obj ;
return egn . equals ( other . eng ) && whe . equals ( other . whe );
} else {
return false ;
}
}
}
package lab1 ;
public class Engine {
}
package lab1 ;
public abstract class Vehicle {
/** The name of the vehicle */
private String vehicleName ;
/**
* Initializes the vehicleName.
* @param vehicleName the kind of vehicle
* @return
*/
public void AbstrtactVehicle ( String vehicleName ) {
this . vehicleName = vehicleName ;
}
/**
* Get the kind of vehicle.
* @return the vehicleName
*/
public String getVehicleName () {
return vehicleName ;
}
@ Override
public String toString () {
return "Vehicle is a " + vehicleName ;
}
}
package lab1 ;
public class Wheel {
}
Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.
You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.
Read moreEach paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.
Read moreThanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.
Read moreYour email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.
Read moreBy sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.
Read more