Design the appropriate accessor and mutator methods

Assignment Help JAVA Programming
Reference no: EM13690048

Question: Design an Employee class that has fields for the following pieces of information: Employee Name Employee Number Next, design a class named ProductionWorker that extends the Employee class.

The ProductionWorker class should have fields to hold the following information: Shift Number (an integer, such as 1, 2, or 3) Hourly Pay Rate the workday is divided into two shifts: day and night.

The shift field will hold an integer value representing the shift that the employee works.

The day shift is shift 1 and the night shift is shift 2.

Design the appropriate accessor and mutator methods for each class. Once you have designed the classes, design a program that creates an object of the ProductionWorker class and prompts the user to enter data for each of the object's fields.

Store the data in the object and then use the object's accessor methods to retrieve it and display it on the screen.

Include comments in code section. Code this in java programming.

Reference no: EM13690048

Questions Cloud

Write an iterative function power : Write an iterative function power1 to compute xn for n >= 0 and write a recursive function power2 to compute xn by using the following recursive formulation
Acetone and 2 equivalents of benzaldehyde : Problem- Give the overall balanced equation not mechanism for the aldol condensation reaction, followed by dehydration, between acetone and 2 equivalents of benzaldehyde. Use Hydroxide ion as the base.
Write a program that displays the squares : Using a for loop, write a program that displays the squares of all integers greater than 0 and less than or equal to a given number n. Use the c ++ programming language to write the code.
Calculate the difference between delta h and delta u : Problem- Calculate the difference between delta H and delta U when 1.0 mol of grey tin 5.73.g cm-3 changes t o white tin 7.31gcm-3 under 1*10^6 pa pressure at 298K, delta H =2.1KJ. Calculate the volume changes. 1 Pa=1KG m^-1S^-1
Design the appropriate accessor and mutator methods : Design an Employee class that has fields for the following pieces of information: Employee Name Employee Number Next, design a class named ProductionWorker that extends the Employee class.
Calculate the volume changes : Problem- Calculate the difference between delta H and delta U when 1.0 mol of grey tin 5.73.g cm-3 changes t o white tin 7.31gcm-3 under 1*10^6 pa pressure at 298K, delta H =2.1KJ. Calculate the volume changes. 1 Pa=1KG m^-1S^-1
Describe a dbms and its functions : Describe a DBMS and its functions. Name some of the popular DBMS software and you should search the Internet for the updated DBMS technology.
Draw a plausible structural formula for the hydrocarbon : Problem- A 1.24-g sample of a hydrocarbon, when completely burned in an excess of O2(g), yields 4.04 g CO2 and 1.24 g H2O Draw a plausible structural formula for the hydrocarbon molecule
Describe a database and its various elements : Describe a database and its various elements. Define Primary Key, foreign key, and metadata.

Reviews

Write a Review

JAVA Programming Questions & Answers

  Write a method in java that uses a switch statement

Write a method in JAVA that uses a switch statement and takes a person's age using an integer parameter , then checks if the age is valid (0-110), and then RETURNS a string based on the age

  Please write the code in java nbsprecursionimplement a

please write the code in java nbsprecursionimplement a subsetgenerator that generates all subsets of the characters of

  Trade-offs between quantity and quality of production

Are there inevitable trade-offs between quantity and quality of production and in what ways can job analysis and job redesign help manage there trade-offs?

  Write a java program to implement the finite field

Write a program called "GF2.java" to implement the finite field GF(p n ) where p is a prime number and n is a positive integer.  You also need to write four methods to realize "+", "-", "´", and "/".

  Write a method called writenums

Write a method called writeNums that takes an integer n as a parameter and prints to the console the first n integers starting with 1 in sequential order, separated by commas. For example, consider the

  Graphical application for computing statistics

Write a graphical application for computing statistics of a data set. Supply a text field and button for adding floating-point values, and display the current minimum, maximum, and average in a label.

  A java program where the user designates

a java program where the user designates how many games they would like to play (for example user inputs 10 games) then they play the game, if lets say there is a tie after 10 games the game continues until either the user of the computer wins by 2

  Create system in java using agile approach

You are a software manager in company which designs critical control software for aircraft. Create system in Java using agile approach with a user involved in the development team.

  To report the amount of the fine

To report the amount of the fine, which is $25 for the first hour or pan of an hour that the car is illegally parked, plus $10 for every additional hour or part of an hour that the car is illegally parked

  Write a method to save a linked list to a text file

Write a method to save a Linked List to a text file called file.txt. It must save the Linked List to the file with each node on a different line.

  Powerful pain reliever are consumers with headaches

Your target market for the most powerful pain reliever are consumers with HEADACHES. Start with goals and objectives. Do a SWOT. What information is most important for your market? Do some market research.

  Creates a professorraing class

Write a program that creates a professorRaing class consisting of professor ID and three ratings. The three ratings are used to evaluate easiness, helpfullness, and clarity. In a separate implementation class, allow the user to enter the values.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd