Calculates the employees gross pay based on their hourly


Instructions:

1. Complete the following programming problems in a Word document, clearly numbering each question in bold and in a large font. If I cannot easily see where your answer to each question begins, I will assume you did not want me to grade your answer.

2. Include your name in the document header so that it is shown on every page.

3. For each problem, write pseudocode as shown in all examples on Blackboard for all Chapters that we have covered, without any housekeeping or detail or detailLoop or any other modules. Only the programs for #4 and #5 are to contain modules/methods, and those must be written as described in the problem in order to receive credit.

4. All requirements that have been given for homework programs apply here too. Follow the Good Program Design Example from the Chapter 2 Reading folder on Blackboard, and what has been demonstrated in all examples on Blackboard.

5. Any program that does not follow all of these instructions will not be read and will receive a grade of zero. If you make no effort to make your program easy to read and follow according to the principles demonstrated in the text book and the Blackboard examples, I will, likewise, make no effort to read them.

6. I may ask you to explain in detail any and all of your programs after I receive them. If you are unable to explain any part of any program, you will receive a grade of zero for that program.
Any program that fails to follow any of these requirements will receive an automatic grade of zero.

1) The Downdog Yoga Studio offers five types of classes, as shown in Table 6-2.

Table 6-2 Downdog Yoga Studio classes

Class Number

Class Name

1

Yoga 1

2

Yoga 2

3

Children's Yoga

4

Prenatal Yoga

5

Senior Yoga

Using arrays where applicable, design one program that
a) accepts a class number and then displays the class's name.
b) Allow the user to enter class numbers continuously until a sentinel value is entered. Then, display each class number, name, and a count of the number of requests for each class.

2) A company maintains its employee records in a sequential text file named employees.txt. The record for each employee contains the following: ID number, employee's name, hourly pay, hours worked, benefits contribution, retirement account contribution. Design the logic, in pseudocode, for a program that

a) Reads each record in the employees.txt file

b) Calculates the employee's gross pay, based on their hourly pay and how many hours they worked

c) Calculates the employee's net pay after deducting the following:
i) the benefits contribution
ii) the retirement account contribution
iii) income tax, based on the following scale:
(1) gross pay of 1,000 or more: 10%
(2) gross pay of 750 or more but less than 1000: 7.5%
(3) gross pay of 500 or more but less than 750: 5%
d) Writes the employee data along with the gross pay, benefits and retirement account contributions, income tax (in dollars), and net pay to another file named payroll.txt

3) The village of Marengo conducted a census and collected records that contain household data, including the number of occupants in each household. The exact number of household records has not yet been determined, but you know that Marengo has fewer than 300 households. Using an array where applicable, develop the logic for a program that allows a user to enter each household size and then

a) Displays a list of the entered household sizes

b) Determines the mean household size in Marengo, the largest household size and the smallest household size. The program must complete these tasks without sorting the array.

4) Plan the logic for an insurance company program to determine policy premiums. The program prompts the user for an insurance policy number and the type of policy needed- health or auto. Depending on the policy type, the program gets additional information from the user and then calls one of the methods described below, to determine their insurance premium, and then displays the policy number, the policy type and the premium. The methods are:

a) calculateHealthPremium method
i) requires to be passed information ("Y" or "N") that indicates whether the user is a smoker
ii) if the user is a smoker, the premium should be $550, otherwise, $345
iii) returns the premium amount

b) calculateAutoPremium method

i) requires to be passed the number of traffic tickets the user has received in the last three years
ii) determines the premium as follows:
(1) three or more tickets: $225
(2) one or two tickets: $190

(3) zero tickets: $110
iii) returns the premium amount

5) Create the logic for a program that prompts the user for numeric values for a month, day, and year. Then pass the three variables to the following methods:

a) A method that displays the date with dashes in month-day-year order, as it is often represented in the United States-for example, 6-24-2015

b) A method that displays the date with dashes in day-month-year order, as it is often represented in the United Kingdom-for example, 24-6-2015

c) A method that displays the date with dashes in year-month-day order, as it is represented in the International Standard-for example, 2015-6-24

d) A method that prompts the user for the desired format ("US", "UK", or "IS") and then passes the three values to one of the other three methods described in parts a, b, and c of this exercise

Request for Solution File

Ask an Expert for Answer!!
Accounting Basics: Calculates the employees gross pay based on their hourly
Reference No:- TGS01532401

Expected delivery within 24 Hours