Program to produce statistics based on scores recorded

Assignment Help JAVA Programming
Reference no: EM131958816

Task 1

Suppose you are commissioned by the Australian Football Association (AFL) to write a program designed to produce statistics based on complete scores recorded in a season. These scores are kept in a file called aft.txt (available on interact resources). You are also given the following information about a football season:
- League consists of 18 football teams
- There are 22 rounds in each season
- In each round teams play against each other and the score of each team is recorded as an integer and kept in the text file referred to above (aft.txt)

Your task is to write a complete java program (a java class with the main method) called Process Scores, which will read the scores from the text file provided, store the scores in an array of integers and then using a number of independent static methods, calculate and display the required statistics relating the afl scores.

The Java class you are required to author will contain the following static methods:
- lowest will take the array of scores as an argument and return the lowest score in the season
- highest will take the array of scores as an argument and return the highest score in the season
- range will take the array of scores as an argument and return the difference between the highest score and the lowest score in the season
- average will take the array of scores as an argument and return the average of all scores in the season
- median will take the array of scores as an argument and return the median score in the season
- mode will take the array of scores as an argument and return the mode of the scores in the season Note that all of the methods described above, should be static methods; user defined methods (you have the write the definition of each yourself); and completely independent of each other (you should not invoke anyone of them within the other method definition). Also, the original array of scores should not be modified by any of the methods.
Ensure that the program is appropriately documented throughout and thoroughly tested to demonstrate its correct operation.
You need to submit java and class files, a short discussion to explain the logic on how the problem has been solved, and sample output (for detail please see marking criteria and presentation below).

Task 2
Design a class named Light to represent a conference hall light. The class contains:
- Three constants named LOW, MEDIUM, and HIGH with the values 1, 2, and 3 to denote the light brightness.
- A private int data field named brightness that specifies the brightness of the light having a default value of LOW.
- A private boolean data field named on that specifies whether the light is on or off having a default value of false.
- A string data field named color that specifies the color of the light having a default value of red.
- The accessor and mutator methods for all three data fields.
- A no-arg/default constructor that creates a default light.
- A method named toString() that returns a string description for the light. If the light is on, the method returns the fan brightness and color in one combined string. If the light is not on, the method returns the fan color along with the string "light is off' in one combined string.
- Draw the UML diagram for the class and then implement the class.
- Write a test program TestLight that creates two Light objects. Assign high brightness, color yellow, and turn it on to the first object. Assign medium brightness, color blue, and turn it off to the second object. Display the objects by invoking their respective toString methods.

Ensure that the program is appropriately documented throughout and thoroughly tested to demonstrate its correct operation.
You need to submit java and class files, a short discussion to explain the logic on how the problem has been solved, UML diagram, and sample output (for detail please see marking criteria and presentation below).

Rationale
This assignment has been designed to allow students to test and demonstrate their ability to:
- interpret design requirements expressed in Unified Modelling Language (UML) (learning outcome 2);
- use object-oriented techniques and Java resources to develop small applications consisting of a number of classes (learning outcome 5);
- apply basic testing and debugging techniques in program development (learning outcome 6);
- implement algorithms in Java (learning outcome 1);

Reference no: EM131958816

Questions Cloud

Determine who are the stakeholders besides the obvious : How would you handle this situation? Remember, you are entitled to your own opinion but not your own facts.
How much system capacity can be gained : How much slack (unused capacity) is available in other departments? How much system capacity can be gained by adding capacity to the bottleneck?
Identify at least two ways the law has been used to respond : Identify at least 2 ways the law has been used to respond to health-harming social needs in health communities. Do you feel the response was effective?
Examine the nature and functions of strategic management : Examine the nature and functions of strategic management. Research what the vision and objectives are for the organization over the next two years.
Program to produce statistics based on scores recorded : Write a complete java program (a java class with the main method) called Process Scores, which will read the scores from the text file provided
Compare the initial activities each article recommends : Compare the initial activities each article recommends. How does each manage the issue of having the right representatives at the table to work on the project?
Calculate the capacity of each machine center : Calculate the capacity of each machine center and the capacity of the system. Analyze where the focus of the company's efforts should be if Beck wants to expand
Analyze a particular banks performance : This project is designed to improve your ability to analyze a particular bank's performance.
Calculating the number of periods : At 6.9 percent interest, how long does it take to double your money? At 6.9 percent interest, how long does it take to quadruple it?

Reviews

len1958816

4/26/2018 5:13:04 AM

You need to submit a single zip file containing: 1. All java, class files and testing outputs 2. A doc/pdf file (not more than 500 words) with the description of the problems including input and output in your own words, description of how you test this program with explaining logic, a snapshot of the program output, and UML design

