BZU PAGES: Find Presentations, Reports, Student's Assignments and Daily Discussion; Bahauddin Zakariya University Multan Right Header

HOME BZU Mail Box Online Games Radio and TV Cricket All Albums
Go Back   BZU PAGES: Find Presentations, Reports, Student's Assignments and Daily Discussion; Bahauddin Zakariya University Multan > Institute of Computing > Bachelor of Science in Information Technology > BsIT 3rd Semester > Object Oriented Programming

Object Oriented Programming By Mam Sidra Malik

Thread Tools Search this Thread Rating: Thread Rating: 1 votes, 5.00 average. Display Modes
Old 07-10-2011, 06:25 PM
Dergk's Avatar
Little Baby

Join Date: Sep 2011
Location: Karachi
Posts: 3
Program / Discipline: BSCS
Class Roll Number: 07-20
Dergk is on a distinguished road
Default how to make four fraction calculator in c++ using classes and operator overloading

well, I ave this object as assignment. If anybody know how to make it, please tell me. I have to submit it by 10/10/2011.

1. Create a class called Fraction. Its data members are numerator, denominator, fraction_value, slash, whole_number. Fraction_value: stores the fraction decimal value. Slash: ("/"): is common to all Fraction objects, and will be used for a formatted display. A constructor accepts two integer values. If only one parameter is passed, then assign it to the numerator, and force denominator to be 1. If no parameter is passed, use zero for the numerator and one for the denominator. A constructor that accepts 3 arguments: a whole number portion of the fraction, a numerator, and a denominator. If it is the case, compute the whole number and store it accordingly. To reduce a Fraction: use a function that reduces a fraction to its proper format. Add four arithmetic operators to perform calculations.
Reply With Quote

calculator, classes, fraction, make, operator, overloading

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Fraction Calculator with 4 functions in c++ [ex12 of ch#5] Robert Lafore BSIT07-01 Object Oriented Programming 7 08-10-2011 10:02 AM
c sharp overloading program thecool Visual Programming 0 17-06-2011 09:49 PM
Templates and Templated Classes in C++ bonfire Introduction to Computing 0 26-02-2011 11:16 PM
The C++ Modulus Operator bonfire Introduction to Computing 0 26-02-2011 11:15 PM
Operator of the Year..!!! usman_latif_ch BZU Graphics and Wallpapers 0 30-03-2010 07:16 PM

Best view in Firefox | BZU Multan | Dedicated server hosting
Note: All trademarks and copyrights held by respective owners. We will take action against any copyright violation if it is proved to us.

All times are GMT +5. The time now is 11:12 PM.
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.