- 797 step-by-step solutions
- Solved by professors & experts
- iOS, Android, & web

- Question : 1.1PE - (Display three messages) Write a program that displays Welcome to Java, Learning Java Now, and Programming is fun.
- Question : 1.2PE - (Display five messages) Write a program that displays I love Java five times.
- Question : 1.3PE - (Display a pattern) Write a program that displays the following pattern: J J aaa v vaaa J J aa v v a a J aaaa v aaaa
- Question : 1.4PE - (Print a table) Write a program that displays the following table: a a^2 a^3 a^4 1 1 1 1 2 4 8 16 3 9 27 81 4 16 64 256
- Question : 1.5PE - (Compute expressions) Write a program that displays the result of 7.5 * 6.5 - 4.5 * 3 47.5 - 5.5
- Question : 1.6PE - (Summation of a series) Write a program that displays the result of 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10.
- Question : 1.7PE - (Approximate p) p can be computed using the following formula: p = 4 *
- Question : 1.8PE - (Area and perimeter of a circle) Write a program that displays the area and perimeter of a circle that has a radius of 6.5 using the following formula: p = 3.14159 perimeter = 2 * radius * p area = radius * radius * p
- Question : 1.9PE - (Area and perimeter of a rectangle) Write a program that displays the area and perimeter of a rectangle with a width of 5.3 and height of 8.6 using the following formula: area = width * height perimeter = 2 * (width + height)
- Question : 1.10PE - (Average speed in miles) Assume that a runner runs 15 kilometers in 50 minutes and 30 seconds. Write a program that displays the average speed in miles per hour. (Note that 1 mile is 1.6 kilometers.)
- Question : 1.11PE - (Population projection) The U.S. Census Bureau projects population based on the following assumptions: ?? One birth every 7 seconds ?? One death every 13 seconds ?? One new immigrant every 45 seconds Write a program to display the population for each of the next five years. Assume that the current population is 312,032,486, and one year has 365 days. Hint: In Java, if two integers perform division, the result is an integer. The fractional part is truncated. For example, 5 / 4 is 1 (not 1.25) and 10 / 4 is 2 (not 2.5). To get an accurate result with the fractional part, one of the values involved in the division must be a number with a decimal point. For example, 5.0 / 4 is 1.25 and 10 / 4.0 is 2.5.
- Question : 1.12PE - (Average speed in kilometers) Assume that a runner runs 24 miles in 1 hour, 40 minutes, and 35 seconds. Write a program that displays the average speed in kilometers per hour. (Note 1 mile is equal to 1.6 kilometers.)
- Question : 1.13PE

**Subscribe** to our unlimited Q&A, textbook solutions manual and ask 50 new questions at **just $3/month!**

## Customer reviews

No reviews.