FIND A SOLUTION AT Academic Writers Bay
Due Date: Thursday of Week 7 at 16:00 (see Course Description for further details)
Please see the Course Description for further information related to extensions for assignments and Special Consideration.
For this assignment you are required to specify, design, implement and test menu driven program of your own design. For example you could design a program that supports scoring of a sporting event, keeping records of student results within a class, a simple game of hangman, or other form of game. You are to use top-down approach for software development to provide a solution for the problem that you specify.
The following files/links are available on Moodle:
Note: If you use any resources apart from the course material to complete your assignment you MUST provide an in-text citation within your documentation and/or code, as well as providing a list of references in APA formatting. This includes the use of any websites, online forums, books, or text books. If you are unsure of how to do this please ask for help.
Your program should confirm to the following constraints. It should:
include at least one example of the successful and appropriate use of :
a two-dimensional array containing numbers or characters
a switch statement
an if statement
a do-while loop
ensure that your program can handle invalid data which lies outside of a specified range e.g. number of competitors < 0 or a result of -5. You can assume that the correct data type has been entered ie if you are expecting the user to enter data of type int that this will be the case.
use appropriate formatting and programming styles (ie naming, formatting and commenting of code)
successfully compiles in Eclipse without any warnings.
You may add additional functionality to your program, however, you must necessarily complete the above requirements.
NOTE: Code that does not successfully compile will not be marked. In such cases, only the specification, design and question sections of the assignment will be awarded marks. If you are unable to get your code to compile, please state this clearly in your submission and comment out the offending code prior to handing in your work. Even if your code compiles but has warnings, marks will be deducted.
Sample code has been provided Moodle. Use the sample code provided to answer the following questions:
When the program is first run and menu item 2 is selected what is displayed? Why is the output displayed as it currently is?
Explain how the loop displaying the menu is exited, what value does menuSel have when the program finishes? Describe what happens next when menuSel gets this value.
The reserved word breakis used in the switch-statement to manage the menu selection. What is the purpose of the break statement?
Currently, if the user enters an incorrect menu selection (such as 5) what happens? How could the switch-statement be altered to allow for an error message to be displayed
What alternative loop could have been used for the main controlling loop (i.e. the do-while)?
Briefly explain the two lines of code that have been used to create the array to store the scores for each competitor. In your explanation, provide a diagram to illustrate how the array is stored.
The variable done is declared as a boolean. Explain what would happen if the code in the do-while loop was changed to:
Currently, menu item one prompts the user for data for Competitor 0 up to Competitor 4. What change would you have to make to the code so that displays Competitor 1 to Competitor 5?
The design of the output in for menu selection 2 needs to be changed so that it displays the scores as per the following:
Competitor 1: 1 1 1 1 1
Competitor 2: 2 2 2 2 2
Competitor 3: 3 3 3 3 3
Competitor 4: 4 4 4 4 4
Competitor 5: 5 5 5 5 5
Provide the changes to the code that you need to make to do this.
Explain how the nested for-loop in menu item 2 could be altered so that the user could specify how many competitors and how many judges to use up to the maximum values? For example, the maximum number of judges is 5 but the user of the program indicates that only 3 judges will be used for this competition.
If you have used any resources (books, websites, etc) you do need to cite and reference this material appropriately.
The first part of the assignment is to provide the requirements of the program to be developed. This should provide enough details so that another programmer would be able to design and implement the program.
Your program should present the user with a menu that provides at least the following functionality:
Input the number of competitors, judges, students, players, attempts, etc
Input some form of data
View reports – at least two different reports (e.g. average result, average score)
Quit the system
Your requirements should allow your program to conform to the design constraints listed above. A basic sample of ‘program requirements” has been provided for you to refer (see page Sample Specification pg 5).
You are required to check with your either your lecturer or tutor before continuing to ensure the problem you are considering is appropriate.
Design a program for the task you have specified in Part A. You should include:
An analysis of the problem
High level pseudo-code
Once you have completed your pseudo-code perform a desk check. If you find any problems with your pseudo-code you should redesign and retest. Details of any refinements that you have made to your algorithm and further testing that was conducted should be included in your design.
Using design developed in Part B implement the program in Java. You could be using the sample java code provided as a starting point and your first task would be to appropriately comment the code provided. Once you have finished this task, then you can update the code so that it conforms to your own specifications.
Your code should use appropriate programming standards and should be well documented/commented. You are permitted to discuss the sample program with your peers in order to understand it. However, you must ensure that you complete this section individually. It is expected that no two students will have the same program. You need to be creative in order to ensure your program is unique.
Using the data developed in Part B, test your program to ensure that it works as specified and that there are no logic errors in your code.
You will need to provide evidence that the testing has been completed – it is suggested that you make use of tables to display the data and testing.
Your assignment should be completed according to the General Guidelines for Presentation of Academic Work.
The following criteria will be used when marking your assignment:
successful completion of the required tasks
quality of code that adheres to the programming standards for the course; including:
comments and documentation
meaningful variable names
You are required to provide documentation, contained in an appropriate file, which includes:
a front page – indicating your name, a statement of what has been completed and acknowledgement of the names of all people (including other students and people outside of the university) who have assisted you and details on what parts of the assignment that they have assisted you with
a table of contents and page numbers
answers to the questions from Part A
the program specification
design details – including requirements, algorithm, test data
details of test data and evidence that the testing was conducted
list of references used (APA style); please specify if none have been used.
An appendix containing your code
Using the link provided in Moodle, please upload the following:
your code (SurnameStudentIdAssign1.java)
your report (surnameStudentIDAssign1.docx)
PART A – Code Comprehension
PART B – Specification of the problem
PART C – Design
PART D – Implementation
PART E – Testing
Presentation of documentation / report
The following is provided is a sample specification. The specification that you provide should provide at least as much detail as provided here.
You are required to write a program to assist with the scoring of a surfing competition. The organizers at this point are unsure of the exact number of judges or competitors, but they do know that there will be between 2 and 8 judges, and between 3 and 6 competitors. Each competitor is to be given a colour, red, blue, yellow, green, white, or black to compete under. (ie competitor # 1 is red, competitor # 2 is blue, etc. ) The judges enter a score for each competitor, the highest being the number of competitors, the lowest being 1. eg if there are 4 competitors, the winning score is 4, second is 3, third is 2 and forth (last) is 1.
If there were 4 competitors, a judge’s scorecard could look as follows:
Judge # 1
This ranks the Yellow competitor 1st, Green 2nd, red 3rdand blue 4thor last.
At the end of the day, the organizers would like to be able to summarise the scores as follows:
A histogram of the number of first places that each competitor scored
A table of preferences that shows the number of times each place was awarded to the competitors (ie if competitor Blue was ranked second by three judges, the number 3 should appear in the table for 2ndplace for the Blue competitor
Total scores for each competitor.
They would also like to be able to print out the raw data of the final scores.
Your program should verify all data entered to ensure that only correct data types with in the expected ranges are entered. Your program should also give users the opportunity to choose how they wish to look at the data, and give them the option of looking at it more than once.
- Assignment status: Already Solved By Our Experts
- (USA, AUS, UK & CA PhD. Writers)
- CLICK HERE TO GET A PROFESSIONAL WRITER TO WORK ON THIS PAPER AND OTHER SIMILAR PAPERS, GET A NON PLAGIARIZED PAPER FROM OUR EXPERTS
QUALITY: 100% ORIGINAL PAPER – NO PLAGIARISM – CUSTOM PAPER