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

  Identifies the cost of computer

identifies the cost of computer components to configure a computer system (including all peripheral devices where needed) for use in one of the following four situations:

  Input devices

Compare how the gestures data is generated and represented for interpretation in each of the following input devices. In your comparison, consider the data formats (radio waves, electrical signal, sound, etc.), device drivers, operating systems suppo..

  Cores on computer systems

Assignment : Cores on Computer Systems:  Differentiate between multiprocessor systems and many-core systems in terms of power efficiency, cost benefit analysis, instructions processing efficiency, and packaging form factors.

  Prepare an annual budget in an excel spreadsheet

Prepare working solutions in Excel that will manage the annual budget

  Write a research paper in relation to a software design

Research paper in relation to a Software Design related topic

  Describe the forest, domain, ou, and trust configuration

Describe the forest, domain, OU, and trust configuration for Bluesky. Include a chart or diagram of the current configuration. Currently Bluesky has a single domain and default OU structure.

  Construct a truth table for the boolean expression

Construct a truth table for the Boolean expressions ABC + A'B'C' ABC + AB'C' + A'B'C' A(BC' + B'C)

  Evaluate the cost of materials

Evaluate the cost of materials

  The marie simulator

Depending on how comfortable you are with using the MARIE simulator after reading

  What is the main advantage of using master pages

What is the main advantage of using master pages. Explain the purpose and advantage of using styles.

  Describe the three fundamental models of distributed systems

Explain the two approaches to packet delivery by the network layer in Distributed Systems. Describe the three fundamental models of Distributed Systems

  Distinguish between caching and buffering

Distinguish between caching and buffering The failure model defines the ways in which failure may occur in order to provide an understanding of the effects of failure. Give one type of failure with a brief description of the failure

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