You are on page 1of 3

1) Michael is selling hotdogs and burgers for

lunch. The cost of a hot dog is $8.00. The cost


of a burger is $15.00. Michael needs to be able
to be able to calculate a customer’s bill based
on how many hot dogs and burgers they
ordered. Michael will like to print a receipt
which will indicate the customer’s name, the
total number of hot dogs purchased, number of
burgers purchased and also a short note at the
base of the receipt saying “Thank you for your
support.” If the total on the bill is greater than
$23.00, Michael will like to also print “You have
gotten a free drink!” If the total is more than
$31.00, Michael will like to print “You have
gotten a free drink and hot dog!”

Please generate: 1) The IPO chart for Michael’s


problem.
2) The pseudocode for this
problem.
3) A truth table for this
pseudocode.

2) Victor is a paint salesman at Kaleidoscope. He works in the showroom assisting customers determine
how much paint they require. Victor is required to output the customer’s name and the colour of paint
selected by the customer. He is also required to output the square footage of the room and also the
amount of paint required by the customer (in gallons). Assuming the room has 4 walls, Victor has to add
the sq. footage of each wall to calculate the total square footage of the room to be painted. The sq.
footage of 1 wall is the (length of the wall) X (height of the wall). EG: a wall measuring 10 ft in length by
8 ft in height will have a sq. footage of 80 ft 2. Victor has to find the sq. footage of wall1, wall2, wall3 and
wall4 and add them together to calculate the sq. footage of the room. Therefore he will need to enter
the length and height of each of the 4 walls to perform these calculations. For every 360 ft 2 the
customer has to purchase 1 gallon of paint. The total amount of paint required is calculated by using the
formula: (sq. footage of the room) / 360. The sq. footage of the room is calculated by adding the sq.
footage of each of the 4 walls together.

Please generate: 1) The IPO chart for Michael’s problem.

2) The pseudocode for this problem.

3) A truth table for this pseudocode.

Convert from decimal to binary: 1) 397 10

2) 6319 10

Convert from decimal to octal: 772110

Convert to decimal from octal: 55268

Convert from decimal to hexadecimal: 6423 10

Convert from hexadecimal to decimal: AB2F16

You might also like