Securing Higher Grades Costing Your Pocket? Book Your Assignment at The Lowest Price Now!
loader
Add File

Error goes here

Files Missing!

Please upload all relevant files for quick & complete assistance.

Guaranteed Higher Grade!

Stuck on Your Question?

Get 24x7 live help from our Top Tutors. All subjects covered.

loader
250 words

Error goes here

Files Missing!

Please upload all relevant files for quick & complete assistance.

Students Who Viewed This Also Studied

6 Pages
Prog1815 Programming with C#

In this class you will practice defining and using classes. Specifically, you will: define a class, instantiate an object of that class, and make use of its properties and method(s). Create a class ca ...

Course

Prog1815

Type

Programming

Subject

Programing

University

Conestoga College

8 Pages
COMP3450 Parallel Computing

In this assignment you are to write a Cor Fortranprogram that parallelizes the application of aconvolution operatorto an image. Use your code fromthe image convolution lectureas starter code 3.Creat ...

Course

comp 3450

Subject

Programing

University

Adler University

21 Pages
EEL 4768 Computer Architecture

Question: Design and implementation of a branch predictor simulator for testing and verification of this architectural component. Rules and Regulations: The work must be done alone. Any form o ...

Course

EEL4768

Type

Programming

Subject

Programing

University

University of Central Florida

11 Pages
The Train Is Initially On a Train Track Which Has An Attached

Uses: Stacks, Enumerations For this assignment, you are to write a Java program that sorts a train of colored cars. Each car is one of the colors: ...

Course

COSC215

Subject

Programing

University

Duquesne University

Season

Autumn

COS10008 Foundations of Technical Programming

Question

Answered

Questions:

Q 1.

A mobile manufacturing company pays its employees as follows:

  • Team leaders (fixed fortnightly salary)
  • Sales workers ($500 plus 6.5% of their gross fortnightly sales)
  • Pieceworkers (fixed amount of money per item for each of the items they produce, each piece worker in this company works on only 1 type of item)
  • Hourly workers (fixed hourly wage for up to the first 60 hours they work and "time-and a-half" i.e. 1.5 times their hourly wage, for overtime hours worked)

Write a program to compute the weekly pay for each employee. You do not know the number of employees in advance.

Each type of employee has its own pay code:

Code 1: Team leaders

Code 2: Sales workers

Code 3: Pieceworkers

Code 4: Hourly workers

There will be an undetermined number of entries into the payroll. Use a switch to compute each employee's pay based on that employee's pay code. Within the switch, prompt the user (i.e. the payroll clerk) to enter the appropriate facts your program needs to calculate each employee's pay based on that employee's pay code. Print each pay value and when done with the entries, print total amount of payroll.

Sample Run:

Enter employee's number code (-1 to end): 4

Enter hourly worker's pay rate: 10

Enter the number of hours worked: 35

fortnightly pay is: 350.00

Enter employee's number code (-1 to end): 4

Enter hourly worker's pay rate: 15.5

Enter the number of hours worked: 100

fortnightly pay is: 1860

Enter employee's number code (-1 to end): 4

Enter hourly worker's pay rate: 10

Enter the number of hours worked: 40

fortnightly pay is: 400.00

Enter employee's number code (-1 to end): 1

Enter the Team leaders’s pay rate: 576.90

fortnightly pay is: 576.90

Enter employee's number code (-1 to end): 2 Enter Sales employee's gross weekly sales: 1091.45 fortnightly pay is: 570.94

Enter employee's number code (-1 to end): 3

Enter the number of pieces completed: 200

Enter the employee's per piece pay rate: 0.5

fortnightly pay is: 100

Enter employee's number code (-1 to end): 8 You have entered an invalid code.

Enter employee's number code (-1 to end): 9 You have entered an invalid code.

Enter employee's number code (-1 to end): 3

Enter the number of pieces completed: 100 Enter the employee's per piece pay rate: 2.75 fortnightly pay is: 275.00

Enter employee's number code (-1 to end):

The total payroll for the fortnight

Q 2.

Use the rand function to produce two positive one-digit integers (0 includes). The program should then prompt the user with a Q, such as How much is 2 + 3?

The user then inputs the answer (Enter -1 to stop). Next, the program checks the user’s answer. If it’s correct, the program should randomly display any of the following messages

  1. Very good!
  1. Excellent!
  1. Nice work!
  1. Keep up the good work!

If the answer is wrong, randomly display any of the following messages.

  1. Please try again.
  1. Try once more.
  1. Don't give up!
  1. Keep trying and let the user try the same Qrepeatedly until the user finally gets it right.

A separate function should be used to generate each new Q. This function should be called once when the application begins execution and each time the user answers the Q correctly.

Q 3.

Q 4.

