ITECH1000 Programming 1 Assessment 2
VerifiedAdded on 2024/04/25
|26
|2595
|67
AI Summary
This assessment covers the design, development, and testing of a Java program for a lawn mowing championship. It includes algorithm design, logical structure, test cases, program functionality, technical information, and testing stages.
Contribute Materials
Your contribution can guide someone’s learning journey. Share your
documents today.
ITECH1000
Programming 1
Assessment 2
Programming 1
Assessment 2
Secure Best Marks with AI Grader
Need help grading? Try our AI Grader for instant feedback on your assignments.
Contents
Introduction...........................................................................................................................................3
Stage 1: Design Documentation............................................................................................................3
1.1 An algorithm that describes how the program will operate..........................................................3
1.2 Logical structure of the program:.................................................................................................5
1.3: Test cases....................................................................................................................................6
Stage 2: Program Development.............................................................................................................7
2.1 Functionality of the program:......................................................................................................7
2.2 Technical Information:..............................................................................................................13
Stage 3: Testing...................................................................................................................................24
Reference.............................................................................................................................................25
Appendix.............................................................................................................................................26
List of Figures
Figure 1 Insert the number of rounds.....................................................................................................8
Figure 2 insert the details.......................................................................................................................9
Figure 3 menu........................................................................................................................................9
Figure 4 insert the score.......................................................................................................................10
Figure 5 displays the result..................................................................................................................11
Figure 6 program credit.......................................................................................................................11
Figure 7 exit........................................................................................................................................12
Figure 8: Driver class..........................................................................................................................13
Figure 9: Driver class (ii).....................................................................................................................14
Figure 10: Driver Class (iii).................................................................................................................14
Figure 11: Driver class (iv)..................................................................................................................15
Figure 12: Race class (i)......................................................................................................................16
Figure 13: Race class (ii).....................................................................................................................16
Figure 14: Race class (iii)....................................................................................................................17
Figure 15: Race class (iv)....................................................................................................................17
Figure 16: Race classs (v)....................................................................................................................18
Figure 17: Race class (vi)....................................................................................................................18
Figure 18: Race class (vii)...................................................................................................................19
Figure 19: Race class (viii)..................................................................................................................19
Figure 20: Race class (ix)....................................................................................................................20
Figure 21: Entry class (i).....................................................................................................................21
Figure 22: Entry class (ii)....................................................................................................................21
Figure 23: Entry class (iii)...................................................................................................................22
Figure 24: Competitor class.................................................................................................................23
Introduction...........................................................................................................................................3
Stage 1: Design Documentation............................................................................................................3
1.1 An algorithm that describes how the program will operate..........................................................3
1.2 Logical structure of the program:.................................................................................................5
1.3: Test cases....................................................................................................................................6
Stage 2: Program Development.............................................................................................................7
2.1 Functionality of the program:......................................................................................................7
2.2 Technical Information:..............................................................................................................13
Stage 3: Testing...................................................................................................................................24
Reference.............................................................................................................................................25
Appendix.............................................................................................................................................26
List of Figures
Figure 1 Insert the number of rounds.....................................................................................................8
Figure 2 insert the details.......................................................................................................................9
Figure 3 menu........................................................................................................................................9
Figure 4 insert the score.......................................................................................................................10
Figure 5 displays the result..................................................................................................................11
Figure 6 program credit.......................................................................................................................11
Figure 7 exit........................................................................................................................................12
Figure 8: Driver class..........................................................................................................................13
Figure 9: Driver class (ii).....................................................................................................................14
Figure 10: Driver Class (iii).................................................................................................................14
Figure 11: Driver class (iv)..................................................................................................................15
Figure 12: Race class (i)......................................................................................................................16
Figure 13: Race class (ii).....................................................................................................................16
Figure 14: Race class (iii)....................................................................................................................17
Figure 15: Race class (iv)....................................................................................................................17
Figure 16: Race classs (v)....................................................................................................................18
Figure 17: Race class (vi)....................................................................................................................18
Figure 18: Race class (vii)...................................................................................................................19
Figure 19: Race class (viii)..................................................................................................................19
Figure 20: Race class (ix)....................................................................................................................20
Figure 21: Entry class (i).....................................................................................................................21
Figure 22: Entry class (ii)....................................................................................................................21
Figure 23: Entry class (iii)...................................................................................................................22
Figure 24: Competitor class.................................................................................................................23
Introduction
I have used the java program to maintain the data for the lawn mowing championship for this
I have used to net bean software to develop the program. This section is describing all
functionality of the program and the all test part of the program and importance of the
program for the championship is describing.
Stage 1: Design Documentation.
1.1 An algorithm that describes how the program will operate.
The algorithm of the full program with stepwise implementation of the program is provided
in this part.
Algorithm
Step 1 → Start.
Step -2 → Initializing the contest administration system.
Step -3 → Enter the number of rounds to complete the competitions.
(3.1) If (Round <= 2 or Round > 4)
Generate error.
(3.2) Initialize the race and lawn movers.
Step -4 → Create competitors and display competitors names and lawn movers names.
Step -5 → Register Competitors.
(5.1) If the name of two competitors is same then, cancel the registration of the second
competitor.
(5.2) If lawn movers are greater than 2 then, cancel the registration of all the competitor after
2 lawn movers.
(5.3) Register maximum 5 competitors.
I have used the java program to maintain the data for the lawn mowing championship for this
I have used to net bean software to develop the program. This section is describing all
functionality of the program and the all test part of the program and importance of the
program for the championship is describing.
Stage 1: Design Documentation.
1.1 An algorithm that describes how the program will operate.
The algorithm of the full program with stepwise implementation of the program is provided
in this part.
Algorithm
Step 1 → Start.
Step -2 → Initializing the contest administration system.
Step -3 → Enter the number of rounds to complete the competitions.
(3.1) If (Round <= 2 or Round > 4)
Generate error.
(3.2) Initialize the race and lawn movers.
Step -4 → Create competitors and display competitors names and lawn movers names.
Step -5 → Register Competitors.
(5.1) If the name of two competitors is same then, cancel the registration of the second
competitor.
(5.2) If lawn movers are greater than 2 then, cancel the registration of all the competitor after
2 lawn movers.
(5.3) Register maximum 5 competitors.
Step -6 → After the completion of the initialization, create a menu system using a switch
case. Menu system must have four menu options that is 1. “Enter Result”, 2. ”Display
Result”, 3. “View program credits”, 4. ”Exit program”.
(6.1) For menu option 1. “Enter Result” users have to enter the finish time for each
registered competitor for each number of rounds.
(6.2) For menu option 2. “Display Result”. It displays the result in the highest to lowest
order with their respective name.
(6.3) For menu option 3.”View Program Credits ”.It provides the message to provide the
author details.
(6.4) For menu option 4. “Exit ”. It exits the program with a thank you message displayed on
the screen and then terminates the program.
case. Menu system must have four menu options that is 1. “Enter Result”, 2. ”Display
Result”, 3. “View program credits”, 4. ”Exit program”.
(6.1) For menu option 1. “Enter Result” users have to enter the finish time for each
registered competitor for each number of rounds.
(6.2) For menu option 2. “Display Result”. It displays the result in the highest to lowest
order with their respective name.
(6.3) For menu option 3.”View Program Credits ”.It provides the message to provide the
author details.
(6.4) For menu option 4. “Exit ”. It exits the program with a thank you message displayed on
the screen and then terminates the program.
Secure Best Marks with AI Grader
Need help grading? Try our AI Grader for instant feedback on your assignments.
1.2 Logical structure of the program:
1.3 Test cases
In this step, testing on individual modules is performed so that all the errors and bugs present
in the program can be removed. Each module is checked individually to determine whether it
is working in an expected way or not.
Test Case Expected Result Actual Result
1. After Initialization of
Contest administration
system, the message should
be displayed to enter the
number of rounds.
The message should
display to enter the value.
The message is successfully
displayed.
2. Tests the value of
rounds which has been
entered must be greater than
2 and smaller than 5.
Otherwise, it will prompt to
enter the valid values.
If the values are not valid,
the message should be
prompted to enter the valid
values.
Successfully implemented.
3. When two users enter
the same name for the
competition. Prompt the
message for the second
competitor to cancel the
registration.
Cancel the registration of
the same name of the
competit or.
Successfully done.
4. If the value of the
brand is more than 2, it will
generate an error message.
Error message should be
displayed
Successfully implemented.
5. If the total number of Error message should be Successfully displayed.
In this step, testing on individual modules is performed so that all the errors and bugs present
in the program can be removed. Each module is checked individually to determine whether it
is working in an expected way or not.
Test Case Expected Result Actual Result
1. After Initialization of
Contest administration
system, the message should
be displayed to enter the
number of rounds.
The message should
display to enter the value.
The message is successfully
displayed.
2. Tests the value of
rounds which has been
entered must be greater than
2 and smaller than 5.
Otherwise, it will prompt to
enter the valid values.
If the values are not valid,
the message should be
prompted to enter the valid
values.
Successfully implemented.
3. When two users enter
the same name for the
competition. Prompt the
message for the second
competitor to cancel the
registration.
Cancel the registration of
the same name of the
competit or.
Successfully done.
4. If the value of the
brand is more than 2, it will
generate an error message.
Error message should be
displayed
Successfully implemented.
5. If the total number of Error message should be Successfully displayed.
competitors is greater than 5,
it will generate an error
message.
displayed
Stage 2: Program Development.
This stage provides the overview of the program and the working of the program. I have used
Java language and for this program, I have used the net bean software for development of the
program. In this stage, I am describing the different requirement of this program and how it is
useful for the user and I am explaining the workflow of the program step by step to the full
description is following:
2.1 Functionality of the program:
1) I have developed the java program for lawn mowing championship. It is used to
maintain the data for racing. And different user will participate in this championship so to
handle the all the data of the user who will participate in this championship. So I have
developed the program when the program will execute than a small window will pop up and
the program will ask to enter the number from the user. Actually, this number is for rounds it
means how many rounds want by a competitor to complete the race. The round number
should be greater than 2 or equal to 2 and it should be less than 5. It means the user can only
add the round more than 2 if he will add 1 round then it will not acceptable by the program
then it will show the error message. The user needs to add the round number less than 5 if he
will add more than 5 then again program will show the error message.
it will generate an error
message.
displayed
Stage 2: Program Development.
This stage provides the overview of the program and the working of the program. I have used
Java language and for this program, I have used the net bean software for development of the
program. In this stage, I am describing the different requirement of this program and how it is
useful for the user and I am explaining the workflow of the program step by step to the full
description is following:
2.1 Functionality of the program:
1) I have developed the java program for lawn mowing championship. It is used to
maintain the data for racing. And different user will participate in this championship so to
handle the all the data of the user who will participate in this championship. So I have
developed the program when the program will execute than a small window will pop up and
the program will ask to enter the number from the user. Actually, this number is for rounds it
means how many rounds want by a competitor to complete the race. The round number
should be greater than 2 or equal to 2 and it should be less than 5. It means the user can only
add the round more than 2 if he will add 1 round then it will not acceptable by the program
then it will show the error message. The user needs to add the round number less than 5 if he
will add more than 5 then again program will show the error message.
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Figure 1 Insert the number of rounds
2) After receiving the round number from the user then the race will create success and
then the program will ask the user for the name of the competitor who is participating in the
race. Then the user needs to add the competitor name in the next window one by one. The
program will store the names of the competitor in storage after this process the program will
show the message for every user that they are registered successfully for the race.Here the
program handling two main processes in the first process, the program is asking the username
who is participating in race and second, is displaying that they are registered in race
successfully
2) After receiving the round number from the user then the race will create success and
then the program will ask the user for the name of the competitor who is participating in the
race. Then the user needs to add the competitor name in the next window one by one. The
program will store the names of the competitor in storage after this process the program will
show the message for every user that they are registered successfully for the race.Here the
program handling two main processes in the first process, the program is asking the username
who is participating in race and second, is displaying that they are registered in race
successfully
Figure 2 insert the details
3) After providing the name of the candidate then the new will appear. The program will
provide a different option in this window and the program will ask to select the option. The
program will provide four functionally and they are first is enter the result. By using this
option user can add the result according to the race. Second is display the result which is used
to display the result of the race it will help to display that who is first and second in the race.
The third is viewed the program credits which is used to represent the credits for the program
and last option is an exit by using this option the user can close the menu option and then the
user can go back. I am explaining the all four option briefly in below.
Figure 3 menu
3) After providing the name of the candidate then the new will appear. The program will
provide a different option in this window and the program will ask to select the option. The
program will provide four functionally and they are first is enter the result. By using this
option user can add the result according to the race. Second is display the result which is used
to display the result of the race it will help to display that who is first and second in the race.
The third is viewed the program credits which is used to represent the credits for the program
and last option is an exit by using this option the user can close the menu option and then the
user can go back. I am explaining the all four option briefly in below.
Figure 3 menu
4) When the user will go with the first option from the menu then the program will ask
to enter the result for a different round that is selected in the first stage in the program. If the
second round is selected by the user then the program will ask the result for two rounds. It’s
mean the program will ask the result for each round.
Figure 4 insert the score
5) If the user will go with the second option from the menu that is displayed option
which is used to display the final result according to the score of the user. It will be used to
declare the first, second and third position in the race competition. In the first phase, the
program will display the all score of the competitor then program will compare the score of
each competitor and then it will sort the score and then it will arrange then score in the form
of high to low order. Then it will be helpful to declare the position of the competitor in the
race competition. It will compare two numbers then it will set the highest score at the top
from two competitors then it will again compare the score of the two other competitors and
then it will set the highest score at the top.
to enter the result for a different round that is selected in the first stage in the program. If the
second round is selected by the user then the program will ask the result for two rounds. It’s
mean the program will ask the result for each round.
Figure 4 insert the score
5) If the user will go with the second option from the menu that is displayed option
which is used to display the final result according to the score of the user. It will be used to
declare the first, second and third position in the race competition. In the first phase, the
program will display the all score of the competitor then program will compare the score of
each competitor and then it will sort the score and then it will arrange then score in the form
of high to low order. Then it will be helpful to declare the position of the competitor in the
race competition. It will compare two numbers then it will set the highest score at the top
from two competitors then it will again compare the score of the two other competitors and
then it will set the highest score at the top.
Secure Best Marks with AI Grader
Need help grading? Try our AI Grader for instant feedback on your assignments.
Figure 5 displays the result
6) The third option is view program credit in the menu of this program. If the user will
select the third option then the program will display all information about the program. The
information contains the developer name, the version of the program, release date of the
program etc. this option will contain all information about the program.
Figure 6 program credit
6) The third option is view program credit in the menu of this program. If the user will
select the third option then the program will display all information about the program. The
information contains the developer name, the version of the program, release date of the
program etc. this option will contain all information about the program.
Figure 6 program credit
7) The last option is exit it is used to close the menu window when the user will click
the exit option then a menu window will be closed. Before closing the window the program
will display the thanks message to the user.
Figure 7 exit
the exit option then a menu window will be closed. Before closing the window the program
will display the thanks message to the user.
Figure 7 exit
2.2 Technical Information:
In this section, it provides all the technical implementation details which will be required by
the programmer to create this program.
This program comprises of four classes which will contain detailed information about the
registration and race conditions. The class which is present in the program are :
(i) Driver class – This class will contain the main() method that will manage the flow of
the program.
Figure 8: Driver class
In this section, it provides all the technical implementation details which will be required by
the programmer to create this program.
This program comprises of four classes which will contain detailed information about the
registration and race conditions. The class which is present in the program are :
(i) Driver class – This class will contain the main() method that will manage the flow of
the program.
Figure 8: Driver class
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Figure 9: Driver class (ii)
Figure 10: Driver Class (iii)
Figure 10: Driver Class (iii)
Figure 11: Driver class (iv)
(ii) Race class: This class represents the race. This includes number of rounds which is
entered by the users after the initialization of the program.This class has the following
variable:
NUMBER_OF_ROUNDS
NUMBER_OF_LAWNMOVERS_BRANDS
ENTRY
Functions in this class :
Race (int,int,int)
currentNumbersOfCompetitors()
registerEntry(Competitor)
displayResult()
enterResult()
sortResults()
capacityReasched()
entrantAlreadyRegistered()
lawnMoverBrandReached()
(ii) Race class: This class represents the race. This includes number of rounds which is
entered by the users after the initialization of the program.This class has the following
variable:
NUMBER_OF_ROUNDS
NUMBER_OF_LAWNMOVERS_BRANDS
ENTRY
Functions in this class :
Race (int,int,int)
currentNumbersOfCompetitors()
registerEntry(Competitor)
displayResult()
enterResult()
sortResults()
capacityReasched()
entrantAlreadyRegistered()
lawnMoverBrandReached()
Figure 12: Race class (i)
Figure 13: Race class (ii)
Figure 13: Race class (ii)
Secure Best Marks with AI Grader
Need help grading? Try our AI Grader for instant feedback on your assignments.
Figure 14: Race class (iii)
Figure 15: Race class (iv)
Figure 15: Race class (iv)
Figure 16: Race classs (v)
Figure 17: Race class (vi)
Figure 17: Race class (vi)
Figure 18: Race class (vii)
Figure 19: Race class (viii)
Figure 19: Race class (viii)
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Figure 20: Race class (ix)
(iii) Entry Class – This class contains the details for single competitors like scores
obtained for each round This class contains of following variables –
finishTimes
Competitor
Functions of this class:
Entry(Competitor, int)
setFinishTime(int)
getFinishTime(int)
getTotalRaceTime()
(iii) Entry Class – This class contains the details for single competitors like scores
obtained for each round This class contains of following variables –
finishTimes
Competitor
Functions of this class:
Entry(Competitor, int)
setFinishTime(int)
getFinishTime(int)
getTotalRaceTime()
Figure 21: Entry class (i)
Figure 22: Entry class (ii)
Figure 22: Entry class (ii)
Figure 23: Entry class (iii)
(iv) Competitor class –In this class, it represents the Brand of lawnmowers for the
competitors. This class consists of following variables:
competitorsNames
lawnmower
Functions of this class :
Competitor(String, Lawnmower)
getName()
getLawnMowerDetails()
(iv) Competitor class –In this class, it represents the Brand of lawnmowers for the
competitors. This class consists of following variables:
competitorsNames
lawnmower
Functions of this class :
Competitor(String, Lawnmower)
getName()
getLawnMowerDetails()
Secure Best Marks with AI Grader
Need help grading? Try our AI Grader for instant feedback on your assignments.
Figure 24: Competitor class
Stage 3: Testing
Testing of the software is the process to evaluate a software so that it can meet all the user
requirement. It also determines the quality of the software and should be performed. Different
type of testing which is performed can be :
Unit testing: the Unit testing is a part of the software testing. It is used to ensure that all
units are working in a proper manner. The user can check the program by checking the all
units step by steps. The unit testing provides the ability to find out bugs at different points.
It is used to check that individual code is suitable or not for specific unit.
Integration testing: It is used after the unit testing. The integration testing is used to combine
all units and then it will check all the functionality of the program.
System testing: The system testing is a major part of the testing unit. It is used to check all
requirement of the system.
Function testing: The function testing is used to check all functions of the codes and
program and it is used to ensure that functions are working or not.
Testing of the software is the process to evaluate a software so that it can meet all the user
requirement. It also determines the quality of the software and should be performed. Different
type of testing which is performed can be :
Unit testing: the Unit testing is a part of the software testing. It is used to ensure that all
units are working in a proper manner. The user can check the program by checking the all
units step by steps. The unit testing provides the ability to find out bugs at different points.
It is used to check that individual code is suitable or not for specific unit.
Integration testing: It is used after the unit testing. The integration testing is used to combine
all units and then it will check all the functionality of the program.
System testing: The system testing is a major part of the testing unit. It is used to check all
requirement of the system.
Function testing: The function testing is used to check all functions of the codes and
program and it is used to ensure that functions are working or not.
Reference
Levy, D., 2017. Software Requirements Specification, what you NEED to know. [online]
Gatherspace. Available at:
http://www.gatherspace.com/static/software_requirement_specification.html [Accessed 19
Jan. 2018].
Guru99, 2017.unit testing. [online] Guru99. Available at: https://www.guru99.com/unit-
testing-guide.html [Accessed 20 Jan. 2018].
Lam, N., 2018. What is Integration testing?. [online] Istqbexamcertification. Available at:
http://istqbexamcertification.com/what-is-integration-testing/ [Accessed 20 Jan. 2018].
Software Testing Class, 2017.System Testing. [online] Software Testing Class. Available at:
http://www.softwaretestingclass.com/system-testing-what-why-how/ [Accessed 20 Jan.
2018].
Software Testing Fundamentals, 2017.Functional Testing. [online] Software Testing
Fundamentals. Available at: http://softwaretestingfundamentals.com/functional-testing/
[Accessed 20 Jan. 2018].
Levy, D., 2017. Software Requirements Specification, what you NEED to know. [online]
Gatherspace. Available at:
http://www.gatherspace.com/static/software_requirement_specification.html [Accessed 19
Jan. 2018].
Guru99, 2017.unit testing. [online] Guru99. Available at: https://www.guru99.com/unit-
testing-guide.html [Accessed 20 Jan. 2018].
Lam, N., 2018. What is Integration testing?. [online] Istqbexamcertification. Available at:
http://istqbexamcertification.com/what-is-integration-testing/ [Accessed 20 Jan. 2018].
Software Testing Class, 2017.System Testing. [online] Software Testing Class. Available at:
http://www.softwaretestingclass.com/system-testing-what-why-how/ [Accessed 20 Jan.
2018].
Software Testing Fundamentals, 2017.Functional Testing. [online] Software Testing
Fundamentals. Available at: http://softwaretestingfundamentals.com/functional-testing/
[Accessed 20 Jan. 2018].
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Appendix
1 out of 26
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.