Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I know how to do 1-6, I just need help on 7 and 8! 1. Create a folder with YourLastNameFirstInitialLE73. 2. Inside of that folder

I know how to do 1-6, I just need help on 7 and 8!

1. Create a folder with YourLastNameFirstInitialLE73.

2. Inside of that folder create 3 more folders: classes, src, and jobs (this folder can be within the src folder)

3. In DrJava create a project folder (Creating Projects in DrJava.pdf) asYourLastNameFirstInitialLE73.

4. Add the folders to the project

5. Add a new file to the jobs folder and call it TopITJob.

6. In the program with the main(), import the TopITJob class. The import statement will look like this: import nameOfFolder.NameOfProgram;

7. In the TopITJob program:

code a package statement as the very first line: package nameOfFolder;

code 3 fields (class level variables): one to store the position, the other one to store the average annual salary, and the last one to store the number of created objects;

code 2 constructors: one that is parameterless with an empty method body, and the other that will accept 2 arguments through its parameter list. The names of the parameter variables are the same as the fields. Use the parameter variables to populate the 2 fields. (Add a proper code to the body of each constructor to update the value of the count field);

code individual set methods in which one prompts for the position and the other prompts for the average annual salary;

code individual get methods that return each field (class variable).

8. In the main():

code a TopITJob object by sending to it a top IT position and that position's average annual salary (look at which constructor you'll be using);

code another TopITJob object using the parameterless constructor;

print "Top IT Job #2: "

use the object to call the methods that set the fields;

print the output by following the spacing and line advances in the attached sample output.

Don't forget to end the main() with an exit statement.

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

Data And Databases

Authors: Jeff Mapua

1st Edition

1978502257, 978-1978502253

More Books

Students also viewed these Databases questions

Question

What is the difference between Needs and GAP Analyses?

Answered: 1 week ago

Question

What are ERP suites? Are HCMSs part of ERPs?

Answered: 1 week ago