Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

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

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M92584474
  • Price:- $60

Priced at Now at $60, Verified Solution

Have any Question?


Related Questions in Computer Engineering

Q2 what layer uses encryptiondecryptiona what is

Q2. What layer uses encryption/decryption? a. What is encryption? Q3. What addressing system is used at Data Link layer? a. How long is the address? Is it Physical or logical? b. Is it unique or not unique?

Define risk and explain why this concept is important to

Define risk and explain why this concept is important to small business managers.

A new machine averages 4 clock cycles per instruction and

A new machine averages 4 clock cycles per instruction, and runs at a system clock of 20 MHz. The Axiom-Verge algorithm set to benchmark the system will take an even 3000 instructions to complete. a) Knowing how many cloc ...

Inside the oncreate method fill in the code so that we set

Inside the onCreate method, fill in the code so that we set the layout and GUI defined in activity_main.xml? public void onCreate( Bundle savedInstanceState ){ super.onCreate(savedInstanceState); // Your code goes here }

How does the learning environment effect the success of

How does the learning environment effect the success of students? Provide examples.

Give a recursive algorithm that generates a similar series

Give a recursive algorithm that generates a similar series of coins for changing n cents. Don't use dynamic programming for this problem.

The national sporting goods association nsga conducted a

The National Sporting Goods Association (NSGA) conducted a survey of the ages of individuals that purchased skateboarding footwear. The ages of this survey are summarized in the following relative frequency distribution. ...

Question suppose the ieee 80211 rts and cts frames were as

Question : Suppose the IEEE 802.11 RTS and CTS frames were as long as the standard DATA and ACK frames. Would there be any advantages to using the CTS and RTS frames? Why or why not?

Every day your friend commutes to school on the subway at 9

Every day your friend commutes to school on the subway at 9 AM. If the subway is on time, she will stop for a $3 coffee on the way to class. If the subway is delayed she skips the coffee and goes straight to class. The p ...

Bob is interested in studying whether the average household

Bob is interested in studying whether the average household income in city A is lower than the national benchmark, μ 0  = $51,500. He collects income information from a random sample of 100 households, conducts a one-sam ...

  • 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