Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. Code Assignment/Exercise Exercise 1 A. Update the Fraction class given in the Lecture notes or as discussed in class meetings as follows, 1. Add

image text in transcribed

1. Code Assignment/Exercise Exercise 1 A. Update the Fraction class given in the Lecture notes or as discussed in class meetings as follows, 1. Add your FIRST NAME and the initial of your last name to the name Fraction and th then use this as your updated class. For examples, if your first name is John Smi update the class name to be FractionJohns 2. Add an d update all class constructors for your Fraction class to handle the initialization appropriately There must be as least 2 constructors of (i) (ii) Default; and Copy Each constructor should print the confirmation (e.g., "Calling Fraction ()", or Calling Fraction (const Fraction&)") Provide a destructor with a confirmation when removing the object (i.e., "calling Fraction )") 3. 4. Provide get/set member functions for each private member data. 5. A member function print ( that will print the current Fraction object. B. Provide the following member functions, a. A function add () to add a Fraction object; and b. A function subtract( to subtract a Fraction object; and c. A function multiply() to multiply a Fraction object; and d. A function divide() to divide a Fraction object, and C. Provide the following member opcrator functions e. A function operator-() to assign a Fraction object. f. A function operator+() to add a Fraction object; and g. A function operator-() to subtract a Fraction object, and h. A function operator*() to multiply a Fraction object; and i. i. A function operatoz/) to divide a Fraction object; and D. Provide the following stand-alone functions, j. A function init() to set up or update the 2 required Fraction objects. k. A function add () to add 2 Fraction objects; and I. A function subtract () to subtract 2 Fraction objects; and m. A function multiply () to multiply 2 Fraction objects; and n. A function divide () to divide 2 Fraction objects; and

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Intelligent Information And Database Systems Asian Conference Aciids 2012 Kaohsiung Taiwan March 19 21 2012 Proceedings Part 3 Lnai 7198

Authors: Jeng-Shyang Pan ,Shyi-Ming Chen ,Ngoc-Thanh Nguyen

2012th Edition

3642284922, 978-3642284922

More Books

Students also viewed these Databases questions

Question

8. Explain the relationship between communication and context.

Answered: 1 week ago