Programming Technique 1 Assignment 2

Similar documents
Long-term Memory Review PROFICIENCY PRACTICE: MONDAY REVIEW

All employees are required to keep time records. However, there is a difference between Exempt and Non-Exempt employees.

SECTION D TIME CLOCK POLCY AND GUIDELINES

For All Students Taking Consumer Math Summer Review Packet

Fiscal Year End Benefits and Payroll Update. Human Resources June 2013

ECON 1001 A. Come to the PASS workshop with your mock exam complete. During the workshop you can work with other students to review your work.

EMPLOYEE ABSENCE REPORTING & SUBSTITUTE SYSTEM

Number Sense and Problem Solving Practice Questions

Temporary Help Agencies

15 (See Example E later in this lab)

Step-by-Step Instructions: Using Unit Level Labor Analysis

Paying Overtime Under the FLSA: Part 2. Presented on Monday, April 24, 2017

PAYROLL ACCOUNTING (125) Secondary

HAS THE EMPLOYEE WORKED FOR THE EMPLOYER PREVIOUSLY?

Board of Regents of the University System of Georgia etime Employee User Guide

August University of Cincinnati. Part 3

Employment Contract. Entered Into Between : Name of Employer: Registration No: Address: (herein after referred to as "the employer") and

Enterprise by HansaWorld Resource Planner

To ensure the accuracy of your PTO balance and pay, you are required to use Time Tracking in accordance with your role and responsibilities.

Employee Handbook. Subject: Paid Time Off (PTO) Approved By: Employee Handbook Team. Effective Date: January 1, Reviewed: January 19, 2015

Board of Regents of the University System of Georgia etime Employee User Guide. Project View Time Card for Monthly Employees (Manager or Supervisor)

GRADE 11 NOVEMBER 2015 MATHEMATICAL LITERACY P2

ACCOUNTING PAYROLL PROCEDURES

Nanny Family Agreement. Template/Sample Document. Questions? Call

Daily Status Call January 9, 2019

The Ascending Bid Auction Experiment:

PAYROLL ACCOUNTING (125)

Ricky s Essential Practice Problems MAJOR CLUSTERS (70% 80% of Test Points)

2018 Fall Arts & Craft Boutique

Weekly Status Call January 10, 2019

Computing Wages and Salaries.

To-Be Process Review Workshop

PAYROLL ACCOUNTING (125)

Level 1 Economics, 2014

Question #1-W Response sheet-employment. Question #2-W Careers

SEE-MTI COLLECTIVE BARGAINING AGREEMENT Section V A. HOURS OF WORK

Flexible Work Option: Flexplace/Telework Agreement Form

CHAPTER 2. Computing Wages and Salaries.

FLSA: Final Rule THOMAS R. HEARD, MBA, MS ASSISTANT DIRECTOR OF HUMAN RESOURCES JESSICA NORTHCUTT HRIS/TRAINING MANAGER

Sage 50 U.S. Edition. Direct Deposit Getting Started Guide

Fair Labor Standards Act (FLSA)

Introduction. Identifying Terms, Factors, and Coefficients

Skills Practice 5 th Grade

PEOPLE SOFT 9.2 T.R.A.M. MANAGERS GUIDE

George Washington University Workforce Timekeeper 6.0 Upgrade Training

2016 SUMMER YOUTH EMPLOYMENT PROGRAM June 28, 2016 August 22, 2016 (reflects the 8-week window to work from but dates have flexibility)

The Sealed Bid Auction Experiment:

University-wide. Staff Only Students Only Staff and Students

KING ABDULAZIZ UNIVERSITY FACULTY OF COMPUTING & INFORMATION TECHNOLOGY DEPARTMENT OF INFORMATION SYSTEM. Lab 1- Introduction

SUPERADMIN ADDENDUM MODULE OBJECTIVES:

Name: Solving One-Step Equations 4.1.A

PPL Timesheets Information for Employees and Employers

Transportation Problems

2017 PRV Training Seminar Schedule v 503 Woodlawn Ave, Belmont, NC v

Advanced Delivery Scheduling. Release 9.0.3

Exhibitor Manual. And. Maryland Fall Craft Show. October 19-21, Maryland State Fairgrounds Timonium, MD

Section Contents Page # What s New? General Information Board Policy Federal Law Payroll Staff...

4.1 Multiplying Decimals

Dublin City University Ollscoil Chathair Bhaile Átha Cliath

Deadline for 2017 exhibitors to reserve booth space

Grade 12 Applied Mathematics Achievement Test. Student Booklet

Hospitality user guide

WV INCOME MAINTENANCE MANUAL. WV WORKS Activities/Requirements

A.47=40+7 B.5=0+5 C.44+2=2+44 D.2+3)+6=2+(3+6)

