Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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 image text in transcribed
image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Time Series Databases New Ways To Store And Access Data

Authors: Ted Dunning, Ellen Friedman

1st Edition

1491914726, 978-1491914724

More Books

Students also viewed these Databases questions

Question

What is a verb?

Answered: 1 week ago

Question

Discuss communication challenges in a global environment.

Answered: 1 week ago