6.10 Exercises


6.10 Exercises

  1. Write an algorithm in informal pseudo-code to compute the perimeter of a triangle.

  2. Write the flowchart description for the problem to compute the perimeter of a triangle.

  3. Write a complete KJP program for computing the area of a triangle. Use only two classes.

  4. Write a complete algorithm in pseudo-code that computes the average of grades for students.

  5. Write the complete KJP program for the problem that computes the grades of students.

  6. Write an algorithm in informal pseudo-code that calculates a bonus for employees; the bonus is calculated to be 1.75% of the current salary.

  7. Write the complete program in KJP for the problem that calculates a bonus for employees. Use only assignment and input/output statements.

  8. Write an algorithm in flowchart and in informal pseudo-code to compute the conversion from inches to centimeters.

  9. Write an algorithm in flowchart and in informal pseudo-code to compute the conversion from centimeters to inches.

  10. Write an algorithm in flowchart and in informal pseudo-code to compute the conversion from a temperature reading in degrees Fahrenheit to Centigrade.

  11. Write a complete algorithm in form of a flowchart and informal pseudo-code to compute the conversion from a temperature reading in degrees Centigrade to Fahrenheit.

  12. Write a complete program in KJP to compute the conversion from inches to centimeters.

  13. Write a complete program in KJP to compute the conversion from centimeters to inches.

  14. Write a complete program in KJP to compute the conversion from a temperature reading in degrees Fahrenheit to Centigrade.

  15. Write a complete program in KJP to compute the conversion from a temperature reading in degrees Centigrade to Fahrenheit.

  16. Write a complete program in KJP that combines the conversions from inches to centimeters and from centimeters to inches.

  17. Write a complete program in KJP that combines the two types of temperature conversion.

  18. Write a complete program in KJP that combines the calculation of the perimeter and the area of a triangle.




Object-Oriented Programming(c) From Problem Solving to Java
Object-Oriented Programming (From Problem Solving to JAVA) (Charles River Media Programming)
ISBN: 1584502878
EAN: 2147483647
Year: 2005
Pages: 184

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net