Assignment 3 – Procedural
Programming
TABLE OF CONTENTS
1 Design.......................................................................................................................................................1
1.1 Specifications.....................................................................................................................................1
1.2 Code Design.......................................................................................................................................2
1.2.1 Flowchart....................................................................................................................................3
1.2.2 Pseudocode................................................................................................................................4
1.3 Input, Processing and Output Chart...................................................................................................4
2 Program....................................................................................................................................................6
2.1 Code...................................................................................................................................................6
2.2 Running Program...............................................................................................................................8
1 DESIGN
1.1 SPECIFICATIONS
I have been asked to create a program for a decorator that will calculate the cost of painting a room
depending on their choice of paint and the size of the room. The program will allow the decorator/user
to enter the height of the room. It will then ask for them to enter the width of each wall in the room.
This system will then calculate what the area if the room is. After which the user will be able to select
their choice of paint (expensive, medium, and cheapest) as well as whether they want undercoat or not.
And after all this the program will display a bill which has all the items and what the total cost turns out
to be.
This program should not take a lot of time to complete as it isn’t complex or long. I will be splitting it up
in sections, so that calculating the area will be programmed in one section and calculating the cost in
another. The program shouldn’t be error prone due to its simplicity, which is another reason it will not
take long to program. The program will also be text based as there will be no need for a graphical user
interface because all of the user interactions can be done through typing in text.
Timeline:
Section Time
Calculating the area of the room 10 minutes
Choosing paint quality and undercoat 15 minutes
Calculating the total and displaying a bill 15 minutes
Yonkov, Boyan