Create-implement simple class using static variables-methods

Assignment Help Programming Languages
Reference no: EM1370975

This third programming project is intended to demonstrate your knowledge of the following:

create and implement a simple class
properly use static variables, methods and constants
use arrays to efficiently organize data
use the this keyword (not required here; may be incorporated appropriately for bonus points; often used in searching a database)
The third programming project involves reading in payroll data for a series of employees and computing the gross pay for each employee for the week. The program should consist of two classes. The first class EmployeePayroll represents payroll data for one employee for one week. It should contain the following data:

class constants for the weekend multiplier factors
a class variable that maintains the number of employee objects created
an instance double precision floating point variable containing the employee's hourly pay rate
an instance integer array of hours worked for each day of the week for one employee
This class should contain the following methods:

a constructor that is supplied a string that contains one line of employee payroll data--the pay rate followed by the hours worked for seven days
an instance method called computeGrossPay that returns the gross pay for that employee
a toString method that returns a string representation of the object
a class method employeeCount that returns the total number of employees
Saturday hours are paid at time and a half and Sunday hours at double time.

The second class should contain the main method. It should repeatedly prompt the user for payroll data, which should be entered on a single line for each employee. It should create an employee object using the constructor, display the object with toString and display the gross pay for that employee.

After all employees have been processed, the employeeCount method should be called to display the total number of employees.

Reference no: EM1370975

Questions Cloud

How far behind the train is the automobile : The automobile afterwards undergoes a uniform acceleration of -4 m/s2 because of a red light and comes to rest. It remains at rest for 54.6s and next accelerates back to a speed of 25.6m/s at a rate of 2.85m/s2.
Determining the present value : You have just won a lottery! You will receive $50,000 a year beginning one year from now for twenty years. If your required rate of return is 10 percent,
Why is depreciation of capital good a cost of society : Why is depreciation of capital good a cost of society. In illustrate what ways does a person's health depreciate. Why might older people's health care expenditures increase in Grossman model even though their desired health stocks may be lower.
Illustrate what is value of trumbull equity : Illustrate what is value (in millions) of Trumbull's equity if it is viewed as an option. Illustrate what is yield on Trumbull's debt.
Create-implement simple class using static variables-methods : This third programming project is intended to demonstrate your knowledge of the following: create and implement a simple class. properly use static variables, methods and constants
Determine the amount of the loan : Christy maintains her inventory levels through borrowing cash on daily basis from bank. She estimates demand for cash for the coming year will be $17,000 per day.
Determine optimal number of plants that firm should have : Determine optimal number of plants that firm should have to take full advantage of market demand. Compare firm's profit with multiple plants with its profit with a single plant.
Adjustable rate versus fixed rate mortgages : Discuss the advantages and disadvantages of adjustable-rate versus fixed-rate mortgages?
Build b tree for the part table : Build B+ tree for the PART table with n = 6 pointers; illustrate how B+ tree expand (show several intermediate trees) and what final tree will look like.

Reviews

Write a Review

Programming Languages Questions & Answers

  Issues into account for collecting user data via forms

In addition to making our forms easy to use we need to consider user privacy and the use of data. What are some of the issues which you believe you require to take into account for collecting user data via forms?

  Explain usability and accessibility in site design

A description of content to be included in site and how this content will be acquired. Attention should be given to copyright restrictions.

  Create a dtd for a small xml data set

Create a DTD for a small XML data set drawn from the Stanford course catalog. There are multiple departments, each with a department chair.

  Write program to read the size of side of square

Write a program that reads in the size of the side of a square and then prints a hollow square of that size out of asterisks (i.e., *) and blanks.

  Write program compute salary by adding base tax

Compute by adding base tax for that salary range and product of percentage of excess and amount of salary over minimum salary for that range. Write a program which solves this problem.

  Create mock level design for game

Write a 5-page "mock level design" in which you design a level for a game. The game is a shooter, the level is an old warehouse filled with zombies and demons with a boss at the end.

  How recursion terminate in array

Continue in this fashion until entire array is read. Then recursively determine a candidate for B; this is  candidate for A (why?). How does the recursion terminate?

  Create visual basic windows application

Create Visual Basic Windows application. Use following names for solution and project, respectively: Raise Solution and Raise Project.

  Explain the use of xml dom

When the XMLHttpRequest object receives XML data, it parses and stores the data as an XML DOM object in the responseXML property. Why does the XML DOM used in the above example?

  Designing the site links

Company needs to be able to schedule the time of day when the connections are available for replication. Replication should not occur during peak business hours. When designing the site links, which of the following options should you use?

  Create program to produce a summary of amounts due

Create a program that will produce a summary of the amounts due for Pat's Auto Repair Shop. Display a splash screen first, then display the Job Information Form.

  Create application displays number of square feet in house

Create application displays number of square feet in house. Explain and initialize the length and width of the house to 37 and 22, respectively.

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