1
- (10 pionts) Write an algorithm (in Pseudocode) for a program that computes the cost of painting and installing carpet in a room. Assume the room has one door, one windows and one bookshelf (built into the wall and not painted). Your program should do the following:
– Output the cost of painting the room, and the square footage to paint
– Output the cost of carpeting the room, and the square footage to be carpeted
- (30 points total) Given:
int x=1, m=2, h=3;
long z= 9; long w = 0;
double n = 5.0, y = 4.0;
Which of the following assignments are valid. If an assignment is not valid state the reason. If the assignment is valid show the result of the calculation, and your work to derive the answer . NOTE assume that the effect of these assignment statements are not accumulative.
- y = (z * 4 / 3) % 5;
- n += 17 / 7;
- y = h * 3.5 + 8 / 3;
- m = (int) (15.5 * 2 – z/3);
- x = m * 2 / 3 – h % 4;
- w = h + (--x) + m++;
3. (10 points) For problem P4.12 on page 174 of your text, give a valid Java expression (s) for the set of arithmetic calculations given in the problem. An entire program is not necessary
11 years ago
20
Answer(1)![blurred-text]()
![]()
Purchase the answer to view it

NOT RATED
- 10_pionts.docx
Bids(0)
other Questions(10)
- Assignment 4
- FMT8 Problem: Capital Gains - Magma Corporation
- week 3 - for xoon only
- A-plus writer
- ACC 561 Assignment Week 4 Costing Methods Paper
- ACC 543 GUILLERMO CASE STUDY CAPITAL BUDGET RECOMMENDATION
- ACC 225 Week 1 CheckPoint Financial Statements
- Jonas Inc. is trying to decide whether to lease or purchase a piece of equipment needed for the next ten...
- Recognizing Differences
- Emphysema short research