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

a. Design the logic for an application for a company that wants a report contain

ID: 3632603 • Letter: A

Question

a. Design the logic for an application for a company that wants a report containing a breakdown of payroll by department. Input includes each employee’s last name, first name, department number, hourly salary, and number of hours worked. The output is a list of the seven departments in the company (numbered 1 through 7) and the total gross payroll (rate times hours) for each department.
b. Modify “a” so that the report lists department names as well as numbers. The department names are:
Dept. Num. Department Name
1 Personnel
2 Marketing
3 Manufacturing
4 Computer Services
5 Sales
6 Accounting
7 Shipping
c. Modify the report created in exercise “b” so that it prints a line of information for each employee before printing the department summary at the end of the report. Each detail line must contain the employee’s name, department number, department name, hourly wage, hours worked, gross pay, and withholding tax.
Withholding taxes are based on the following percentages of gross pay:
Weekly Gross Pay ($) Withholding (%)
0.00 – 200.00 10
200.01 – 350.00 14
350.01 – 500.00 18
500.01 – up 22

a. Daily Life Magazine wants an analysis of the demographic characteristics of its readers. The Marketing Department has collected reader survey records containing the age, gender, marital status, and annual income of readers. Design an application that accepts reader data and produces a count of readers by age groups as follows: under 20, 20-29, 30-39, 40-49, and 50+
b. Create the logic for a program that would produce a count of readers by gender within age group — that is, under 20 females, under 20 males, etc.
c. Create the logic for a program that would produce a count of readers by income groups as follows: under $20,000, $20,000-$29,999, $30,000-$49,999, $50,000-$69,999, and $70,000 and up.
Preparing

Explanation / Answer

start

    Declarations

            num count=0

            string names[30]

            string nam

            num hourlywages[30]

            num hoursWorked[30]

            num grossPay[30]

            num netPay[30]

              num totalwithHolding=0

            num totalHrs=0

            num totalGross=0

            num totalNetPay=0

            string SENTINEL=”XXX”

     getName()

         while nam <> SENTINEL

             names[count]=nam

                getValues()

                        calculateValues()

           count=count+1

               getName()

       endwhile

     DisplayValues()

   stop

return

DisplayValues()

Start
    declarations
    num SIZE=500
    num AgeGroups[SIZE]={0,0,0,0,0}
    num Under20Male=0
    num Under20Female=0
    num age
    num income
    string choice
    string gender
    string status
Output "DailyLifeMagazine Data"
Output "Enter information yes or no"
Input choice
while (choice = yes)
Output "Enter age:"
Input age
Output "Enter gender male or female"
Input gender
Output "Enter yearly income"
Input income
Output "Enter marital status single or divorced"
Input status

If (age<20)then
    AgeGroups[0] = AgeGroups[0] + 1
     If gender=='M'
Under20Male=Under20Male+1
     Else If gender=='F'
Under20Female=Under20Female+1
     
Else If (age>=20 and age <=29)then
    AgeGroups[1] = AgeGroups[1] + 1
Else If (age>=30 and age <=39)then
    AgeGroups[2] = AgeGroups[2] + 1
Else If (age>=40 and age <=49) then
    AgeGroups[3] = AgeGroups[3] + 1
Else If (age>=5)then
    AgeGroups[4] = AgeGroups[4]+ 1
Endif

Output "Enter more information yes or no"
Input choice
EndWhile

Start
    declarations
    num SIZE=5
    num IncomeGroups[SIZE]={0,0,0,0,0}
    num age
    num income
    string choice
    string gender
    string status
Output "DailyLifeMagazine Data"
Output "Enter information yes or no"
Input choice
while (choice = yes)
Output "Enter age:"
Input age
Output "Enter gender male or female"
Input gender
Output "Enter yearly income"
Input income
Output "Enter marital status single or divorced"
Input status

If (income<20000)then
    IncomeGroups[0] = IncomeGroups[0] + 1
         
Else If (age>=20000 and age<=29000)then
    IncomeGroups[1] =IncomeGroups[1] + 1
Else If (age>=30000 and age <=49000)then
    IncomeGroups[2] = IncomeGroups[2] + 1
Else If (age>=50000 and age <=69000) then
   IncomeGroups[3] = IncomeGroups[3] + 1
Else If (age>=70000)then
   IncomeGroups[4] = IncomeGroups[4]+ 1
Endif

Output "Enter more information yes or no"
Input choice
EndWhile

output" Data Analysis:"
  
    output "Under $20000",IncomeGroups[0]  
    output "$20000-$29000 age",IncomeGroups[1]
    output "$30000-$49000 age",IncomeGroups[2]
    output "$50000-$69000age",IncomeGroups[3]
    output "Above $70000",IncomeGroups[4]   

stop   

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote