Write a program with an array of seven payroll objects

Assignment Help JAVA Programming
Reference no: EM132095860

PLEASE HELP IN C++ AND INCLUDE TEXTFILE

Class design:

Design a PayRoll class that has data members for an employee's first and last name, hourly pay rate, number of hours worked. The default constructor will set the first and last name to empty string, and hours worked and pay rate to zero.

The class must have mutator functions to set each of the data members of the class and accessors to access them. The class should also have the following member functions:

displayPayroll function that displays all data members of the a PayRoll instance on one line separated by blanks

readPayRoll function that reads data members of a PayRoll instance from an input stream associated with a text file (assume all data members are on one line separated by commas)

getGross function that will return a double calculated by multiplying the hours worked by the pay rate.

Driver program:

Write a program with an array of seven PayRoll objects. The program should read the name (first and last), pay rate and the number of hours for each employee and display each employee information followed by the employee's gross pay, all on one line separated by blanks. Set the precision for printing the doubles to two decimal places.

Input Validation:

Do not accept values greater than 60 for the number of hours worked, simply have the set function set number of hours worked to 60, the maximum allowed.

Do not accept negative values for pay rate and hours worked (set them to 0)

Be sure to include an employee claiming to work more than 60 hours per week, negative pay rate, and negative hours worked.

Reference no: EM132095860

Questions Cloud

Understanding of the key topics : This assessment aims to develop and gauge student understanding of the key topics covered so far by answering the following questions.
Prepare a multiple-step income statement : Presented below is information for Furlow Company for the month of March 2014. Prepare a multiple-step income statement
Find all customers whose balances are less than their limits : Find all customers whose balances are less than their credit limits. How many customers have balances which are less than their credit limits.
Prepare separate entries for each transaction on the books : On June 10, Tuzun Company purchased $9,700 of merchandise from Epps Company, Prepare separate entries for each transaction on the books of Tuzun Company
Write a program with an array of seven payroll objects : Design a PayRoll class that has data members for an employee's first and last name, hourly pay rate, number of hours worked.
Assessment-idea generation : The objective of this individual assessment submission is to learn how to develop a business idea, complemented by brainstorming and leveraging the insights
How much depreciation expense should the company recognize : A company purchased a delivery van for $28,000 with a salvage value of $3,000 on September 1, how much depreciation expense should the company recognize
Information design a study of those : Based on the information design a study of those likely to shop at Publix or Walmart depending on what your county offers. Answer the following in paragraph for
Calculate the amount of the allowance for doubtful accounts : Calculate the amount of the Allowance for Doubtful Accounts that should appear on the December 31, of the current year, balance sheet

Reviews

Write a Review

JAVA Programming Questions & Answers

  Recursive factorial program

Write a class Array that encapsulates an array and provides bounds-checked access. Create a recursive factorial program that prompts the user for an integer N and writes out a series of equations representing the calculation of N!.

  Hunt the wumpus game

Reprot on Hunt the Wumpus Game has Source Code listing, screen captures and UML design here and also, may include Javadoc source here.

  Create a gui interface

Create GUI Interface in java programing with these function: Sort by last name and print all employees info, Sort by job title and print all employees info, Sort by weekly salary and print all employees info, search by job title and print that emp..

  Plot pois on a graph

Write a JAVA program that would get the locations of all the POIs from the file and plot them on a map.

  Write a university grading system in java

University grading system maintains number of tables to store, retrieve and manipulate student marks. Write a JAVA program that would simulate a number of cars.

  Wolves and sheep: design a game

This project is designed a game in java. you choose whether you'd like to write a wolf or a sheep agent. Then, you are assigned to either a "sheep" or a "wolf" team.

  Build a graphical user interface for displaying the image

Build a graphical user interface for displaying the image groups (= cluster) in JMJRST. Design and implement using a Swing interface.

  Determine the day of the week for new year''s day

This assignment contains a java project. Project evaluates the day of the week for New Year's Day.

  Write a java windowed application

Write a Java windowed application to do online quiz on general knowledge and the application also displays the quiz result.

  Input pairs of natural numbers

Java program to input pairs of natural numbers.

  Create classes implement java interface

Interface that contains a generic type. Create two classes that implement this interface.

  Java class, array, link list , generic class

These 14 questions covers java class, Array, link list , generic class.

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