len1958816

4/26/2018 5:12:54 AM

Provided java program executes without crashing with minimal errors Provided java program executes without crashing with some errors Implement and integrate most of the Light and TestLight classes functionaliies Implement Light and TestLight classes with majority functions and combine them for testing with all components and their parameter, and return IIUML with most components and their parameter, and return 1UML with majority components and their parameter, and return HUML with incomplete components and their parameter, and return 1 Most of the required documents and sufficient number of test outputs provided Majority of the required documents and sufficient number of test outputs provided Most of the required documents and sufficient number of test outputs provided Majority of the required documents and sufficient number of test outputs provided

len1958816

4/26/2018 5:12:46 AM

'Criteria ParksOHD I DI PCP 1PS I a. Execution: Program launches, executes and terminates without crashing; program executes as specified. 1.0 program executes perfectly without crashing towards ntended output t. Program design & implementation: Light (3.0) and TestLight (3.0) classes are implemented as pecified, showing good logic. u 6p Implement and integrate all of the Light and Testlight :lasses 1c. UML design: For class Light. 11.0 'UML with all components and their parameter, and return IIUML with most components and their parameter, and return 1UML d. Presentation: Code uses good style (identifier naming, indentation, header and infinecomments) 1 0 . All of the required documents and sufficient number of test 3utputs provided e. Submission: The document with all components (analysis, testing, and output) 1.0 All of the required documents and sufficient number of test 3utputs provided

len1958816

4/26/2018 5:12:33 AM

'Criteria IlMarksllHD 101 'CR I PS Provided java program executes without crashing with some errors Provided java program may be incomplete and/or executes with some errors Implement ProcessScores class with majority of the functions and integrate the mark class with it for testing Implement ProcessScores class with some functions and then combine it with Marks class for testing Most naming, indentation, header and inline comments included Some naming, indentation, header and inline comments included Majority of the required documents and sufficient number of test outputs Just enough of the required documents and sufficient number of test provided outputs provided

len1958816

4/26/2018 5:12:24 AM

1.0 Program executes perfectly without crashing towards intended output Provided java program executes without crashing with minimal errors 7.,„ 0 Implement and integrate classes with all functions by maintaining logical flow Implement ProcessScores class with most of the functions and integrate the mark class with it for testing 1.0 Excellent naming, indentation, header and inline comments included Good naming, indentation, header and inline comments included NI of the required documents and sufficient number Most of the required documents and sufficient number of test outputs 1.0 of test outputs provided provided

len1958816

4/26/2018 5:12:15 AM

Marking criteria Assessment 2 (Total Marks 20) Task 1 (Total Marks 10) 'Criteria IlMarksllHD 101 'CR I a. Execution: Program launches, executes and terminates without crashing; programexecutes as specified. b. Program design & implementation: Class with the methods: main, lowest, highest, range, average with show good design and correct logic .-.... Presentation: Code uses good style (dentifier naming, indentation, header and inline comments) d. Submission: the documents with all components (analysis, testing, and output)

Write a Review

JAVA Programming Questions & Answers

  Recursive factorial program

Write a class Array that encapsulates an array and provides bounds-checked access. Create a recursive factorial program that prompts the user for an integer N and writes out a series of equations representing the calculation of N!.

  Hunt the wumpus game

Reprot on Hunt the Wumpus Game has Source Code listing, screen captures and UML design here and also, may include Javadoc source here.

  Create a gui interface

Create GUI Interface in java programing with these function: Sort by last name and print all employees info, Sort by job title and print all employees info, Sort by weekly salary and print all employees info, search by job title and print that emp..

  Plot pois on a graph

Write a JAVA program that would get the locations of all the POIs from the file and plot them on a map.

  Write a university grading system in java

University grading system maintains number of tables to store, retrieve and manipulate student marks. Write a JAVA program that would simulate a number of cars.

  Wolves and sheep: design a game

This project is designed a game in java. you choose whether you'd like to write a wolf or a sheep agent. Then, you are assigned to either a "sheep" or a "wolf" team.

  Build a graphical user interface for displaying the image

Build a graphical user interface for displaying the image groups (= cluster) in JMJRST. Design and implement using a Swing interface.

  Determine the day of the week for new year''s day

This assignment contains a java project. Project evaluates the day of the week for New Year's Day.

  Write a java windowed application

Write a Java windowed application to do online quiz on general knowledge and the application also displays the quiz result.

  Input pairs of natural numbers

Java program to input pairs of natural numbers.

  Create classes implement java interface

Interface that contains a generic type. Create two classes that implement this interface.

  Java class, array, link list , generic class

These 14 questions covers java class, Array, link list , generic class.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd