Question: java programming Consider you are designing vehicles engine. When you are done with the hardware part, you want some of the software functionalities to be

java programming  java programming Consider you are designing vehicles engine. When you are
done with the hardware part, you want some of the software functionalities

Consider you are designing vehicles engine. When you are done with the hardware part, you want some of the software functionalities to be implemented by a client who is using your engine. So, in that case, you can define your engine functionalities in an interface. Your interface is named Engine and it's able to change gear and speed. void changeGear(int a); void speedUp(int a); Create a class Vehicle implementing the above interface and implements it's methods. In the main, create vehicle object and set the gear to 3 and speed to 70 and then call this line: System.out.println(objv); Console 3 Problems @ Javadoc O Declaration Vehicle [Java Application) C:\Program Files\Javalj Sample Test Run: Vehicle [speed=70, gear=3] Consider you are designing simple employee details system. Create an abstract class EmployeeDetails that shows an employee's Common details such as: name and ID. Confidential details such as: salary and performance. (abstract method) Create a class HR that implements the above abstract methods. Your main should look like this: HR hr = new HR("John", 1); hr.commonEmpDetaills(); hr.confidentialDetails (6320.56, "good"); Problems e Jvado Declaation terminated HR ava Application CProgra Name: John Sample Test Run: E ID: 1 Salary: $6320.56 Performance: good

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!