Write java windowed application to generate maths speed

Assignment Help Data Structure & Algorithms
Reference no: EM131775792

Objectives

- Analyse, develop, and implement software solutions
- Choose and compare appropriate data structures in program design
- Apply classes, inheritance, polymorphism, and exception handling
- Test software implementations to ensure correctness and maintainability

Assignment 1 Specification

Introduction

For this assignment, you will write a Java windowed application to generate a maths speed test that students can use to sharpen their arithmetic calculation skills.

Overview of the application

The program generates a set of ten division questions. To do the test, the user sets the timer off, answers all ten questions and then submits the answers. Upon submission, the program automatically marks the test and displays performance statistics. Here a division question is defined as an integer division problem as Java programming integer division operation, where the result of division is an integer and the fractional part is ignored. For example, 5/2 gives the result 2 instead of 2.5.

The GUI
When the program is first started, the GUI should resemble the one given below.

The GUI components beginning from the top include:
- A top panel that contains a label for the title of the application and a label (invisible on this diagram) to display the timer.
- A middle panel that is divided into three columns. A text area is displayed on the right column of the middle panel. On the left are two sub- panels - one containing labels
for the ten division questions (each label will display a division question) and one containing ten text fields for the user answers.
- A bottom panel that contains 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 generate the ten division questions before starting the test. Upon pressing the Generate button, ten division questions will be randomly generated and displayed on the panel. Each division problem will be an object of type Division class which contains three class data items -
the two operands of the division and the division result. The text fields are made uneditable so that the user does not start entering answers before pressing the Start button. For simplicity, we assume the two operands (i.e. dividend and divisor) ranges are in 1-50, and 1-10 respectively.

2. When the user clicks the Start button, the text fields are set to editable and the timer is started. The user then can enter answers into the text fields.

3. When the user has completed the test, he/she presses the Submit button and the test is automatically marked. The cells with the correct answers are coloured green and the ones with incorrect answers and invalid entries are coloured red. Score details are displayed on the text area. These include the time taken to complete the test, the number of correct answers, and the score achieved.

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 just an assumed simple calculation model. You may notice that the raw score depends on number of correct answer and the test time taken.

5. The Reset button resets the GUI to the state when the program is initially started, that is, as in the first diagram shown.

6. The Exit button terminates the application.

7. There are only three menu items, one under File menu, one under Edit menu and the other one under Help menu. When the user clicks the File → Save menu item, the program will save the data appeared on the text area (including the time taken in the test, number of correct answer, as well as the score achieved) to a text file named TestResult.txt. If the user clicks the Edit→ Reset menu item, the program will re-set the GUI as the Reset button does. If the Help→About menu item is clicked, a message box will pop up.

Division class

The Division class contains the data members of two operands (i.e. dividend and divisor) and the result of division, a constructor with two parameters of operands, as well as a get method to retrieve the quotient from the result of two operands division. As division operation is a typical example where division by zero should be avoided, appropriate exception handling and displaying message should be considered in the class definition. In the application class, a set of two random numbers are generated for Division class constructor as arguments.

Data Structures

- You need suitably named variables to store scores, clock and other variables.
- You will need using an object array that stores 10 Division objects. Each array element is a Division object. Thus 10 division questions are 10 elements of this array.
- You will need to use an inner class for the test timer. You can name the class name of the entire application as MathsChallenge or MathsInterface that contains GUI and main method.

Implementation platform

You will implement your program in Java using either the TextPad Editor (recommended) or NetBeans. NetBeans version 6.9 (or above) is available in University computing labs.

Attachment:- Assignment.rar

Verified Expert

This assignment is to write a Java windowed application to generate a maths speed test that students can use to sharpen their arithmetic calculation skills. This project is done normal text editor and compiled and executed by java JDK 1.8. This project displays GUI with 3 different panels and 1 menu bar with 3 menus. under each menu one menu item is added and functionalities also defined. time taken by the student to complete the test is calculated in secs and displayed on the screen when the user clicks the submit button.

Reference no: EM131775792

Questions Cloud

