 # Computer Science Project List

In order to be considered complete, all programs must:

• Be tested with a range of data, both valid and invalid
• Be properly indented to show structure

1. Write a program to calculate the area of a circle, given the radius and using the square function.
2. Write a program to calculate the volume of a sphere given the radius.
3. Write a program to divide two input numbers, and handle the case where the denominator is zero. Hint: need if-then-else.
4. Write a program to compare two input numbers, and output the larger of the two or a statement indicating they are equal.
5. Write a program to calculate the factors of a quadratic equation, given the coefficients (a, b, and c). Be sure to handle cases where the denominator is zero and the value under the radical is negative. Hint: need nested if-then-else.
6. Write a program to calculate the weekly pay given the hours worked and pay rate. Time worked over 40 hours is overtime, and is paid at 1.5 times the rate.
7. Write a program that converts an input number grade into a letter grade. Assume a 10 point scale (e.g., 100 = a, 90 = a, 89 = b, 80 = b). Use nested if-then-else statements.
8. Write a program that converts an input number grade into a letter grade. Assume a 10 point scale (e.g., 100 = a, 90 = a, 89 = b, 80 = b). Use a case statement. Hint: 100 div 10 = 10; 95 div 10 = 9.
9. Write a program to convert the input date (month and day) to the day of the year (e.g., 1/15 = 15, 2/10 = 41, 12/31 = 365). Assume no leap years.
10. Write 3 programs to calculate the mean of 10 input numbers. Each program must use a different looping technique: while ... Do, repeat ... Until, for ... To ... Do.
11. Select one of the looping techniques, and write a program to compute the mean of 10 input number grades (0 through 100), some of which may be invalid (i.e., outside the range). Hint: two counters – one for the loop and one for the valid data.
12. Write a program to calculate the mean of an unknown number of grades, where the first input number is the number of grades to follow. Hint: variable upper bound for the loop counter.
13. Write a program to find the highest value among the input numbers, where the first number is the number of values to follow.
14. Modify the last program to use an array.

The class is project-oriented. Lessons are reinforced through exercises that allow the student to design and create programs, debug these, and run programs that generate results. Modern PC systems are used along with Microsoft Windows-compatible application development tools.