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 class array that encapsulates an array

Write a class Array that encapsulates an array and provides bounds-checked access. The private instance variables should be int index and inarray[10]. The public members should be a default constructor and methods (signatures shown below) to provide ..

  Aimthe problem and implementing the design using principles

aimthe problem and implementing the design using principles of correct syntax program structure and

  Java program that allows the user to enter a letter

Write a java program that allows the user to enter a letter (as a code) and a real number (as the radius of a circle). If the letter is 'A' your program must calculate the area of the circle. If the letter is 'C' your program must calculate the ci..

  Write a java program that uses a search tree of strings

Write a Java program that uses a search tree of strings to sort text lines in alphabetic order. You may choose how you de?ne alphabetic order as long as there is some sense in the de?nition. You may also choose what kind of tree you use.

  Write servlet code for accepting two numbers from user

Write the servlet code for accepting two numbers from user show addition and multiplication of numbers. If error occurs, then call JSP error page to display suitable error message.

  Design a java program that simulates a slot machine

Design a java program that simulates a slot machine. When the program runs, it should do the following: Ask the user to enter the amount of money he or she wants to insert into the slot machine. ? Instead of displaying images, the program will random..

  Application that will allow a new customer to order a house

Create an application that will allow a new customer to order a house. You'll allow the customer to choose among four models (Aspen, Britattany, Colonial, and Dartmoor) by creating separate ButtonGroups.

  User enters a list of car parts

So if the user enters a list of car parts, the programm holds this list. Afterward, when the user types in the name of the part the programm outputs that name from the list.

  Statements to print a label

Add the statements to print a label in the following format (the numbers in the example output are correct for input of $4.25 per pound and 41 ounces). Use the formatting object money to print the unit price and total price and the formatting object ..

  Determine the purpose of using javascriptreg on a website

what is the purpose of using javascriptreg on a website? what is a specific example of a javascriptreg application that

  Calculate the percent of kcal from each macronutrient

Calculate the percent of kcal from each macronutrient and the percent of kcal by fluids.

  Design a single class that expresses the commonality

Design a single class that expresses the commonality of these concepts.

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