Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Can someone please help me create a pseudocode for this! Thank you! In this port

ID: 3854736 • Letter: C

Question

Can someone please help me create a pseudocode for this! Thank you!

In this portion of the lab you will analyze the problem listed below. You will figure out what the inputs and outputs are as well as develop a problem statement. You will also determine what variables you will use and create some pseudocode.

A good friend of yours owns a small company that produces a tool the helps disabled individuals open jars and containers. Rather than buy a time clock mechanism, he would like to put an old computer on the warehouse floor that could be used as the time clock and help them manage materials, shipments, etc. Your friend was able to find an inexpensive application to keep track of each employee’s hours. However, this application did not contain the code to determine how much each employee needs to get paid at the end of the week. Therefore, he has come to you for some help. He would like you to develop a small application that would accept the total number of hours worked and the hourly rate for his employees. The program would then calculate the total pay. He would like this program to keep asking him for employee hours and rate until he enters the word No when asked to continue. The output would be net pay. Net pay is derived from the following equation:

Gross Pay = Hours Worked * Pay Rate

Deductions = Gross Pay * 0.35

Net Pay = Gross Pay – Deductions

Step 1: : Open up Notepad or Notepad ++ and enter the following:

Inputs:

Outputs:

Problem Statement:

Remember the problem statement is just a brief summary of what you are trying to do with your code to solve the problem. It should be no more than a sentence or two. Also remember that your inputs and outputs just need to be a listing, such as: at bats, name, etc. As programmers, we define our inputs and outputs in order to start a list of variables we may have to use in the program.

Step 2: While still in Notepad or Notepad++ type in the following:

Variable Name Datatype

Under your headings, start typing in your variables and what you think the datatypes should be. Your choice of datatypes are string, float and integer.

Step 3: While still in Notepad or Notepad++ type in the following:

30,000 foot view

The 30,000 foot view is an outline of what the program needs to do. It should be a bulleted list. For the first couple of labs, you are not going to type in much here because not much is going on.

Step 4: While still in Notepad or Notepad ++ type in the following:

Class DeterminePay

Attributes

Constructor

Method

Return Methods

Under each one of these headings provide more detail about what the class DeterminePay will do, what methods will perform the math and what values will be able to leave the class.

Step 5: The rest of the program. Now detail in Notepad or Notepad++ how the rest of the program will flow and how you plan to use your class.


Explanation / Answer

Step 1:

Input: The program will input the name of workers, the total number of hours worked and pay rate per hour. It will ask for these inputs in a user-friendly manner.

Output: The program will output the Net pay along with the name of the worker.

Step 2:

Variable Declaration:

a) A private instance variable name of type String to input the name of worker.

b) Another private instance variable to input hours worked (hoursWorked) of type int.

c) A private instance double variable payRate of type double to input the payrate of the worker.

d) A private instance variable GrossPay to calculate total Gross Pay of a worker. This should be of type double.

e) Next private instance variable to finally calculate and store the Net Pay (NetPay) of worker.

Step 4:

Class DeterminePay

{
private String name;

private int hoursWorked;

private double payRate;

private double GrossPay;

private double NetPay;

public DeterminePay(String name, int hoursWorked, double payRate)

{

// This will set the private data variables with the supplied name, hours, and rate.

}

public DeterminePay() // Default constructor

{

// this constructor will set the data variables with a predefined data, e.g., name can be set as "NA", pay = 0

}

// Declaring setter methods of void type to set the value of each input data variables passed with the respective

// methods

public void setName(String name)

{

// this will set the value of name to the vlue of name passed with the method.

}

public void setHoursWorked(int hoursWorked)

{
// This will set the hours worked with the supplied number of hours with the method.

}

public void setPayRate(double PayRate)

{

// This will set the pay rate of worker.
}

// Getter methods to get the supplied input data. These will return the data of the workers.

public String getName()

{

// this will return name of the worker.

}

// This method will calculate the gross pay.It's a private helper method which will aid in calculating the Net pay of

// the worker.

private double calcGrossPay()

{
// this method will calculate the gross pay = total hours worked * pay rate

// and will return the same

}

// This method will return the Net pay of the worker.

public double getNetpay()

{

// First it will calculate deductions = Gross pay * 0.35;
// and this will calculate the net pay and return the same, formula is : Net pay = Gross Pay – Deductions

}