analyis solution

profileshanta75
MISY_3433_HW111.docx

3433-001: Java Applications in Business

Homework#1

(Grading: 8pts per question)

Name:______________________________________________

1. A painter wants to know the amount of paint needed to paint the interior walls in a room. The walls have the same dimensions (height and width). The room has one door, and two windows of equal dimensions. The door and the windows will not be painted. The chosen paint covers 100 square feet per gallon.

Develop a solution (analysis and flowchart) to compute and display the amount of paint.

2. Sharon would like to know how much gas will cost for her to take a round trip to her vacation home 180 miles away. She knows that the average price of gas and the average miles per gallon for her car.

Develop a solution (analysis and flowchart) to compute and display the cost of the gas.

3. Set up the following equations in the computer form:

a.

b.

c.

4. Evaluate the following equations, given A=5, B=2, C=True, D=False

a. R = A + 3 > B – 1 AND C OR D

b. R= NOT C OR D OR A – 3 B

c. R= NOT (A < B) AND (C OR D)

5. Construct the truth table for each of the following:

a. R = (A OR B) AND NOT C

b. R = (A AND B) OR NOT C

1