Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Objective: This lab was designed to reinforce programming concepts from Chapter 3, you will practice: . Creating a class declaration. . Declaring instance variables. .

image text in transcribed

Objective: This lab was designed to reinforce programming concepts from Chapter 3, you will practice: . Creating a class declaration. . Declaring instance variables. . Declaring a constructor. Declaring set and get methods. .Writing a test application to demonstrate the capabilities of another class. Description of the Problem Using only programming techniques create a classcalled Employee that includes three pieces of information as instance variables-a first name (type string), a lastname (type string) and a monthly salary (type double). Your class should have a constructor that initializes the three instance variables. Provide a set and a get method for each instance variable. If the monthly salary is not positive, set it to o.o. Write a test application named EmployeeTest that demonstrates clasS Employee's capabilities. Create four Employee objects and display the yearly salary for each Employee. Then give each Employee a 10% raise and display each Employee's yearly salary again. (Use your name for employee 1) Sample Output Employee 1: Robert Jones; Yearly Salary: 34500.00 Employee 2: Susan Smith; Yearly Salary: 37809.00 Employee 3: Thomas Clark; Yearly Salary: 44500.00 Employee 4: Mary Colman; Yearly Salary: 57800.00 Increasing employee salaries by 10% Employee 1: Robert Jones; Yearly Salary: 37950.00 Employee 2: Susan Smith; Yearly Salary: 41589.90 Employee 3: Thomas Clark; Yearly Salary: 48950.00 Employee 4: Mary Colman; Yearly Salary: 63550.00

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

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2014 Nancy France September 15 19 2014 Proceedings Part 3 Lnai 8726

Authors: Toon Calders ,Floriana Esposito ,Eyke Hullermeier ,Rosa Meo

2014th Edition

3662448440, 978-3662448441

More Books

Students also viewed these Databases questions