Java Assignment 1
Java Assignment 1
Assignment - In progress
Title
Due
Status
Grade Scale
Instructions
1. Write a program to find the difference between sum of the squares and the square of the sums
of n numbers?
2. Develop a program that accepts the area of a square and will calculate its perimeter.
3. Develop the program calculateCylinderVolume., which accepts radius of a cylinder's base disk
and its height and computes the volume of the cylinder.
4. Utopias tax accountants always use programs that compute income taxes even though the tax
rate is a solid, never-changing 15%. Define the program calculateTax which determines the tax
on the gross pay. Define calculateNetPay that determines the net pay of an employee from the
number of hours worked. Assume an hourly rate of $12.
5. An old-style movie theater has a simple profit program. Each customer pays $5 per ticket.
Every performance costs the theater $20, plus $.50 per attendee. Develop the program
calculateTotalProfit that consumes the number of attendees (of a show) and calculates how much
income the show earns.
6. Develop the program calculateCylinderArea, which accepts radius of the cylinder's base disk
and its height and computes surface area of the cylinder.
7. Develop the program calculatePipeArea. It computes the surface area of a pipe, which is an
open cylinder. The program accpets three values: the pipes inner radius, its length, and the
thickness of its wall.
8. Develop the program calculateHeight, which computes the height that a rocket reaches in a
given amount of time. If the rocket accelerates at a constant rate g, it reaches a speed of g t in t
time units and a height of 1/2 * v * t where v is the speed at t.
9. Develop a program that computes the distance a boat travels across a river, given the width of
the river, the boat's speed perpendicular to the river, and the river's speed. Speed is distance/time,
and the Pythagorean Theorem is c2 = a2 + b2.
10. Develop a program that accepts an initial amount of money (called the principal), a simple
annual interest rate, and a number of months will compute the balance at the end of that time.
Assume that no additional deposits or withdrawals are made and that a month is 1/12 of a year.
Total interest is the product of the principal, the annual interest rate expressed as a decimal, and
the number of years.
Please zip your files and upload it. You can submit only one file.