0% found this document useful (2 votes)
307 views1 page

Case Study 1

This document contains 5 case studies describing programming problems and examples: 1) A program to calculate income tax based on taxable income and exemptions. 2) A program to convert a time in 24-hour format to 12-hour format. 3) A program to output the day of the week given a date between 1-31. 4) A program to calculate the net cost of a car including options and payment plans. 5) A program to calculate a customer's total bill for fruit purchases including type and quantity.

Uploaded by

Ji Young
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (2 votes)
307 views1 page

Case Study 1

This document contains 5 case studies describing programming problems and examples: 1) A program to calculate income tax based on taxable income and exemptions. 2) A program to convert a time in 24-hour format to 12-hour format. 3) A program to output the day of the week given a date between 1-31. 4) A program to calculate the net cost of a car including options and payment plans. 5) A program to calculate a customer's total bill for fruit purchases including type and quantity.

Uploaded by

Ji Young
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

Case Study 1:

1. Income tax is computed based on net taxable income. The income tax table is as follows:
Net Taxable Income (NTI) Tax Due
Below 2,500 P0
At least 2,500 but below 5000 P100 + 3% of NTI
At least 5,000 but below 10,000 P175 + 5% of NTI
At least 10,000 but below 25,000 P425 + 8% of NTI
At least 25,000 but below 50,000 P1625 + 13% of NTI
At least 50,000 P4875 + 25% of NTI

Make a program that would input the gross income and tax exemption and then output
the tax due. (Net taxable income equals gross minus tax exemption).

2. Write a program that reads in a time of day in 24-hr notation and output it in 12-hr
notation. For example, if the input is 1345, the output should be 1:45 PM. If input is 920,
output should be 9:20 AM. Consider 1200 midnight as 12:00 AM and 2400 noon as 12:00
PM.

3. It is known that January 2006 starts on Sunday. Make a program that would input a
numeric day (between1 and 31) and output the day of the week the day falls. For
example, if 4 is entered for the day, the program must display "WEDNESDAY", if 8 was
entered, "SUNDAY" must be displayed and so on.

4. The cost of a brand new car is P420,000 for GL model and P398,000 for XL model. If a
car phone will be installed, an additional P40,000 will be added to the cost. Moreover, a
15% discount on the total cost will be given if the buyer pays in full (not installment).
Write a program that would input the car model bought whether with car phone (use code
"W" for car with car phone and "O" for without car phone) and whether it will be paid in full
(use code "F" for full payment and "I" for installment). Program must then output the net
cost of the car.

5. Store of Asia sells the following:


Fruit Code Fruit Name Local Imported
G GUAVA P4.50 per piece P25.50 per piece
A AVOCADO P75.50 per dozen P250.00 per dozen
P POMELO P75.00 per half dozen P100.00 per half dozen
M MANGO P50.00 per piece P60.00 per piece
Y PAPAYA P23.00 per piece P25.00 per piece

Write a program that would input fruit code bought by the customer, its type code ("I" for
imported and "L" for local), and the quantity. Program must then output the customer's
total bill.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy