Designing an Interactive Help System for Painting Room
VerifiedAdded on 2019/09/16
|15
|2293
|64
Report
AI Summary
The assignment is about creating a program that helps users calculate the cost of painting their room. The program takes into account various factors such as the length, height, and quality of paint, as well as the need for undercoat. It also has an interactive help system that provides guidance to users throughout the process.
Contribute Materials
Your contribution can guide someone’s learning journey. Share your
documents today.
TASK 3:
Input: length of room,height of room, quality of paint,needed undercoat or not
output:cost of painting
user need:user should know what quality of paint he/she needs and whether he wants
extra undercoat or not,also he should know height and length of the room
processes: we first calcualte the area using height and length and then multiply the
area with the cost of paint and add the cost of undercoat if it is to be applied
purpose: purpose is to know the cost of paint needed to paint the room
Pseudo Code
Input->length
Input-> height
Input->choice of paint quality(1,2 or 3)
Input->undercoat paint choice(1 for yes , 0 for no)
call function find_cost(length,height,choice of paint quality,undercoat paint
choice) //thsi function returns the cost of painting
print->cost
end
Pseudo Code for function
find_cost(ength,height,choice of paint quality,undercoat paint choice)
calculate area->2*length*length+4*height*length
//choose paint quality cost
if choice of paint quality=1
then cost=1.75 per sq metre
if choice of paint quality=2
then cost=1.00 per sq metre
if choice of paint quality=3
then cost=1.45 per sq metre
// undercoat paint choice
total cost= cost*area;
if undercoat paint choice=1
then total cost=total cost+0.50*area
return total cost
User Interface :
user interface is included in code to make the program more user friendly
1) user is first asked about the length of the room he/she intend to paint
2) then he is asked to enter the height of the room
3) there are 3 types of quality of paint which can be chosen
from :luxury,standard,economic ,luxury being the costliest and economic being the
least quality
4)also user has the freedom to choose whether he wants an undercoating or not
Input: length of room,height of room, quality of paint,needed undercoat or not
output:cost of painting
user need:user should know what quality of paint he/she needs and whether he wants
extra undercoat or not,also he should know height and length of the room
processes: we first calcualte the area using height and length and then multiply the
area with the cost of paint and add the cost of undercoat if it is to be applied
purpose: purpose is to know the cost of paint needed to paint the room
Pseudo Code
Input->length
Input-> height
Input->choice of paint quality(1,2 or 3)
Input->undercoat paint choice(1 for yes , 0 for no)
call function find_cost(length,height,choice of paint quality,undercoat paint
choice) //thsi function returns the cost of painting
print->cost
end
Pseudo Code for function
find_cost(ength,height,choice of paint quality,undercoat paint choice)
calculate area->2*length*length+4*height*length
//choose paint quality cost
if choice of paint quality=1
then cost=1.75 per sq metre
if choice of paint quality=2
then cost=1.00 per sq metre
if choice of paint quality=3
then cost=1.45 per sq metre
// undercoat paint choice
total cost= cost*area;
if undercoat paint choice=1
then total cost=total cost+0.50*area
return total cost
User Interface :
user interface is included in code to make the program more user friendly
1) user is first asked about the length of the room he/she intend to paint
2) then he is asked to enter the height of the room
3) there are 3 types of quality of paint which can be chosen
from :luxury,standard,economic ,luxury being the costliest and economic being the
least quality
4)also user has the freedom to choose whether he wants an undercoating or not
Secure Best Marks with AI Grader
Need help grading? Try our AI Grader for instant feedback on your assignments.
5) the output cost is displayed to the user based on his choice of inputs above
Screenshots of running program:
Code Print :
Screenshots of running program:
Code Print :
With Help System Included
Explanation :
In the code the user is given choice whether he wants help or not.
The help system provides help to user in two ways:
Explanation :
In the code the user is given choice whether he wants help or not.
The help system provides help to user in two ways:
1) if the user wants to know the cost of different qualities of paint he can press 1 to do
2) if the user wants to know the difference in cost when he chooses undercoat paint
he can press 2 for this
Again the user is asked if he wants to exit help system , the user can choose to exit. If
he doesn’t exit then again he is taken to the same procedure described above. If he
exists the help system, the final cost of painting will be calcualted and shown to him
as output as done in previous code
Screenshot of running program with help system :
Code print with help system included
2) if the user wants to know the difference in cost when he chooses undercoat paint
he can press 2 for this
Again the user is asked if he wants to exit help system , the user can choose to exit. If
he doesn’t exit then again he is taken to the same procedure described above. If he
exists the help system, the final cost of painting will be calcualted and shown to him
as output as done in previous code
Screenshot of running program with help system :
Code print with help system included
Secure Best Marks with AI Grader
Need help grading? Try our AI Grader for instant feedback on your assignments.
Tools:
1)Ubuntu 16.04
2)For compiling and running tool used :Ubuntu terminal
->g++ task3.cpp
->./a.out
3)IDE used : Geany in Ubuntu
4)language : c++
Reasons for the tools and techniques used:
Using ubuntu it was easier to directly see the output in terminal without using any
IDE though i used Geany for code print .The screenshots of running code is of the
terminal.The choice of language was done based on ease of writing code and proper
documentation which can be done.
support and maintenance:
1)Ubuntu 16.04
2)For compiling and running tool used :Ubuntu terminal
->g++ task3.cpp
->./a.out
3)IDE used : Geany in Ubuntu
4)language : c++
Reasons for the tools and techniques used:
Using ubuntu it was easier to directly see the output in terminal without using any
IDE though i used Geany for code print .The screenshots of running code is of the
terminal.The choice of language was done based on ease of writing code and proper
documentation which can be done.
support and maintenance:
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
For technical support to others already comments are mentioned at all possible
places.The code can be changed according to the costs at the time user is looking for
painting options .This can be changed by any programmer afterwards also as the
program is properly commented.the maintenance according to user’s demand can also
be done in help system including new help options like adding option for new paint
quality or any additional new features similar to undercoat which will be extras for
user to choose from.
TASK 4
Flowchart :
The program takes user choices many times and so there are different paths through
which program can proceed which is described in flowchart below :
Help system
Enter length
Enter height
Enter choice of paint quality
Undercoat paint
Luxury EconomicStandard
Cost Cost Cost
Calculate area
Help needed
places.The code can be changed according to the costs at the time user is looking for
painting options .This can be changed by any programmer afterwards also as the
program is properly commented.the maintenance according to user’s demand can also
be done in help system including new help options like adding option for new paint
quality or any additional new features similar to undercoat which will be extras for
user to choose from.
TASK 4
Flowchart :
The program takes user choices many times and so there are different paths through
which program can proceed which is described in flowchart below :
Help system
Enter length
Enter height
Enter choice of paint quality
Undercoat paint
Luxury EconomicStandard
Cost Cost Cost
Calculate area
Help needed
Test Plan
The test plan will include taking all the corner cases and paths.Some test cases are:
1)
length=2
height=3
paint quality=1
undercoat=0
output:
cost=£56
2)
length=4
height=3
paint quality=2
undercoat=1
output:
cost=£120
3) with help included
length=2
height=3
paint quality=1
undercoat=1
help=1
help choice=1
exit help or not=0
Yes No
Enter 1 or 2 depending on your help choice
1 2
Display difference in cost withundercoat paintDisplay the cost of different qulity of paint
Help needed
exit
The test plan will include taking all the corner cases and paths.Some test cases are:
1)
length=2
height=3
paint quality=1
undercoat=0
output:
cost=£56
2)
length=4
height=3
paint quality=2
undercoat=1
output:
cost=£120
3) with help included
length=2
height=3
paint quality=1
undercoat=1
help=1
help choice=1
exit help or not=0
Yes No
Enter 1 or 2 depending on your help choice
1 2
Display difference in cost withundercoat paintDisplay the cost of different qulity of paint
Help needed
exit
help choice=2
exit help or not=1
output:
cost=£72
We can calculate manually to verify the results obtained in the test cases.
Test name Test data purpose Expected
results
Actual
results
Quality of
paint test
length=2
height=3
paint
quality=1
undercoat=0
To test
whether our
switch case
is working
properly or
not to give
us properly
the results
of the choice
of paint
cost=£56 cost=£56
Undercoat
paint test
length=4
height=3
paint
quality=2
undercoat=1
To test
whether the
undercoat
selection =1
works and
we are able
to add the
undercoat
extra cost
cost=£120 cost=£120
Help system
test
length=2
height=3
paint
quality=1
undercoat=1
help=1
Testing
whether we
are able to
go to help
system or
not on
cost=£72 cost=£72
exit help or not=1
output:
cost=£72
We can calculate manually to verify the results obtained in the test cases.
Test name Test data purpose Expected
results
Actual
results
Quality of
paint test
length=2
height=3
paint
quality=1
undercoat=0
To test
whether our
switch case
is working
properly or
not to give
us properly
the results
of the choice
of paint
cost=£56 cost=£56
Undercoat
paint test
length=4
height=3
paint
quality=2
undercoat=1
To test
whether the
undercoat
selection =1
works and
we are able
to add the
undercoat
extra cost
cost=£120 cost=£120
Help system
test
length=2
height=3
paint
quality=1
undercoat=1
help=1
Testing
whether we
are able to
go to help
system or
not on
cost=£72 cost=£72
Secure Best Marks with AI Grader
Need help grading? Try our AI Grader for instant feedback on your assignments.
help
choice=1
exit help or
not=0
help
choice=2
exit help or
not=1
pressing 1
when asked
and whether
we are able
to
successfully
come out or
not
Standard
quality test
length=2
height=3
paint
quality=2
undercoat=1
To test
whether we
are able to
go
through
standard
quality paint
option
cost=£42 cost=£42
2nd option
help test
length=2
height=3
paint
quality=1
undercoat=1
help=1
help
choice=2
exit help or
not=0
help
choice=2
exit help or
not=1
To test the
2nd help
option in
while we
calculate the
difference
and hence
see if the
difference is
right or not
cost=£72 cost=£72
Data dictionary -
length : length of room,
height : height of room,
type: quality of paint (1, 2, 3)
extra : needed undercoat or not (1 ,0)
help :help needed or not(1, 0)
exit : if user wants to exit help system or not (1,0)
helpchoice : to choose between two help choices (1 , 2)
choice=1
exit help or
not=0
help
choice=2
exit help or
not=1
pressing 1
when asked
and whether
we are able
to
successfully
come out or
not
Standard
quality test
length=2
height=3
paint
quality=2
undercoat=1
To test
whether we
are able to
go
through
standard
quality paint
option
cost=£42 cost=£42
2nd option
help test
length=2
height=3
paint
quality=1
undercoat=1
help=1
help
choice=2
exit help or
not=0
help
choice=2
exit help or
not=1
To test the
2nd help
option in
while we
calculate the
difference
and hence
see if the
difference is
right or not
cost=£72 cost=£72
Data dictionary -
length : length of room,
height : height of room,
type: quality of paint (1, 2, 3)
extra : needed undercoat or not (1 ,0)
help :help needed or not(1, 0)
exit : if user wants to exit help system or not (1,0)
helpchoice : to choose between two help choices (1 , 2)
cost : cost of painting
area : area of room to be painted
Feedback from other users -
User1 feedback : The help system is really interactive and covers all sort of choice of
help a user may need in this program.The user directions are given at each and every
to avoid the user from coding . the output is also very clear and precise.
User 2 feedback : The Program is simple and easy to use.
User 3 feedback : the progrm is easy to understand with functions properly defined
User 4 feedback : all the choices are asked in numbers .this is really a special and
easy which which saves the user from writng long choices again and again . This also
makes testing easy
User 5 feedback :The switch case makes the code look clean, descent and indented
also the code is really in sequence while giving choices and the user help system
really works awesome.
Checks against the original specifications –
The original specification were:
height of the room (between 2 and 6 metres), then the length of all four walls
(minimum 1 metre; Maximum 25 metres) : this is being taken care of wile
taking the input from the user . it has been mentioned in code using cout before
the user enter his details and choices
"enter length of room (between 1 and 25 metres)”
"enter height of room (between 2 and 6 metres)"
The program allows a choice of three paints:
o Luxury quality which cost £1.75 per square metre
o Standard quality which costs £1.00 per square metre.
o Economy quality which costs £0.45 per square metre
This choice has been given using 3 number options 1,2 & 3 for the ease of
user.
The decorator is also be able to choose to use undercoat paint if required,
which costs an additional £0.50 per square metre by pressing 1 or 0 whatever
he wants accordingly
area : area of room to be painted
Feedback from other users -
User1 feedback : The help system is really interactive and covers all sort of choice of
help a user may need in this program.The user directions are given at each and every
to avoid the user from coding . the output is also very clear and precise.
User 2 feedback : The Program is simple and easy to use.
User 3 feedback : the progrm is easy to understand with functions properly defined
User 4 feedback : all the choices are asked in numbers .this is really a special and
easy which which saves the user from writng long choices again and again . This also
makes testing easy
User 5 feedback :The switch case makes the code look clean, descent and indented
also the code is really in sequence while giving choices and the user help system
really works awesome.
Checks against the original specifications –
The original specification were:
height of the room (between 2 and 6 metres), then the length of all four walls
(minimum 1 metre; Maximum 25 metres) : this is being taken care of wile
taking the input from the user . it has been mentioned in code using cout before
the user enter his details and choices
"enter length of room (between 1 and 25 metres)”
"enter height of room (between 2 and 6 metres)"
The program allows a choice of three paints:
o Luxury quality which cost £1.75 per square metre
o Standard quality which costs £1.00 per square metre.
o Economy quality which costs £0.45 per square metre
This choice has been given using 3 number options 1,2 & 3 for the ease of
user.
The decorator is also be able to choose to use undercoat paint if required,
which costs an additional £0.50 per square metre by pressing 1 or 0 whatever
he wants accordingly
The program calculates the total cost of painting correctly based on user
preferences
This can also be verified using test cases mentioned in the table and calculating
it manually
The help system is also designed to help users with some extra information we
wants about the system.This includes two help choices mentioned in code as
"Do you need any help ? press 1 for yes and 0 for no "
Additional features apart from original specifications
The help system is completely self designed . The choices given to the user for
knowing the cost is mentioned to let the user compare his choice and how
much he wants to spend money in paint quality.it may happen the user will
change his choice if he finds cost too less or too more for a particular
category.Also he can see what cost difference will be there if he applies
undercoat .this will help him/her to choose to undercoat or whether he could
afford extra cost or not.This all directions even in help system if really
necessary to prevent user from getting confused which input to enter next at
the same time making it user friendly.One such example is:
"Do you want undercoat paint : Type 1 for yes and 0 for no "
Users are required to choose in additional to all above whether he wants to
exit help system or not again by pressing ‘1’ or ‘0’ .this was not in original
specification but is added by me to make the help system more user
friendly.Also the user can stay inside help function as long he like by refusing
to exit entering such a choice when asked i.e. enter input 1 when asked :
"do u want to exit help ? press 1 for yes 0 for no "
The program has a really good user interface guiding and giving directions at
each and every point. The user gets to know what input he wants to enter next
without any confusion. The directions are clear and precise
Evaluation of the program –
Good features:
the program is properly documented
it considers all the corner cases
help system is really interactive
the program is easy to understand
separate function is made to calculate the cost which makes the code look
clean
preferences
This can also be verified using test cases mentioned in the table and calculating
it manually
The help system is also designed to help users with some extra information we
wants about the system.This includes two help choices mentioned in code as
"Do you need any help ? press 1 for yes and 0 for no "
Additional features apart from original specifications
The help system is completely self designed . The choices given to the user for
knowing the cost is mentioned to let the user compare his choice and how
much he wants to spend money in paint quality.it may happen the user will
change his choice if he finds cost too less or too more for a particular
category.Also he can see what cost difference will be there if he applies
undercoat .this will help him/her to choose to undercoat or whether he could
afford extra cost or not.This all directions even in help system if really
necessary to prevent user from getting confused which input to enter next at
the same time making it user friendly.One such example is:
"Do you want undercoat paint : Type 1 for yes and 0 for no "
Users are required to choose in additional to all above whether he wants to
exit help system or not again by pressing ‘1’ or ‘0’ .this was not in original
specification but is added by me to make the help system more user
friendly.Also the user can stay inside help function as long he like by refusing
to exit entering such a choice when asked i.e. enter input 1 when asked :
"do u want to exit help ? press 1 for yes 0 for no "
The program has a really good user interface guiding and giving directions at
each and every point. The user gets to know what input he wants to enter next
without any confusion. The directions are clear and precise
Evaluation of the program –
Good features:
the program is properly documented
it considers all the corner cases
help system is really interactive
the program is easy to understand
separate function is made to calculate the cost which makes the code look
clean
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
the choices are all numerical in nature ,this makes it easier to type and saves
user from typing long inputs
the user directions given at each and every point while taking the input from
user helps user to go through end without much efforts and without getting
confused.
Bad features:
The help system could have been separated in function like the find_cost
function.This would have made the code look even more cleaner and the main
function would just contain function calls and rest work would be done inside
functions.
The help system can be modified to cover other sorts of choices to help a user
Further evaluation:
Evaluation of the program can be done by test cases .
we see that our program’s results matched with the actual results and so the
program is correct.
The program is build according to the specifications mentioned.
Also additional features are added to the program like user friendly interface.
The help system is also very informative and guides the use to make correct
choices and not be confused.
The program’s time and space complexity is also less so the program is
efficient and doesn’t take much time to run.
the program is properly commented and documented for it to be useful for
future programmers to change or understand code.
Future improvements
Help system can be changed to include more help options like calculating
difference between the cost of paint quality.
Like difference in cost if he chooses luxury and if he chooses standard or
economy.
The breadth of the room can also be included in the program
In future may be new quality of paints can be introduced in the market,this
change can be very easily done in coded by making slight changes in switch
and help system
The user can also be asked the range of cost he wants and accordingly the
system can propose to user the choices he can opt for
The help system can be made a separate function so that we can have a
separate help function code and replicate it in our other programs which may
need help system similar to the our present help function
user from typing long inputs
the user directions given at each and every point while taking the input from
user helps user to go through end without much efforts and without getting
confused.
Bad features:
The help system could have been separated in function like the find_cost
function.This would have made the code look even more cleaner and the main
function would just contain function calls and rest work would be done inside
functions.
The help system can be modified to cover other sorts of choices to help a user
Further evaluation:
Evaluation of the program can be done by test cases .
we see that our program’s results matched with the actual results and so the
program is correct.
The program is build according to the specifications mentioned.
Also additional features are added to the program like user friendly interface.
The help system is also very informative and guides the use to make correct
choices and not be confused.
The program’s time and space complexity is also less so the program is
efficient and doesn’t take much time to run.
the program is properly commented and documented for it to be useful for
future programmers to change or understand code.
Future improvements
Help system can be changed to include more help options like calculating
difference between the cost of paint quality.
Like difference in cost if he chooses luxury and if he chooses standard or
economy.
The breadth of the room can also be included in the program
In future may be new quality of paints can be introduced in the market,this
change can be very easily done in coded by making slight changes in switch
and help system
The user can also be asked the range of cost he wants and accordingly the
system can propose to user the choices he can opt for
The help system can be made a separate function so that we can have a
separate help function code and replicate it in our other programs which may
need help system similar to the our present help function
1 out of 15
Related Documents
Your All-in-One AI-Powered Toolkit for Academic Success.
+13062052269
info@desklib.com
Available 24*7 on WhatsApp / Email
Unlock your academic potential
© 2024 | Zucol Services PVT LTD | All rights reserved.