Programming Homework Help

Programming Homework Help. help and guidance with questions

 

Chapter 3 Pg 72 Exercise 6

Builders Inc. wants a program that allows its salesclerks to enter the

diameter of a circle and the price of railing material per foot. The program

should calculate and display the total price of the railing material. Use

3.1416 as the value of pi. First, create an IPO chart for this problem, and

then desk-check the algorithm twice. For the first desk-check, use 35 feet as

the diameter and $2 as the price per foot. For the second desk-check, use 15.5

and $3.50. After desk-checking the algorithm, list the input, processing, and

output items in a chart similar to the one shown in Figure 3-25, and then

enter the appropriate C++ declaration statements.

Chapter 4 Pg 107 Exercise 11

Jacob Weinstein wants a program that displays his savings account balance at

the end of the month, given the beginning balance, total deposits, and total

withdrawals.

a. Using the chart shown earlier in Figure 4-12 as a guide, enter the input,

processing, and output items, as well as the algorithm, in the first column.

b. Desk-check the algorithm twice. For the first desk-check, use 2545.75,

409.43, and 210.65 as the beginning balance, total deposits, and total

withdrawals. For the second desk-check, use 1125.33, 23, and 800.94.

c. Enter the C++ instructions in the second column of the chart, and then

desk-check the program using the same data used to desk-check the algorithm.

d. If necessary, create a new project named Introductory11 Project, and save

it in the Cpp8Chap04 folder. Enter your C++ instructions into a source file

named Introductory11.cpp. Also enter appropriate comments and any additional

instructions required by the compiler. Test the program using the same data

used to desk-check the program.

Chapter 4 Pg 108 Exercise 14

Silvia’s Pizzeria sells four different sizes of pizzas: small, medium, large,

and family. The manager of the pizzeria wants a program that displays the

total number of pizzas sold, as well as the percentage of the total number

contributed by each different size.

a. Using the chart shown earlier in Figure 4-12 as a guide, enter the input,

processing, and output items, as well as the algorithm, in the first column.

b. Desk-check the algorithm twice. For the first desk-check, use 25, 50, 50,

and 75 as the numbers of small, medium, large, and family pizzas. For the

second desk-check, use 30, 25, 85, and 73. Record the percentages with one

decimal place.

c. Enter the C++ instructions in the second column of the chart, and then

desk-check the program using the same data used to desk-check the algorithm.

d. If necessary, create a new project named Intermediate14 Project, and save

it in the Cpp8Chap04 folder. Enter your C++ instructions into a source file

named Intermediate14.cpp. Also enter appropriate comments and any additional

instructions required by the compiler. Test the program using the same data

used to desk-check the program.

Input:

Number of small

pizzas

Number of medium

pizzas

Number of large

pizzas

Number of family

pizzas

Processing:

Processing items: total number of

pizzas percentage of pizzas sold my

category

Algorithm

1.

Enter the number of pizzas

sold and by category.

2.

Calculate the total number of

pizzas sold.

3.

Calculate the percentage of

each category sold.

4.

Display the total number of

pizzas sold and the percentage

by category.

Output:

Total number of

sold pizzas

Percentage of sold

pizzas by category

Small Pizzas

Medium

Pizzas

Large

Pizzas

Family

Pizzas

Total

1

st

desk-

check

25

50

50

75

200

Percentage

12.5%

25%

25%

37.5%

100%

2

nd

desk-

check

30

25

85

73

213

Percentage

15%

11.5%

40%

33.5%

100%

Chapter 3 Pg 72 Exercise 4

Aaron Lakely is going to the grocery store to buy some bananas and apples,

both of which are sold by the pound. He wants a program that calculates and

displays the total cost of his order, including a 3% sales tax. First, create

an IPO chart for this problem, and then desk-check the algorithm twice. For

the first desk-check, use 2 and 3.5 as the number of pounds of bananas and

apples, respectively. And use $0.99 and $1.89 as the price per pound of

bananas and apples, respectively. For the second desk-check, use your own set

of data. After desk-checking the algorithm, list the input, processing, and

output items in a chart similar to the one shown in Figure 3-25, and then

enter the appropriate C++ declaration statements

Programming Homework Help