You are designing a quiz game to help elementary school students with fraction calculations.
Your game should have a set of addition, subtraction, multiplication, division questions between two fractions stored inside a file.
o Each question should be on one line and be formatted to look as follows
▪ 3/4 + 4/5
▪ 5/8 * 9/4
The questions should be displayed to the player 1 question at a time and reward the player points for getting the answer to that question correct.
o Question was correct the first time
▪ 4 Points if it is in lowest terms
▪ 3 Points if it is not in lowest terms
o Question incorrect the first time but correct if given another chance.
▪ 2 Points if it is in lowest terms
▪ 1 Point if it is not in lowest terms
o Question incorrect after the second guess
▪ 0 Points.
Your program should always display the correct answer in lowest terms so the player can learn from their mistakes. Obviously there would be no need to display the correct answer in lowest terms if they already answered it in lowest terms.
• You should write the players name and score to a high score file when he/she is done playing the game.
• You should display the top score of anybody who has played the game when the game ends.
• All fractions will be displayed on the screen or entered from the file or the keyboard must be in the form “n/d”
• Supply your question bank and high score file as part of your solution to the drop box
It would be wise for you to create two types of objects in this assignment.
Consider an object in a 2D Plane. It has mass 𝑚 , is at position 𝑑⃑ , moving with a velocity 𝑣⃑. If a Force 𝐹⃑ acts on the object over a period of time 𝑡 then that objects position and velocity will change.
You are going to write a program that starts with two objects at some initial position and initial velocity and after reading in a series of motions (Forces and times) from a file, will display the final position and the final velocity of those objects and how far the objects are from each other.
You will find the following information helpful.
Position, velocity, and Force are all vector quantities in physics which means they have a size and a direction associated with them. The size and direction can be represented in a vector coordinate and a cartesian coordinate.
For Example: Consider the following vector coordinates.
𝑑⃑1=40 [𝑁30𝐸] is a vector coordinate and its cartesian coordinate is (20,34.64)
𝑑⃑2=90 [𝑁60𝑊] is a vector coordinate and its cartesian coordinate is (-77.94 ,45)
𝐹⃑=60 [𝑆40𝐸]is a vector coordinate and its cartesian coordinate is (38.57,-45.96)
𝑣⃑=120 [𝑆80𝑊] is a vector coordinate and its cartesian coordinate is (-118.18,-20.84)
The input for this program will be from a file
• It would be wise to assume that all quantities in this program could be a decimal number.
• The first two lines of the file will be the initial conditions of the first object.
• Its mass, initial position, and initial velocity.
• Each will be separated by a comma.
• The position and velocities will be in vector coordinates.
• The next N lines will describe the motion of the objects.
• There will be up to 10 motions possible in the file.
• There is not a number telling you how many motions exist in the file, read it and calculate until no motions are left
• Force acting on object 1, Force acting on object 2, time the force acts
• Each will be separated by a comma
• The Force will be in vector coordinates
Output for this program will be to the screen
• The positions and velocities of each object should be displayed in their vector coordinates
• The distance between the objects should be stated to two decimal places.
Your design should incorporate at least 2 different encapsulated classes to help you solve this
Look up your kinematic Equations from physics class to determine the new position and velocity after each motion
You are going to write a program that helps students with some simple grade 10 math work.
Design a class that will accomplish the following
Fields:
Constructor:
Methods:
Create a test program that shows all of the above methods working
Four friends play a simple dice game where they each roll 2 six sided dice and record the sum of the faces shown.
The friends determine who is an even and odd player by rolling a single dice at the start of the game. If they roll an even number they are an even player, if they roll an odd number they are an odd player.
When players win they receive the sum of their dice as points. The friends will play the game 20 times each day and keep track of how many points they each have after the end of each day in a log book. Each day that they play, they update the log book with there new accumulated # of points.
Write a program that will simulate this game being played for 1 day. Each other day the game is played would involve running the simulation again.
Supply your Log Data File as part of your solution to the drop box
It would be wise for you to create two types of objects in this assignment.
Check out our programing in python courses that focus on high school level coding.
These courses are complete with interactive coding lessons, teacher led videos, and more practice questions with complete solutions
Return To International Baccalaureate Computer Science Main Page