In the Know with OneUSG Connect

Sage 100 Direct Deposit. Getting Started Guide

Problem Solving: Translating Percent Problems 1. 75% % % % % % 0.85

January 23, Top 10 Wage and Hour Compliance Tips

PERSONNEL POLICY MANUAL

Squirrel Professional. Labor Manual October 8, 2013

INSTRUCTIONAL GUIDE. Timekeeping For Non-Exempt RealTime Employees who use a computer to record time MARCH 7, 2017

Steps in Resolving an Ethical Dilemma - Example

Mathematics A Monday 29 October 2012 Paper One Question book

Levelland I.S.D. Payroll Manual

Affinity Group January 8, 2019

Attendance Enterprise

Math Released Item Grade 7. Determine the Missing Values 1319-M21505

Portland General Electric Company First Revision of Sheet No P.U.C. Oregon No. E-18 Canceling Original Sheet No. 26-1

Instructions for Paper Timesheets

Vacation, Sick and Personal Time

7chapter. Making Decisions. 1. a. Hiro s accounting profit is:

Elementary Calculator #1

Cambridge International Examinations Cambridge International General Certificate of Secondary Education

2018 Oklahoma Youth Expo Heifer & Steer Futurity Sale and Showback

Members Guide to Public Holidays and Pay Rates for Christmas and New Year 2016/17 Registered and Licensed Clubs Award 2010

Unit 2 Income. Lesson 1 Salary, Hourly and Overtime Wages. BC Learning Network AW Math 10

POLICY AND PROCEDURE - REIMBURSEMENT OF TRAVEL AND SUBSISTENCE EXPENSES (ALL STAFF) AND COUNSELLING HOURS (SESSIONAL STAFF)

Non-Exempt Employee Biometric Terminal User Guide

ADVERTISING RATE CARD

Assignment 6. A Time Series Analysis 2006 Samuel L. Baker

7 August Enterprise Agreement 2014 to ENTERPRISE AGREEMENT , CLAUSE B4 CASUAL PROFESSIONAL STAFF B4.1 General Principles

Payroll Practices, Records and Outsourcing

TABLE OF CONTENTS. Student Handout 1: Career Pre-Assessment Student Handout 2: Volunteering, Internships, and Job Shadowing

Send an to your tutorial TA that includes the information listed below. Feel free to add anything else you think he/she might be interested in.

December 1, 2015: Warm Up 1. The gov't collects taxes from both businesses and individuals in economic flow. 2. The gov't uses what they collect to

Change in Overtime Regulations - Frequently-Asked Questions

Tuesday 24 June 2014 Morning

4.0 COMPENSATION POLICIES. Ops Manual release date 7/17

PAYROLL-PROCEDURE

Fair Work Ombudsman - Unpaid Work Fact Sheet

Transcription:

Programming Technique 1 Assignment 2 Question 1: Write a program that implement the day of the week in a program. The program should be able to perform the following operations: Set the day. Print the day. Return the day. Return the next day. Return the previous day. Calculate and return the day by adding certain days to the current day. For example, if the current day is Monday and we add 4 days, the day to be returned is Friday. Similarly, if today is Tuesday and we add 13 days, the day to be returned is Monday. Your program should allow the user to input as many day as he wants until he choose to terminate the program. Question 2: Write a program that receive user s inputs today s date as three integers using the day/month/year format, and determines and prints tomorrow s date correctly. Your program should be capable of handling cases such as shown below: I PUT OUTPUT 32 5 1993 Invalid date 31 5 1993 1 6 1993 28 2 1993 1 3 1993 29 2 1993 Invalid date 29 2 1992 1 3 1992 31 12 1993 1 1 1994 30 6 1993 1 7 1993 Your program should allow the user to input as many date as he wants until he choose to terminate the program.

Question 3: Write a program that asks the user to enter today s sale rounded to the nearest RM100 for each of three stores. The program should then display a bar graph comparing each store s sales. Create each bar in the graph by displaying a row of asterisks. Each asterisk should represent RM100 of sales. Your program should also display the store which have the highest sales along with its sales. Input Validation: Do no accept sales figures less tha RM0.00. Here is an example of the program s output. User input is shown in bold. Enter today s sales for store 1: 1000 Enter today s sales for store 2: 1200 Enter today s sales for store 3: 900 Sample Output: DAILY SALES (each * = RM100) Store 1: ********** Store 2: ************ Store 3:********* Store with highest sales: Store 2 Highest Sales: RM1200 Question 4: Write a program that lets the user enter the loan amount and loan period in number of years and displays the monthly and total payments for each interest rate starting from 3.5% to 8%, with an increment of ¼. If you enter the loan amount RM5000 for five years, it will display a table as follows: Loan Amount: 5000 Number of Years: 5 Interest Rate Monthly Payment Total Payment 3.5% 146.51 5274.37

