Developing a fraction structure for teacher’s pet software

Assignment Help Basic Computer Science
Reference no: EM131396138

You are developing a Fraction structure for Teacher's Pet Software. The structure contains three public data fields for whole number, numerator, and denominator. Using the same structure, write a main()function that declares an array of five Fraction objects. Prompt the user for values for each field of each Fraction. Do not allow the user to enter a value of 0 for the denominator of any Fraction; for each Fraction, continue to prompt the user for a denominator value until a non-zero value is entered. After all the objects have been entered:

» Display the whole number, numerator, and denominator for each of the five Fraction objects as entered.

» Next, display the five Fraction objects all converted to proper form-that is, if the user entered a value such as 2 6/4, now display it as 3 1/2.

» Next, display the sum of all the Fractions and the arithmetic average of all the Fractions.

Reference no: EM131396138

Questions Cloud

Display all the data for all five accounts : After displaying the statistics, prompt the user for an account number and display the data for the requested account, or display an appropriate message if no such account number exists. Continue to prompt the user for account numbers until an app..
Produce bananas and pineapples on the macro islands : Dianna and Jim both produce bananas and pineapples on the Macro Islands. The table above shows some of the combinations of the two products that can be produced using the same resources.
Describe the anatomy and physiology of a plant : Describe the anatomy (structure) and physiology (function) of a plant. Is the structure of your plant a modification from the standard root, stem, leaf, or flower?
Analyze using chi square techniques : The fish were recaptured above the fork in one stream or the other. Analyze using chi square techniques and write a sentence about Hasler's hypothesis.
Developing a fraction structure for teacher’s pet software : Next, display the five Fraction objects all converted to proper form-that is, if the user entered a value such as 2 6/4, now display it as 3 1/2.
Develop an understanding of what money is : Week 3 will help students develop an understanding of what money is, what forms money takes, how the banking system helps create money, and how the Federal Reserve controls the quantity of money. Students will learn how the quantity of money affec..
What does human imagination have to do with computer graphic : What does human imagination have to do with computer graphics? How do the words of Jesus and the apostle Paul relate? (how do those words help a computer graphicist do a good job?)
Write a summary of professional research : Prior to beginning work on this discussion, be sure to review the Graduate Research Guide for Psychology, Psychology Subject Guide, Academic Voice for Graduate Writing, and Professional Voice and Writing resources provided by the Ashford Universit..
Analyze the data and write a conclusion : Here are some data that I analyzed for an attorney. Of the 4200 white applicants at a large manufacturing facility, 390 were hired. Of the 850 black applicants, 18 were hired. Analyze the data and write a conclusion.

Reviews

Write a Review

Basic Computer Science Questions & Answers

  What is the resulting space, time, and message complexity

What is the resulting space, time, and message complexity?

  Convert the number as started decimal

Convert the following number as started (a)decimal 2459 to hexadecimal (b)Character X and x to ASCII and Unicode

  An adt called squarematrix

An ADT called SquareMatrix

  How the westphalian model would aid cybersecurity

1. Not only must asymmetric advantages be countered domestically, attackers often originate from outside the United States. Given that situation, describe how the Westphalian model would aid cybersecurity at the global level.

  What is a constructor

What is a constructor? Give its properties. How do we declare/ define it? Can they be overloaded?

  How many should be sampled for a full investigation

To gauge the size of the problem, the agency first picks 60 cars and finds 9 with faulty emissions systems. How many should be sampled for a full investigation?

  Where are their initial movement direction and speed defined

Where are their initial movement direction and speed defined?

  Smallest number of edges

We define a best minimum s-t cut to be any minimum cut that has the smallest number of edges. Give an efficient algorithm to find a best minimum s-t cut in a givenflow network G. Do I use karger's algorithm to do it?

  Determine the exit velocity of the nitrogen

Nitrogen gas at 60 kPa and 7°C enters an adiabatic diffuser steadily with a velocity of 275 m/s and leaves at 85 kPa and 27°C.

  Show the relational schema design under each of those option

show the relational schema design under each of those options.

  Difference between simple paging and virtual memory paging

What is the difference between simple paging and virtual memory paging?

  Benefits of using wds over traditional imaging process

1. What are the benefits of using WDS over traditional imaging process? What are the requirements for implementing WDS? 2. You are asked to implement a WSUS infrastructure. What are some considerations or requirements you will need to take into acc..

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