Delivery in day(s): 4
COIT20256 Data Structures and Algorithms
This course is designed in which students will study advanced data structures and algorithms for software development with the use of an object-based programming language.
Students will learn how to analyze the use of data structure and algorithms to construct solutions to problems of IT.
Assessment 1- (GUI and event handling)
Value:total value of this assessment task is 15%.
a. Evaluate, develop and implement software solutions
b. Select and compare applicable data structures in program design
c. Apply classes, polymorphism, inheritance, and exception handling
d. Test software implementation to make sure correctness and maintainability
In this assessment, you will need to write a Java windowed application to create a maths speed test that students can use to improve their arithmetic calculation skills.
Overview of the application
The program creates a set of 10 division questions. To do the test, the user sets the timer off, answer all the questions and submit. Here a division question is defined as an integer division problem as Java programming integer division operation, where the result of the division is an integer and the fractional part is ignored. For instance, 5/2 gives the result 2 instead of 2.5.
When the program is started, the GUI should resemble the one given below.
The GUI components starting from the top containing:
a. A top panel that includes a label for the title of the application and a label to show the timer.
b. A middle panel that is separated into 3 columns. A text area is displayed on the right column of the middle panel. On the left are 2 sub-panels. One including labels for the 10 division questions and one including 10 text fields for the user answers.
c. A bottom panel that includes a generate button, a start button, a submit button, a reset button, and an exit button.
Some details of how the program functions
1. The user must create the 10 division questions before beginning the test. When ‘Generate’ button will be pressed, ten division questions will be randomly created and displayed on the panel. Each problem will be an object of type division class which includes 3 class data items- the 2 operands of the division and the division result. The next fields are made uneditable with the purpose of the user doesn’t start entering answers before pressing the ‘Start’ button. For effortlessness, assume two operands ranges are in 1 to 50 and 1 to 10 respectively. A screenshot is shown below:
2. When the user presses the ‘Start’ button, the text fields are set to editable and the timer is started. Then the user can fill the answers into the text fields.
A screenshot is shown below:
3. When the user has finished the test, he/she clicks the ‘Submit’ button and the test is automatically marked. The cells of right answers are colored green and the ones with wrong answers and invalid entries are colored red and the score details are shown in the text field. These contain the time taken to complete the test, the number of right answers, and the score achieved.
A screenshot is given below:
4. The formula for calculating the score is as follows:
Raw Score = 200 * (number of correct answers * 2.0) / (Time taken).
The raw score is cast to an integer. This is only an expected normal calculation model. You may notice that the score depends on the no. of right answers and the time taken.
5. The reset button resets the GUI to the state when the program is just started, that is, as shown in the 1st diagram.
6. The ‘Exit’ button terminates the application.
7. There are only 3 menu items which are under File, Edit and Help menu. As the user press the ‘File-Save’ menu item, the program will save the data appeared in the text data to a text file named TestResult.txt.if the user presses the ‘Edit-Reset’ menu item, the program will reset the GUI as the ‘Reset’ button does. If the ‘Help-About’ menu is pressed, a message box will pop up as shown:
The division class includes the data numbers of 2 operands and the result of the division, a constructor with 2 parameters of operands, along with getting method to retrieve the quotient from the result of 2 operands division. A division operation is a typical illustration where division by zero should be avoided, suitable exception handling and displaying message should be considered in the class definition. A set of 2 random numbers are created for Division class constructor as arguments in the application class.
a. You require appropriately named variables to store scores, clock, and other variables.
b. You will need using an object array that stores ten division objects. Each array element is a Division object. Thus ten division questions are 10 elements of this array.
c. You’ll require using an inner class for the test timer. You can name the class name of the complete application as MathChallenge or MathInterface that includes GUI and the main method.
You’ll implement your program in Java by the use of either the TextPad Editor or NetBeans. NetBeans version 6.9 or above is available in computing labs of University but may also be downloaded from the below-mentioned site: http://netbeans.org/downloads/index.html.
Program compiles and runs (1 mark)
GUI resembles given specification (2 marks)
Generate button work (1.5 Marks)
Start button work (1.5 Marks)
Mark test works (1.5 Marks)
Submit button works (1 Mark)
Timer/inner class works (1 Mark)
Display log works (1 Mark)
Reset and exit buttons work (1 Mark)
File/Edit/Help menu items work (1.5 Mark)
Division class implemented correctly (1 Mark)
Code quality (1 Mark)
Less late penalty (5% per day)
Problems students may face in completing this assessment
Students may face several issues while completing this assessment such as understanding the data structure and algorithm, insufficient time etc. For such students, we provide necessary help and guidance to help them to excel their grades and live a stress-free student life. Our technical experts will help students in the best way to resolve their academic issues.