Home / Expert Answers / Computer Science / exercise-overview-implement-a-java-program-that-creates-math-flashcards-for-elementary-grade-pa876

(Solved): Exercise Overview Implement a Java program that creates math flashcards for elementary grade ...



Exercise Overview
Implement a Java program that creates math flashcards for elementary grade students. User will enter his/he

Functional Requirements // These are what the user sees.
- User is prompted for and enters name at the beginning of a session

Technical Requirements // These requirements happen in the background.
The system should include the following Java component

Cards class - Cards class should be appended to your driver class so you only need to send one .java file
- Instantiate objec

Class Session - Session class should be appended to your driver class so you only need to send one .java file
- Instantiate o

Code-specific technical requirements
- Suggested algorithms or code sections
- factor1 or factor2 = random.nextint(hiFactor -

Example output (from the Eclipse console)
Enter your name: Kevin
What is the type of problem you wish to work? Enter A, S, M,

Exercise Overview Implement a Java program that creates math flashcards for elementary grade students. User will enter his/her name, the type of problems to be worked (A, S, M, or D), the range of the factors to be used in the problems, and the number of problems to work. The system will present problems, evaluate user responses to the problems, score the problems, and provide statistics about the session at the end. Important note: You may assume the user enters logical responses to every prompt, meaning no exception checks or handling are required. Functional Requirements // These are what the user sees. - User is prompted for and enters name at the beginning of a session. - User enters their choice of the four math operations - addition, subtraction, multiplication, and division. Only one type of problem can be done in each session. - User will enter additional session parameters from prompts - number of problems to work and the range of values desired in the problems, e.g., addition with factors ranging from 0 to 12. - System presents problems to the user consistent with the entered parameters. - User will respond to problems with an answer and the system will provide immediate feedback for each problem, correct or incorrect. - System will provide summary statistics for the session once all problems are completed, including number of problems, number of correct problems, percentage score, and a list of the problems in the user session. Technical Requirements // These requirements happen in the background. The system should include the following Java components: - Name your source code main class (the .java file) as follows: YourName_Project2.java. use: "smokey" as project name: smokey_Project2.java - Comments outline the sections of the system. - Include comments at the beginning of the program to provide a 1-or 2-sentence description of the system and identify the developer of the system (you). - Include comments within each class to identify and/or describe the section. - Design - 3 different classes - Driver or main - includes the main method and is the traffic cop of the system - Cards - stores data variables required for creating the FlashCard problems, and defines methods for presenting the problems and evaluating responses (e.g., provides the random values for factors - Session - stores the data variables for the overall user session and defines the methods to manage the user session - Each class should have the following sections identified with comments - Instantiate Objects, Declare Variables, Define Constructors, Define Methods - Driver class - Your driver class will have the identifier of [your namel Project2.java - Instantiate objects - Scanner, Cards, Session - Declare variables - none required - Define constructors - use default constructor only - Define methods - none required - Other - driver class will contain the loop for the number of problems Cards class - Cards class should be appended to your driver class so you only need to send one .java file - Instantiate objects - Random, Scanner - Declare variables - all variables have private visibility modifier - int loFactorí - int hiFactori - int factor 1 . - int factor 2 . - int answer: - int response: - int \( a=0, b=0, c=\underline{\underline{0}} \) - String corlnc \( = \) "Incorrect": - Define constructors - use default constructor only - Define methods - setLoFactorRange(int lo) - setHiFactorRange(int hi) - setFactors() - setFactor 10 I/ For problems with division by zero to set only 1 factor - getFactor1() - getFactor2() - setProb(Session s)// Includes switch and the cases for the probTypes - SetResponse(Session s) - getA(I) - getB() - getC() - getResponse() - getCorlnc() Class Session - Session class should be appended to your driver class so you only need to send one .java file - Instantiate objects - Scanner - Declare variables - String name - String probType - String longProbType - String oper - int numProb - int score - double scorePct - String[] history - Define constructors - use default constructor only - Define methods " setlnputs(Cards c) // Prompt for and read-in all inputs in one method - setNamelt - getName(l) - getLongProbType() - getOper(l) - getNumProb() - prtintro(Cards c) - incScore() - sethistory(Cards c, int i) - set ScorePct() - get - corePct() - getScore() - prtSummary0 - prtHistoryAndOutrol) // Print history and outro message in one method Code-specific technical requirements - Suggested algorithms or code sections - factor1 or factor2 = random.nextint(hiFactor - loFactor + 1) + loFactor; - probType = probType.toUpperCase(); so you need only switch on the uppercase value - Use switch(probType) to set the longProbType - Use a second switch(probType) to create the problems for the different problem types Clean-up from Project 1 - All inputs to printed prompt on the console should be on the same line as the prompt with 1 blank after the prompt ends. - For example, prompt would be System.out.print("Enter name: ") using print (not println) - There should be a space between the elements of the printed problem. - System.out.print(factor \( 1+{ }^{n}+{ }^{\prime \prime}+ \) factor \( \left.2+{ }^{\prime \prime}={ }^{n}\right) \) - There should be 2 blank lines after the intro is printed and before the first problem is displayed. - There should be a blank line before each new problem is displayed. Use System.out.println(): - There should be 2 blank lines before the session summary is printed. - There should be 1 blank line between the session summary and the print out of the history. - There should be 2 blank lines between the last line of the history and the first line of the outro. Example output (from the Eclipse console) Enter your name: Kevin What is the type of problem you wish to work? Enter A, S, M, or D: \( d \) Enter the lowest factor value for your flashcard problems: \( \theta \) Enter the highest factor value for your flashcard problems: 9 Enter the number of problems you wish to work: 3 Hi Kevin, and welcome to the 3312 FlashCard System! You have chosen the operation Division. The range of factors you have chosen is from 0 to 9 , inclusive. You have chosen to work 3 problems. Press any character key and then Enter to begin. \( 24 / 8=3 \) Correct! \( 9 / 3=3 \) Correct! \( 30 / 6=4 \) Incorrect! Correct answer is 5 Session Summary 3 problems, 2 correct Score is \( 66.7 \) Problems \( 24 / 8=3 \), Correct, correct answer is 3 \( 9 / 3=3 \), Correct, correct answer is 3 \( 30 / 6=4 \), Incorrect, correct answer is 5 Thank you for using the 3312 FlashCard System, Kevin. Come back and play again real soon!


We have an Answer from Expert

View Expert Answer

Expert Answer


Introduction: Here we have to implement a Java program that creates math flashcards for elementary grade students. User will enter his/her name, the t
We have an Answer from Expert

Buy This Answer $5

Place Order

We Provide Services Across The Globe