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

Does bmw have a guided missile corporate culture and

Does BMW have a guided missile corporate culture, and incubator corporate culture, a family corporate culture, or an Eiffel tower corporate culture?

Rebecca borrows 10000 at 18 compounded annually she pays

Rebecca borrows $10,000 at 18% compounded annually. She pays off the loan over a 5-year period with annual payments, starting at year 1. Each successive payment is $700 greater than the previous payment. (a) How much was ...

Jeff decides to start saving some money from this upcoming

Jeff decides to start saving some money from this upcoming month onwards. He decides to save only $500 at first, but each month he will increase the amount invested by $100. He will do it for 60 months (including the fir ...

Suppose you make 30 annual investments in a fund that pays

Suppose you make 30 annual investments in a fund that pays 6% compounded annually. If your first deposit is $7,500 and each successive deposit is 6% greater than the preceding deposit, how much will be in the fund immedi ...

Question -under what circumstances is it ethical if ever to

Question :- Under what circumstances is it ethical, if ever, to use consumer information in marketing research? Explain why you consider it ethical or unethical.

What are the differences between four types of economics

What are the differences between four types of economics evaluations and their differences with other two (budget impact analysis (BIA) and cost of illness (COI) studies)?

What type of economic system does norway have explain some

What type of economic system does Norway have? Explain some of the benefits of this system to the country and some of the drawbacks,

Among the who imf and wto which of these governmental

Among the WHO, IMF, and WTO, which of these governmental institutions do you feel has most profoundly shaped healthcare outcomes in low-income countries and why? Please support your reasons with examples and research/doc ...

A real estate developer will build two different types of

A real estate developer will build two different types of apartments in a residential area: one- bedroom apartments and two-bedroom apartments. In addition, the developer will build either a swimming pool or a tennis cou ...

Question what some of the reasons that evolutionary models

Question : What some of the reasons that evolutionary models are considered by many to be the best approach to software development. The response must be typed, single spaced, must be in times new roman font (size 12) an ...

  • 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