0% found this document useful (0 votes)
82 views4 pages

CPCS202 Assignment1 Fall2018

This document provides instructions for a programming assignment to calculate overtime pay for three departments. Students are asked to write a Java program that takes user input for number of overtime employees and hours worked for each department. The program should then output a detailed report with calculations for overtime pay and percentage of overtime employees for each department, and total overtime pay for the company. The document provides sample output, grading criteria, and tips for students.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
82 views4 pages

CPCS202 Assignment1 Fall2018

This document provides instructions for a programming assignment to calculate overtime pay for three departments. Students are asked to write a Java program that takes user input for number of overtime employees and hours worked for each department. The program should then output a detailed report with calculations for overtime pay and percentage of overtime employees for each department, and total overtime pay for the company. The document provides sample output, grading criteria, and tips for students.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Computer Science Department

CPCS202, 1st Term 2019 (Fall 2018)


Program 1: Overtime Payment Report
Assigned: Sunday, September 23rd, 2018
Due: Sunday, October 7th, 2018, or LATE (25% deduction) by Monday

Course Learning Outcomes (CLOs 1,2,3,4,13) Student Outcomes SOs (c, c, b, a, a)

Purpose:
1. The purpose of this Assignment is for you to practice on programming using the basics of Java.

Read Carefully:

• This program is worth 6% of your final grade.

• WARNING: This is an individual assignment; you must solve it by yourself. Any form of cheating will result in
receiving –4% (less than zero) in the program.
• The deadline for this project is by 10:59 PM on Sunday, October 7th, 2018.
o Note: once the clock becomes 10:59PM, the submission will be closed! Therefore, in reality, you must
submit by 10:58 and 59 seconds.

• LATE SUBMISSION: you are allowed to make a late submission, but there is a penalty. If you submit within 24
hours of the due date (so on Monday by 10:59 PM), you will receive a 25% deduction. You will NOT be able to
submit after this date/time.

• Blackboard Submission:
• This assignment must be submitted online via blackboard
• If your file is empty or you upload the wrong file, it will be solely your responsibility, and your grade will be zero.
• Your program (source file) should be named as:
[Link]
Example: [Link]
Program 1: Overtime Payment Report

Objective
The purpose of this Assignment is to practice on programming using the basics of Java.

Description
Suppose a company with three different departments (Human Resource “HR”, Public Administration “PA”, and
Finance Department “FD”) needs to compute the total overtime payment for all three departments. Thus, a
Detailed Report is required to show all departments, along with its:

▪ actual number of employees,


▪ number of employees working overtime,
▪ total number of overtime working hours per employee,
▪ overtime cost for each working hour,
▪ total overtime payment, and
▪ the percentage of employees who have worked overtime for each department.

The actual number of employees and the cost for each overtime working hour in each department should be
defined as CONSTANTS, where:
Actual number of employees for Human Resource department = 30
Actual number of employees for Public Administration department = 50
Actual number of employees for Finance Department = 10
Cost of each overtime working hour for Human Resource department = 150
Cost of each overtime working hour for Public Administration department = 120
Cost of each overtime working hour for Finance Department = 170

Your program should ask the user to input the number of employees working overtime and the overtime working
hours for each department. Then calculate the total overtime payment, along with the percentage of employees
who have worked overtime for each department.
Your program should then print a Detailed Report as shown in the sample output section below. Moreover, the
user should also calculate the total overtime payment for the whole company.

Notes:
• For each department, it is assumed that all employees should work the same amount of overtime hours.

• The number of digits after decimal point should be two digits only.

• Your program should contain the required CONSTANT or you will lose some points.
Sample Output
THIS PROGRAM CALCULATES THE OVERTIME PAYMENT OF A COMPANY WITH THREE DIFFERENT DEPARTMENTS.

Please enter the information for HR department:

Number of employees who have worked overtime :20

Total number of worked overtime hours per employee :10

Please enter the information for PA department:

Number of employees who have worked overtime :30

Total number of worked overtime hours per employee :15

Please enter the information for FD department:

Number of employees who have worked overtime :7

Total number of worked overtime hours per employee :3

Detailed Report of the Overtime Payment System for all three Department

---------------------------------------------------------------------------------------
Dept. #of Emp. Rate/hour #of working Emp. Total overtime hours Total Payment Percentage

****************************************************************************************

HR 30 150 20 10 30000.00 66.67%

PA 50 120 30 15 54000.00 60.00%

FD 10 170 7 3 3570.00 70.00%

****************************************************************************************

Total Overtime Payment of the company = 87570.00 Riyal.


Grading Details

Your program will be graded upon the following criteria:


1) Adhering to the implementation specifications listed on this write-up.
2) Correctness.
3) Your program should include a header comment with the following information: your name, email, course number,
section number, assignment title, and date.
4) Your program should look EXACTLY like the sample run given in this PDF.

BONUS Opportunity
You can get a bonus of 5 points (out of 100) if you use formatted printed to print the report perfectly spaced as shown in
the sample above. What is formatted printing? How do you print with formatted printing? Ask Google!

Deliverables
You should submit: Java project zip file.

NOTE: your name, ID, section number AND EMAIL should be included as comments in the java file!

Suggestions:

• Read AND fully understand this document BEFORE starting the program!
• Once the solution is 100% clear to you, then begin making your code.

Hope this helps.

Final suggestion: START EARLY!

You might also like