Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Programming Language Expert

Programming Assignment

Overview - This is an individual assignment that requires you to design, develop and test a small Java program using object-oriented approaches.

Learning Outcomes Assessed

The following course learning outcomes are assessed by completing this assessment:

  • Identify and use the correct syntax of a common programming language
  • Recall and use typical programming constructs to design and implement simple software solutions
  • Reproduce and adapt commonly used basic algorithms
  • Utilise pseudocode and/or algorithms as a major program design technique
  • Write and implement a solution algorithm using basic programming constructs
  • Demonstrate debugging and testing skills whilst writing code
  • Develop self-reliance and judgement in adapting algorithms to diverse contexts
  • Design and write program solutions to identified problems using accepted design constructs

Assessment Details - It'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: Design

This 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.

Requirements:

1) Read through Stage 2: Program Development to obtain details of the requirements of this program.

2) 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.

3) 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.

Stage 2: Program Development

Using 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 Program:

This 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.

1. 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.

2. Once the number of rounds required is obtained, the program automatically initialises. This initialization includes creating the race, creating the lawn mowers, creating the competitors and registering the competitors in a race.

3. When initialisation is complete, a menu appears providing the users with options to Enter Results, Display Results, View Program Credits or Exit Program.

4. 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.

5. 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 and third place, with the make of lawn mower also identified. The menu is then redisplayed.

6. 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.

7. When the user selects the option to Exit the program, a message thanks the user for using the system, and then terminates.

Technical Information: This 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.

Initialising the Program: Initialising the program requires the following steps:

1. 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.

2. 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.

3. Create a number of lawn mowers for the Competitors to ride.

4. 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.

5. 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.

6. Advise the user that initialization in complete.

Running the Program:

1. Entering 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.

2. 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 entered

3. Viewing 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 terminates

Stage 3: Testing

Using 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.

Attachment:- Assignment File.rar

Programming Language, Programming

  • Category:- Programming Language
  • Reference No.:- M92662676
  • Price:- $90

Guranteed 48 Hours Delivery, In Price:- $90

Have any Question?


Related Questions in Programming Language

Php amp session managment assignment -this assignment looks

PHP & SESSION MANAGMENT ASSIGNMENT - This assignment looks at using PHP for creating cookies and session management. Class Exercise - Web Project: Member Registration/Login This exercise will cover adding data connectivi ...

Task - hand execution of arraysoverviewin this task you

Task - Hand Execution of Arrays Overview In this task you will demonstrate how arrays work by hand executing a number of small code snippets. Instructions Watch the Hand Execution with Arrays video, this shows how to ste ...

Extend the adworks applicationi add dialogs to allow the

Extend the AdWorks application I. Add Dialogs to allow the user to Add, Edit, Read and Delete a Customer and refresh the view accordingly. 1. The user should be able to select a specific customer from the DataGrid and cl ...

Question 1 what is a computer program what is structured

Question: 1. What is a Computer program? What is structured programming? 2. What is modular programming? Why we use it? 3. Please evaluate Sin (x) by infinite series. Then write an algorithm to implement it with up to th ...

Assignment - horse race meetingthe assignment will assess

Assignment - Horse Race Meeting The Assignment will assess competencies for ICTPRG524 Develop high level object-oriented class specifications. Summary The assignment is to design the classes that are necessary for the ad ...

Task working with arraysoverviewin this task you will

Task: Working with Arrays Overview In this task you will create a simple program which will create and work with an array of strings. This array will then be populated with values, printed out to the console, and then, w ...

Task silly name testeroverviewcontrol flow allows us to

Task: Silly Name Tester Overview Control flow allows us to alter the order in which our programs execute. Building on our knowledge of variables, we can now use control flow to create programs that perform more than just ...

Question - create a microsoft word macro using vba visual

Question - Create a Microsoft Word macro using VBA (Visual Basic for Applications). Name the macro "highlight." The macro should highlight every third line of text in a document. (Imagine creating highlighting that will ...

Task arrays and structsoverviewin this task you will

Task: Arrays and Structs Overview In this task you will continue to work on the knight database to help Camelot keep track of all of their knights. We can now add a kingdom struct to help work with and manage all of the ...

Background informationthis assignment tests your

Background Information This assignment tests your understanding of and ability to apply the programming concepts we have covered throughout the unit. The concepts covered in the second half of the unit build upon the fun ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As