You are on page 1of 7

MP1 - Machine Problem 1

Program 1
This program computes the interest earned on 17,000 pesos with an interest rate of .70
a year. The interest and the value of the investment after one year are printed to
standard output.

Output

This study source was downloaded by 100000820072985 from CourseHero.com on 09-26-2022 20:35:13 GMT -05:00

https://www.coursehero.com/file/89248331/MP1docx/
Program 2
Create a program that will compute the diameter, circumference, and area of a circle
with a radius of 10. (Pi = 3.1416 declared as constant value).
Diameter = 2 * Radius
Circumference = 2 * Pi * Radius
Area = Pi * Radius * Radius

Output

This study source was downloaded by 100000820072985 from CourseHero.com on 09-26-2022 20:35:13 GMT -05:00

https://www.coursehero.com/file/89248331/MP1docx/
Program 3
Create a program that will input the following data: Employee Number, Employee
LastName, Employee FirstName, Rate per hour, Number of Hours Worked. Compute
and output the Gross Pay, SSS Deduction, Tax Withhold, Total Deduction, Net Pay.
(Use JOptionPane)

Output

This study source was downloaded by 100000820072985 from CourseHero.com on 09-26-2022 20:35:13 GMT -05:00

https://www.coursehero.com/file/89248331/MP1docx/
Create a program that will input for the following data: (Using Scanner)

 Student Name, Course


 Grade in Quiz, Seatwork, Laboratory Exercises and Prelim
 Compute and output the Prelim Grade.

Prelim Grade = Quiz * 25% + Seatwork * 20% + Lab. Exercise * 25% +


Prelim Exam * 30%

This study source was downloaded by 100000820072985 from CourseHero.com on 09-26-2022 20:35:13 GMT -05:00

https://www.coursehero.com/file/89248331/MP1docx/
Program 4

This study source was downloaded by 100000820072985 from CourseHero.com on 09-26-2022 20:35:13 GMT -05:00

https://www.coursehero.com/file/89248331/MP1docx/
Output

This study source was downloaded by 100000820072985 from CourseHero.com on 09-26-2022 20:35:13 GMT -05:00

https://www.coursehero.com/file/89248331/MP1docx/
I added the pass or fail output to make the program more realistic.

This study source was downloaded by 100000820072985 from CourseHero.com on 09-26-2022 20:35:13 GMT -05:00

https://www.coursehero.com/file/89248331/MP1docx/
Powered by TCPDF (www.tcpdf.org)

You might also like