Develop basic math operation game in java

Assignment Help JAVA Programming
Reference no: EM131561239

Need help writing this program in Java

So basically the task is to develop young kids to basic math such as subtraction, addition, division, multiplication. Math problems are generated randomly for them to answer. Correct answers are given a small reward ($0.05) while incorrect answers have a small penalty ($0.03) subtracted. When the player decides to return to play the game again the user statistics need to be recorded in a text file, this is to make sure its loaded back to the program. The player should be allowed to keep track how they're doing anytime while they're playing the game.

main() function should be mostly function calls and no greater than 100 lines, while the whole program is about 500-800 lines.

Requirements

1) Develop simple math problems:
-Addition (total must be integer >=0)
-Subtraction (difference must be integer >=0)
-Multiplication (product must be integer >=0)
Division (quotient must be integer >=0)

2) User input must be validated at every input. The program CANNOT crash because of an invalid entry.

3) The user's name, total correct answers, total wrong answers and total earnings must be kept track.

4) For every user a serperate text file must be created:
-If user is returning player statistics from the file are read from start of game
-At end of every game statistics are recorded

5) most of the required functions are in the list provided:
credits // this function is what the program does and is used for name display
menu // this function displays menu with many options
validateUserResponse // this function validates user input from menu
validateUserAnswer // this function validates user input and confirms that ONLY numeric answers are inputed by user
checkUserAnswer // this function checks user's answer to determine whether its correct or not
updateStats // this function keeps running total of game statistics in RAM
displayStats // this function displays statistics on the screen
retrieveStats // this function retrieves the returning player's stats from external txt file during the start of the game; txt file must be created for ths to work
saveStats // this function saves the players stats on external txt file
generateMultiplication, generateDivision, generateAddition, generateSubtraction // can also be used to generate problems.

6) Variable names must be meaningful.

7) Your code must be commented.

8) Variables must be in correct type and compute them in proper value.

Restrictions
No infinite loops such as for(;;) while(1) while(true) do{//code}while(1); no break statements to exit a loop, no validation errors, and no hanging errors.

Here is a description on how the program should flow:

1) A "Splash" screen must be displayed during the start of the game with the game's title (TheMathGame) and my name (Arin A.) After that the user is given a prompt to input their name with no numbers and blanks.

2) A menu must be displayed with:
1. Add
2. Subtract
3. Multiply
4. Divide
5. Stats
n/N to Quit
If user chooses first 4 options then random problems are displayed, but only positive integers

3) If the answer of the user is correct or incorrect an appropriate feedback is displayed on screen

4) If user chooses option 5 the stats are displayed like the following example:
Dmitry
Total Earnings $0.22
Total Correct 5
Total Incorrect 1
Press any key to continue...

Reference no: EM131561239

Questions Cloud

Develop arguments to support carilion clinics efforts : Develop arguments to support Carilion Clinic's efforts to become a comprehensive, vertically integrated healthcare system.
Unauthorized network access to obtain information : Is it acceptable for the U.S. government to support unauthorized network access to obtain information about other countries including terrorist activities?
How was this theory influenced by previous theories : How was this theory influenced by previous theories? Has the theory changed over time?
What was the under-applied or over-applied overhead : The budget for the month of May calls for 7,400 direct labor hours to be worked. What was the under-applied or over-applied overhead for the month of May
Develop basic math operation game in java : develop young kids to basic math such as subtraction, addition, division, multiplication. Math problems are generated randomly for them to answer
What are their similarities and differences : Is the software as a service in Cloud computing similar to Web Service? What are their similarities and differences?
How to synthesize information so that it is your work : Create the following headings and subheadings in your paper to indicate the organization of your information.
Explain what it means for a function f to be concave upward : Explain what it means for a function f to be (a) concave upward and (b) concave downward on an open interval i. Given that f has a second derivative.
How substantially all is defined in authoritative literature : write memo on this topic, specifically on how to determine whether substantially all of the risks and rewards of ownership are transferred in the lease

Reviews

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