Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

Reading and Writing Files
As part of your work for the ACME programming firm, you have been asked to prepare two pieces of software for giving and creating a math quiz. The requirements for each of these pieces of software are given below. 
The software that gives a math quiz will do the following.
1. Read problems from a file named "math.dat". 
a. There will be one problem per line in this file. 
b. You should handle addition, subtraction, multiplication, and division
c. Problems on each line will be of the form "number1 mathOp number2" where number1 and number 2 are some integer and mathOp is +, -, /, *
2. Present each problem one by one to the person taking the exam
a. You should make sure to inform them if they got the answer correct or incorrect
b. You should also provide the correct answer.
3. Grade the exam based on problems they correctly answered. 
a. Inform them how many they answered correctly out of the total.
b. Give the person a percentage of how many they answered correctly.

The software that creates the math quiz will just create a file named math.dat.
1. The program will prompt the end user to for each problem they want to enter.
2. The quiz creator should be able to do make the following problem types: addition, subtraction, multiplication, and division
3. The program will ensure that the output file is of the form "number1 mathOp number2" where number1 and number 2 are some integer and mathOp is +, -, /, *
4. The output file should be usable in the software that gives the math quiz. 

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M996633

Have any Question?


Related Questions in Computer Engineering

Meannbsp3290 milesstandard deviation ofnbsp384 mileswhat is

Mean 3290 miles Standard Deviation of 384 miles What is the probability that the mean of a sample of 33 cars would be less than 3160 miles?

Suppose you are given a connected graph g with edge costs

Suppose you are given a connected graph G, with edge costs that are all distinct. Prove that G has a unique minimum spanning tree.

You really need help with this assignment with step by step

You really need help with this assignment with step by step instructions on how to complete it. Using SQL Developer and SQL Plus 1. Create role customer_entry 2. Grant role customer_entry permission to update OE.CUSTOMER ...

These questions are for unix linuxselect the lines from

THESE QUESTIONS ARE FOR UNIX (LINUX) Select the lines from file file1 that have exactly three characters in them. Select the lines from file file1 that have at least three characters in them. Select the lines from file f ...

Simple scenario bull at the beginning of each semester

Simple Scenario • At the beginning of each semester, students get a course catalogue containing a list of course offerings for the semester. Information about each course, such as professor, department, and prerequisites ...

Calculate the present worth of all costs for a newly

Calculate the present worth of all costs for a newly acquired machine with an initial cost of $30,000, no trade-in value, a life of 15 years, and an annual operating cost of $13,000 for the first 4 years, increasing by 1 ...

The newly elected president needs to decide the remaining 4

The newly elected president needs to decide the remaining 4 spots available in the cabinet he/she is appointing. If there are 13 eligible candidates for these positions (where rank matters), how many different ways can t ...

A firm produces product a and product b this years sales

A firm produces Product A and Product B. This years sales price of Product A have decreased tremendously, and the sale of Product B has increase by 10 percent. The firm has threeemployees that can produce Product A and f ...

Here is a series of addresses in hexadecimal20w 3cr 10r 16w

Here is a series of addresses in hexadecimal: 20(w), 3C(r), 10(r), 16(w), 20(r), 04(w), 28(r), 6(r), 10(w), 17(w) Assume a LRU replacement algorithm. Draw each of the following caches as it would appear at the end of the ...

1 what is the purpose of exclusive gates such as the xor

1. What is the purpose of exclusive gates such as the XOR and XNOR? 2. What function do these gates perform?

  • 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