3 easy java homeworks
HOMEWORKS due for sunday afternoon/Assign4 (1).docx
Java Assignment Ch4
(Please zip your .java, .class, and screenshots of the results in a folder, and attach to the assignments on Angel.)
4.1 (Counting positive and negative numbers and computing the average of numbers)
Write a program that reads an unspecified number of integers, determines how many positive and negative values have been read, and computes the total and average of the input values (not counting zeros). Your program ends with the input 0. Display the average as a floating-point number. Here is a sample run:
4.7 (Financial application: computing future tuition)
Suppose that the tuition for a university is $10,000 this year and increases 5% every year. Write a program that computes the tuition in ten years and the total cost of four years’ worth of tuition starting ten years from now.
Tuition in ten years is 16288.946267774418 The four-year tuition in ten years is 70207.39453239122