Write a complete C program to calculate area and circumference of a circle. Your program should have the following functions in addition to a main() function.

  1. Menu –that displays

Do you want to use radius or diameter for the calculation?

Enter 1 for radius

Enter 2 for diameter

Enter -1 to exit

  1. diameter_to_radius –receives diameter (double) as a parameter and returns radius (double).
  1. random_value_generator –generates random values (double) between minimum and 
  1. area –receives radius (double) as a parameter and returns area (double).
  1. circumference - receivesradius (double) as a parameter and returns circumference (double).

You should start the program by prompting the user to select radius or diameter for the calculation (validate the choice).

radius:

You should ask the user to choose a unit, either cm or m (validate the choice), for the calculation. Generate a random double value (use random_value_generator) between 5. 0 (minimum) and 15.0 (maximum) for the radius. Prompt the user to choose either area or circumference calculation (prompt by using character A for area and C for circumference – validate choice).

diameter:

You should ask the user to choose a unit, either cm or m (validate the choice), for the calculation. Generate a random double value (use random_value_generator) between 15.0 and 30.0 for the diameter. Before calculating area or circumference convert diameter to radius (use

diameter_to_radius function).

You should exit the program only when the user inputs -1.

All results are printed in main, show only two decimal numbers in the final result.

COS10008 Foundations of Technical Programming

Answer in Detail

Solved by qualified expert

Get Access to This Answer

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Hac habitasse platea dictumst vestibulum rhoncus est pellentesque. Amet dictum sit amet justo donec enim diam vulputate ut. Neque convallis a cras semper auctor neque vitae. Elit at imperdiet dui accumsan. Nisl condimentum id venenatis a condimentum vitae sapien pellentesque. Imperdiet massa tincidunt nunc pulvinar sapien et ligula. Malesuada fames ac turpis egestas maecenas pharetra convallis posuere. Et ultrices neque ornare aenean euismod. Suscipit tellus mauris a diam maecenas sed enim. Potenti nullam ac tortor vitae purus faucibus ornare. Morbi tristique senectus et netus et malesuada. Morbi tristique senectus et netus et malesuada. Tellus pellentesque eu tincidunt tortor aliquam. Sit amet purus gravida quis blandit. Nec feugiat in fermentum posuere urna. Vel orci porta non pulvinar neque laoreet suspendisse interdum. Ultricies tristique nulla aliquet enim tortor at auctor urna. Orci sagittis eu volutpat odio facilisis mauris sit amet.

Tellus molestie nunc non blandit massa enim nec dui. Tellus molestie nunc non blandit massa enim nec dui. Ac tortor vitae purus faucibus ornare suspendisse sed nisi. Pharetra et ultrices neque ornare aenean euismod. Pretium viverra suspendisse potenti nullam ac tortor vitae. Morbi quis commodo odio aenean sed. At consectetur lorem donec massa sapien faucibus et. Nisi quis eleifend quam adipiscing vitae proin sagittis nisl rhoncus. Duis at tellus at urna condimentum mattis pellentesque. Vivamus at augue eget arcu dictum varius duis at. Justo donec enim diam vulputate ut. Blandit libero volutpat sed cras ornare arcu. Ac felis donec et odio pellentesque diam volutpat commodo. Convallis a cras semper auctor neque. Tempus iaculis urna id volutpat lacus. Tortor consequat id porta nibh.

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Hac habitasse platea dictumst vestibulum rhoncus est pellentesque. Amet dictum sit amet justo donec enim diam vulputate ut. Neque convallis a cras semper auctor neque vitae. Elit at imperdiet dui accumsan. Nisl condimentum id venenatis a condimentum vitae sapien pellentesque. Imperdiet massa tincidunt nunc pulvinar sapien et ligula. Malesuada fames ac turpis egestas maecenas pharetra convallis posuere. Et ultrices neque ornare aenean euismod. Suscipit tellus mauris a diam maecenas sed enim. Potenti nullam ac tortor vitae purus faucibus ornare. Morbi tristique senectus et netus et malesuada. Morbi tristique senectus et netus et malesuada. Tellus pellentesque eu tincidunt tortor aliquam. Sit amet purus gravida quis blandit. Nec feugiat in fermentum posuere urna. Vel orci porta non pulvinar neque laoreet suspendisse interdum. Ultricies tristique nulla aliquet enim tortor at auctor urna. Orci sagittis eu volutpat odio facilisis mauris sit amet.

