Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Suppose the class Job has been defined as follow. You can directly use it. Job - id: long -title: String -salary: double +Job (long, String,

image text in transcribed
Suppose the class Job has been defined as follow. You can directly use it. Job - id: long -title: String -salary: double +Job (long, String, double) + getld): long +setld(long): void + getTitle(): String +setTitle(String): void +getSalary(): double +setSalary(int): void Give the Java statements to do following things according to the existing class Job: 1. (2 pts) Use composition to define the data (instance variables) of class Employee. Every employee has a name and a job. 2. (5 pts) Define a default constructor of class Employee, which sets the person's name as your name, the person's job as (ld: 1000, Title: software developer, Salary: $65000.00). 3. (3 pts) Define a public method getJobTitle of class Employee, which returns employee's job title

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

More Books

Students also viewed these Databases questions