根据提供的UML类图,代写一个比赛模拟器。OverviewThis is an individual assignment that requires you to design, develop and test a small Java program using object-oriented approaches.Learning Outcomes AssessedThe following course learning outcomes are assessed by completing this assessment:Identify and use the correct syntax of a common programming languageRecall and use typical programming constructs to design and implement simple software solutionsReproduce and adapt commonly used basic algorithmsUtilise pseudocode and/or algorithms as a major program design techniqueWrite and implement a solution algorithm using basic programming constructsDemonstrate debugging and testing skills whilst writing codeDevelop self-reliance and judgement in adapting algorithms to diverse contextsDesign and write program solutions to identified problems using accepted design constructsAssessment DetailsIt’s time to race!! The Lawn Mowing Championship is a competition run in Britain and they have employed you to design, develop and test a small application for managing the Championship results.Stage 1: DesignThis stage requires you to prepare documentation that describes the function of the program and how it is to be tested. There is no coding or code testing involved in this stage. A document template has been provided for your use.RequirementsRead through Stage 2: Program Development to obtain details of the requirements of this program.Write an algorithm that describes how the program will operate.a. All program requirements must be included, even if you do not end up including all these requirements in your program code.b. The algorithm must be structured logically so that the program would function correctly.Prepare and document test cases that can be used to check that the program works correctly, once it has been coded. You do NOT need to actually run the test cases in this stage; this will occur in Stage 3: Testing.a. All program requirements must be included, even if you do not end up including all these requirements in your program code.b. Make sure the test cases include checking of data entered by the user to make sure that only valid data is accepted. If the user enters invalid data, the user should be informed of this and given another chance to enter the data. NB: As we have not covered exception handling, you may assume that the user will always enter the expected data type.c. Test cases should be documented using a template like the one below. You may include extra information if you wish. At this stage, the Actual Result column will be left blank.Test CaseExpected ResultActual ResultDisplay Results selectedEach competitor is listed with their total score, sorted from highest to lowest……Stage 2: Program DevelopmentUsing the Design Documentation to assist you, develop a Java program that uses object-orientated coding approaches to record and report upon the Lawn Mowing Championship. You must follow coding conventions, such as proper layout of code, using naming conventions and writing meaningful comments throughout your program.Overview of the ProgramThis section provides an overview of how the program works from the user’s perspective. You may change the appearance of the program provided you implement the same functionality.When the program starts, it provides a short message for initialising the contest administration system and prompts the user to enter the number of rounds that competitors must complete. The user must enter a whole number greater than or equal to 2 and less than 5. Otherwise, the system keeps prompting until a valid entry is made.Once the number of rounds required is obtained, the program automatically initialises. This initialisation includes creating the race, creating the lawn mowers, creating the competitors and registering the competitors in a race.When initialisation is complete, a menu appears providing the users with options to Enter Results, Display Results, View Program Credits or Exit Program.When the user selects the Enter Results option, the user is prompted to enter the time each competitor took to complete a round. When all results (for each round) have been entered, a message “Results have been successfully recorded” appears and the menu is shown again.When the user chooses to Display Results option, the results are displayed by competitor. Competitors are listed in order of their total score across all rounds, from highest to lowest. The list is followed by the placings for the whole event, with those competitors who achieve the lowest times show in first, second andJava代写:ITECH1000 Championship帮做Java编程作业、Java作业调试 third place, with the make of lawn mower also identified. The menu is then redisplayed.When the user selects the option to View Program Credits, a message is displayed providing authorship information for this program. The main menu is then redisplayed.When the user selects the option to Exit the program, a message thanks the user for using the system, and then terminates.Technical InformationThis section provides technical implementation details required by the programmer to create the program.Development of this program requires four classes: Race, Entry, Competitor, LawnMower as well as a Driver class to control the flow of the program.Driver Class: Name this file ID3XXXXXXX, where the Xs are replaced by your student ID. This class will contain a main() method to manage the flow of the program, and other methods as necessary to ensure the code is modularized and functions correctly.Race Class: This represents a Race. A race has a number of rounds as entered by the user when the program starts. Use the class diagram below as the basis for designing your class.Entry Class: This represents a single Competitor registered to compete in the race and the scores they obtain for each round. Use the class diagram below as the basis for designing your classCompetitor Class: This represents a Competitor driving a brand of lawn mower. Use the class diagram below as the basis for designing your classLawnMower Class: This represents a brand of lawn mower. Use the class diagram below as the basis for designing your classInitialising the ProgramInitialising the program requires the following steps:Prompt the user to enter the number of rounds required for the competition (either 2, 3 or 4). This must be a whole number to be stored as an int. Initialisation cannot proceed until this number has been obtained.Create a new Race for the lawn mowing championships. For this task, you will set the maximum number of rounds (as obtained in Step 1) and the maximum of participants to 5. You will also have to set the maximum number of times a lawn mower brand can be represented in a race to 2.Create a number of lawn mowers for the Competitors to ride.Create new Competitors to complete in the championships. Each Competitor has an attribute that stores the type of lawn mower they drive. You may choose the names of your own competitors.Add the Competitors to the Race a. For testing purposes, you must try and add too many competitors and lawn mower brands and a Competitor twice. This is to demonstrate that the capacityReached(), entrantAlreadyRegistered(String) and lawnMowerBrandReached(String) work.Advise the user that initialization in complete.Running the ProgramEntering Results a. Scores for each round should be stored in the finishTimes array for each Entry b. The user is prompted for the race times for each Competitor. Each race time is to be read as a double. Hint: You should use the setFinishTime(int, int) method to update the finishTimes array. This method takes in the race round number and the time it took to complete the course. c. You may assume that the user’s results entry is the correct data type. You do not need to check to make sure that the user does not enter non-numerical characters. d. If the user selects the option to Enter Results after having already entered these, the earlier scores will be overwritten.Displaying Results a. Displaying the competitor’s results requires sorting the Competitors in order of the total scores they obtained and presenting this information in a readable format. The report is followed by identifying the first, second and third place-getters and the lawn mower each competitor was riding. i. If two or more competitors obtain the same total score, then the order of the competitors and their placing will be determined based on the order their results were enteredViewing Program Credits a. No special processing is required for this section. A simple display of the credit information is all that is needed. 4. Exit Program a. The program should exit by reaching the end of the main() method. System.exit(int) should not be used. b. A message thanks the user for using the system, your details are shown and the program terminatesStage 3: TestingUsing a copy of the test cases developed in Stage 1: Design, test the program you have developed in Stage 2: Program Development. Document your results, including both failed and successful tests.Note: Please do not leave out any failed tests. If your testing highlights that your program has not worked correctly, then the failed tests help to demonstrate that you have been testing your program properly.To show that you have tested your program, include small (but readable) screen captures in your Actual Results as well as any explanatory comments. Microsoft Windows includes a Snipping Tool that is useful for taking captures of the relevant parts of the screen.SubmissionYour program code, design and testing documentation should be zipped into a single file and loaded into the Assignment Box provided in Moodle by the due date and time.转自:http://ass.3daixie.com/2019011241150229.html
讲解:Java:ITECH1000 ChampionshipJava、Java
©著作权归作者所有,转载或内容合作请联系作者
- 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
- 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
- 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
推荐阅读更多精彩内容
- By clicking to agree to this Schedule 2, which is hereby ...
- The Great A.I. Awakening How Google used artificial intel...
- 本文转载自知乎 作者:季子乌 笔记版权归笔记作者所有 其中英文语句取自:英语流利说-懂你英语 ——————————...
- 支付宝的便利,相信大家都深有体会。如今,支付宝已经渗透到了我们生活的方方面面,有网友表示:“支付宝就像哆啦A梦的口...