3.75% 147.06 5294.32.. 7.75% 156.1 5619.8 8.0% 156.68 5640.54 Question 5: The monthly payment for a given loan pays the principal and the interest. The monthly interest is computed by multiplying the monthly interest rate and the balance (the remaining principal). The principal paid for the month is therefore the monthly payment minus the monthly interest. Write a program that lets the user enter the loan amount, number of years, and interest rate, then displays the amortization schedule for the loan. If you enter the loan amount RM10000 for one year with an interest rate of 7%, it will display a table as follows. Loan Amount: 10000 Number of Years: 1 Annual Interest Rate: 7% Monthly Payment: RM865.26 Total Payment: RM10383.21 Payment # Interest Principal Balance 1 58.33 806.93 9193.07 2 53.62 811.64 8381.43.. 11 10.0 855.26 860.27 12 5.01 860.25 0.01 Question 6: Write a program that prompts the user to enter the year and first day of the year, and displays the first day of each month in the year on the screen. For example, if the user entered year 2005, and 6 for Saturday, January 1, 2005, your program should display the following output: January 1, 2005 is Saturday December 1, 2005 is Thursday

Question 7: Write an application that keeps track of a student s food purchase at the campus cafeteria. A meal card is assigned to an individual student. When a meal card is first issued, the balance is set to the number of points. If the student does not specify the number of points, then the initial balance is set to 100 points. Points assigned to each food item are a whole number. Every time food items are bought, points are deducted from the balance. If the balance becomes negative, the purchase of food items is not allowed. Question 8: Write an application that displays the results of a series of 50 coin tosses. Use the rand() function (needs #include <cstdlib> ) to generate a number between 0 an 1. After each coin toss, display whether the toss represents heads or tails. If the result is 0.5 or less, the result represents heads ; otherwise, it represents tails. After the 50 tosses are complete, display the percentages of heads and tails. Question 9: Your little sister asks you to help her with her multiplication, and you decide to write a program that test her skills. The program will let her input a starting number, such as 5. It will generate multiplication problem ranging from 5 x 1 to 5 x 12. For each problem, she will be prompted to enter the correct answer. The program should check for her answer and should not let her advance to the next question until the correct answer is given to the current question. Question 10: Write a program that calculates the occupancy rate for a hotel. The program should start by asking the user how many floors the hotel has. A loop should then iterate once for each floor. In each iteration, the loop should ask the user for the number of rooms on the floor and how many of them are occupied. After all the iterations, the program should display how many rooms the hotel has, how many of them are occupied, how many are unoccupied and the percentage of rooms that are occupied. The percentage may be calculated by dividing the number of rooms occupied by the number of rooms. Input Validation: Do not accept a value less than 1 for the number of floors. Do not accept a number less than 10 for the number of rooms on a floor. Question 11: Write a program that will predict the size of population of organisms. The program should ask the user for the starting number of organisms, their average daily population increase (as a percentage), and the number of days they will multiply. A loop should display the size of the population for each day.

Input Validation: Do not accept a number less than 2 for the starting size of the population. Do not accept a negative number of average daily population increases. Do not accept a number less than 1 for the number of days they will multiply. Question 12: Write a program that diplay a series of at least four survey questions; the survey can be on any social or political topic you want, and each question should have at least three possible numericchoice answers. At the end of the survey, ask the user whether he wants to (1) enter another set of responses to the same set of questions, or (2) quit. Continue to accept sets of responses until the user chooses to quit, and then, display the results of the survey for each question indicate how many users chooses the first option, second option, and so on. NOTES: 1. Each group must choose two of the assignments (as your first and second choice) listed above. I will assign the assignment using a first-come-first-serve policy. For example, the first group that email me with the choice of question 3 and question 9 as its second choice will get to do the question 3. But for the second group emailed me with the same choices will get to do the question 9. 2. Please confirm with me the chosen projects together with your group members name via email (radziahm@utm.my) by Saturday (19 ovember 2011). INSTRUCTIONS: 1. This assignment MUST be submitted by Friday (02/12/11) before 4 p.m. at my office. 2. Do this assignment in your Assignment 1 group. 3. For the solution, you are required to develop pseudo code, flowchart and C++ code. 4. Each group must submit a hardcopy (pseudo code, flowchart, C++ code and a sample of running - send to my office), team evaluation form (hardopy enclosed in the report) and softcopy (via e-learning) of the C++ program. 5. Failure to submit this assignment on time will cost you 5 marks/day. 6. Copying/Plagiarism in whatever form is strictly prohibited. No marks will be given (zero) to all involved parties if caught copying other s assignment(s).