Tellus molestie nunc non blandit massa enim nec dui. Tellus molestie nunc non blandit massa enim nec dui. Ac tortor vitae purus faucibus ornare suspendisse sed nisi. Pharetra et ultrices neque ornare aenean euismod. Pretium viverra suspendisse potenti nullam ac tortor vitae. Morbi quis commodo odio aenean sed. At consectetur lorem donec massa sapien faucibus et. Nisi quis eleifend quam adipiscing vitae proin sagittis nisl rhoncus. Duis at tellus at urna condimentum mattis pellentesque. Vivamus at augue eget arcu dictum varius duis at. Justo donec enim diam vulputate ut. Blandit libero volutpat sed cras ornare arcu. Ac felis donec et odio pellentesque diam volutpat commodo. Convallis a cras semper auctor neque. Tempus iaculis urna id volutpat lacus. Tortor consequat id porta nibh.

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Hac habitasse platea dictumst vestibulum rhoncus est pellentesque. Amet dictum sit amet justo donec enim diam vulputate ut. Neque convallis a cras semper auctor neque vitae. Elit at imperdiet dui accumsan. Nisl condimentum id venenatis a condimentum vitae sapien pellentesque. Imperdiet massa tincidunt nunc pulvinar sapien et ligula. Malesuada fames ac turpis egestas maecenas pharetra convallis posuere. Et ultrices neque ornare aenean euismod. Suscipit tellus mauris a diam maecenas sed enim. Potenti nullam ac tortor vitae purus faucibus ornare. Morbi tristique senectus et netus et malesuada. Morbi tristique senectus et netus et malesuada. Tellus pellentesque eu tincidunt tortor aliquam. Sit amet purus gravida quis blandit. Nec feugiat in fermentum posuere urna. Vel orci porta non pulvinar neque laoreet suspendisse interdum. Ultricies tristique nulla aliquet enim tortor at auctor urna. Orci sagittis eu volutpat odio facilisis mauris sit amet.

Tellus molestie nunc non blandit massa enim nec dui. Tellus molestie nunc non blandit massa enim nec dui. Ac tortor vitae purus faucibus ornare suspendisse sed nisi. Pharetra et ultrices neque ornare aenean euismod. Pretium viverra suspendisse potenti nullam ac tortor vitae. Morbi quis commodo odio aenean sed. At consectetur lorem donec massa sapien faucibus et. Nisi quis eleifend quam adipiscing vitae proin sagittis nisl rhoncus. Duis at tellus at urna condimentum mattis pellentesque. Vivamus at augue eget arcu dictum varius duis at. Justo donec enim diam vulputate ut. Blandit libero volutpat sed cras ornare arcu. Ac felis donec et odio pellentesque diam volutpat commodo. Convallis a cras semper auctor neque. Tempus iaculis urna id volutpat lacus. Tortor consequat id porta nibh.

24 More Pages to Come in This Document. Get access to the complete answer.

MyAssignmenthelp.com boasts a team of talented and highly skilled coursework writers based in UK who assist students in the best possible manner. Students, who need coursework help, find our services fulfilling and effective because we provide high quality help at affordable price. So, students who often search can someone do my coursework cheap or can experts Write my coursework for cheap get perfect solution at MyAssignmenthelp.com. They pay for best coursework and get it from us.

More COS10008 COS10008 Foundations of Technical Programming: Questions & Answers

Q
icon

We aren't endorsed by this University

Prog1815 Programming with C#

In this class you will practice defining and using classes. Specifically, you will: define a class, instantiate an object of that class, and make use of its properties and method(s). Create a class called Employee: Define4 fields: LastName PayRate MonthWorked TotalHoursWorkedForMonth FullMonthP ...

View Answer
Q
icon

We aren't endorsed by this University

COMP3450 Parallel Computing

In this assignment you are to write a Cor Fortranprogram that parallelizes the application of aconvolution operatorto an image. Use your code fromthe image convolution lectureas starter code 3.Create a convolution operatorthat will perform a blur. 4.Use MPIto parallelize theapplication of the con ...

View Answer
Q
icon

We aren't endorsed by this University

EEL 4768 Computer Architecture

Question: Design and implementation of a branch predictor simulator for testing and verification of this architectural component. Rules and Regulations: The work must be done alone. Any form of cheating and plagiarism such as sharing of your code or using an available code is reported to the ...

View Answer
Q
icon

We aren't endorsed by this University

The Train Is Initially On a Train Track Which Has An Attached

Uses: Stacks, Enumerations For this assignment, you are to write a Java program that sorts a train of colored cars. Each car is one of the colors: red, orange, yellow, green, blue, indigo, and violet. Each car is only one ...

View Answer

Content Removal Request

If you are the original writer of this content and no longer wish to have your work published on Myassignmenthelp.com then please raise the content removal request.

Choose Our Best Expert to Help You

icon

5% Cashback

On APP - grab it while it lasts!

Download app now (or) Scan the QR code

*Offer eligible for first 3 orders ordered through app!

screener
ribbon
callback request mobile
Have any Query?