Business planning-who are you trying to attract : Many times the concept phase is either given or has been bouncing around in your mind for some time. Who Are You Trying to Attract?
Create a table add text to a table and format tables : Create a table, add text to a table, and format tables. You will also insert text from a file, change and reorganize text and use Find and Replace.
Determine the total sales the total cost of merchandise : Determine the total sales, the total cost of merchandise sold, and the gross profit from sales for the period
Prepare a trial balance for bci as of september : Following are the general ledger account balances of Balcones Company, Inc (BCI), Prepare a trial balance for BCI as of September 30, 2009
Write java windowed application to generate maths speed : COIT20256 - Data Structures and Algorithms - write a Java windowed application to generate a maths speed test that students can use to sharpen their arithmetic
Variable overhead is applied on the basis of direct labor : Variable overhead is applied on the basis of direct labor dollars, whereas fixed overhead is applied on the basis of machine hours
Distinguishes bilateral contract from a unilateral contract : What distinguishes a bilateral contract from a unilateral contract? Give a fact pattern for each.
Evaluate spring constant using transfer function approach : A rotor system such as the one shown in Figure consists of a disk with the mass moment of inertia J = 0.1 kg-m2 , a damper with viscous.
Explain the difference and reconcile operating income : Explain the difference and reconcile operating income for the two methods. Which costing method would you recommend to the CFO? Why

Reviews

len1775792

12/21/2017 1:27:39 AM

Assessment Item 1 Marking criteria Item Description Allocated mark Your mark 1 Program compiles and runs 1 2 GUI resembles given specification 2 3 Generate button work 1.5 4 Start button work 1.5 5 Mark test works 1.5 6 Submit button works 1 7 Timer/inner class works 1 8 Display log works 1 9 Reset and exit buttons work 1 10 File/Edit/Help menu items work 1.5 11 Division class implemented correctly 1 12 Code quality 1 13 Less late penalty (5% per day) 14 Less Plagiarism Total 15 Note: • If your program doesn’t compile or run, partial marks will be allocated by inspection of the source code.

len1775792

12/21/2017 1:27:33 AM

For this assignment, you will write a Java windowed application to generate a maths speed test that students can use to sharpen their arithmetic calculation skills. Assignment submission 1. You must submit your assignment using the Moodle online submission system. 2. Your submission must include two files: (a) Your application source code - MathsChallenge.java, and (b) the source code for the Division.java. You must zip up your files and name the zip file Assignment1.zip before submitting. Do NOT submit an executable version of your program, it will not be marked. 3. IMPORTANT: You must make a back up of your assignment before submitting in case your sent copy becomes corrupted.

Write a Review

Data Structure & Algorithms Questions & Answers

  Karatsuba''s divide-and-conquer algorithm

In class we discussed Karatsuba's divide-and-conquer algorithm for integer multiplication, which multiplies n-bit numbers by recursively multiplying n bit numbers. We take two numbers X and Y and split them each into their most significant half a..

  Create algorithm to calculate union of two input sets-array

Create algorithm to calculate union of two input sets given as arrays, both of size O(n). The output must be array of distinct elements that form union of the sets.

  Data and process modeling

The next phase in the project development cycle is to develop a logical model of the system based on the system requirements. The first step is about the "what" step. We need to show what the system will do, without worrying about how it will do..

  How much time will the algorithm take to terminate

How many solutions are there for this general SAT problem as a function of n? How much time will the algorithm take to terminate?

  Create efficient algorithm to find path in graph

Given connected undirected graph G described by the adjacency list representation create the efficient algorithm to find the path in G which goes through exactly once in each direction.

  Create algorithm which takes as inputs matrices

Create the algorithm which takes as inputs, matrices C, D, and vertex indices i and j, and returns minimum-cost path from vertex i to vertex j.

  Determine the route from new york to los

Determine the route from New York to Los - Angeles that uses the minimum amount of gas.

  Truth teller problem

Assume you were in a nation where each person was either a truth teller or a liar. Determine what single question could you ask a person that would permit you to detect whether that person was a truth teller or a liar?

  Discuss advantages and disadvantages of education

Compare virtual classes with at least two other delivery methods (TV-based courses, on-site company training, using manuals and textbooks individually, etc.)

  Estimate the number of comparisons used in given algorithm

Suppose that a list contains integers that are in order of largest to smallest and an integer can appear repeatedly in this list.

  Modify algorithm to always select president of company

How would you modify your algorithm to always select the president of the company (regardless of his fun rating or the consequences on the overall amount of fun we can achieve)?

  Compares the number of comparisons used by various data

compares the number of comparisons used by various data structures for a single algorithm. the algorithm is the one

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