Find Jobs
Hire Freelancers

C++ program using "struct" needs to be switched to "class"

$30-250 USD

Completed
Posted over 7 years ago

$30-250 USD

Paid on delivery
Hello like I said in the craigslist ad. I am working on a Visual Studio C++ program. The program is for school and it is already compiled. The program works great, however what I need is for the program to include classes. The program would need to incorporated with the classes that I have, currently I am using "struct" instead of "class." The code does not appear to be lengthy since its already written in "struct", and works fine. Basically it needs to be switched from "struct" to "class," however it will need to follow the assignment instructions. The assignment instructions are the following: --------------------------------------------------------------------------------------------------------------------- Define a Fraction class similar to the one shown in earlier modules with num and den as its private data. Include a constructor to initialize the fraction to 0/1, a copy constructor, a destructor, and overloading functions to overload the assignment operator =, the comparison operators <, >, ==, !=, arithmetic operators +, +=, -, -=, *, *=, /, /=, as well as friend functions (non-member) to overload << and >> to output and input a fraction (see book example). Also, include a private member function called reduce() that gets called after arithmetic operations to reduce the frraction. +, -, *, / must return the result of the operation; e.g.: the sum or difference of the two fractions. +=, -=, *= and /= must assign the result of the operation to the object that's invoking the operation; i.e.: frac1 += frac2 must modify frac1 to make it equal to the sum of the two fractions, but frac1 + frac2 must simply return the sum. Define a class called FracList with private members fracPtr, a Fraction pointer and size to hold the size of the array of Fraction objects. Use the List container class developed in the modules as an example. Include constructor, destructor, copy constructor and overload the assignment, insertion (>>) and extraction (<<) operators. the [] operators for accessing array elements (both as lvalue and rvalue - see the example given in last module) and relational operators <, >, ==, and !=. For < and >, compare the size of the two FracList objects and for == and != see if they're identical with identical array elements. Also, include two resize() member function to resize the list, one keeping the existing vales and one without keeping old values (see the List example). Also, include a sort and binary search function (see the example). In main, create two FracList objects, ask the user how many elements to allocate for each list, read as many Fraction objects from the keyboard as specified by the user into each (using >> operator). Sort both lists using the sort member function and display them; and then search for a value read from the user in both lists and print the index of the first occurrence or that it could not be found in either list. Example run of the program: Enter size of first fraction list: 5 Enter size of second fraction list: 3 Enter 5 fractions for first list: 1/4 1/8 2/3 1/3 1/2 Enter 3 fractions for second list: 3/4 1/5 1/4 Sorted lists: 1/8 1/4 1/3 1/2 2/3 1/5 1/4 3/4 Enter a fraction to search for: 1/4 1/4 was found at index 1 of list 1. --------------------------------------------------------------------------------------------------------------------- The assignment may seem lengthy but the code already works perfectly, and it executes the right information. What I need you to do is to switch from "struct" to "class." The assignment covers what each "class" should include. The main code is attached as "Source. cpp." The files "[login to view URL]" and "List.h" are part of the "List container class developed in the modules." Please let me know how much you charge.
Project ID: 11684418

About the project

13 proposals
Remote project
Active 8 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
Awarded to:
User Avatar
I would like to bid this job because I am really suitable for job description: First: I am an software engineer who is very expertise with C/C++. In fact, I have done so many project of C/C++(Karatsuba multiplier, Nintendo design, encryption algorithm like Sax Hash, Bernstein Hash, HummingBird...Also, I participated in a Walker Recognition project(data from Camera to Human Detection(image processing-HOG feature and Adaboost) and display in VGA). Besides,,I implemented the image conpression (wavelet transform). Also, I am very good in English (IELTS 6.0) and I have several year of researching so I can fully understand your requirement and understand fully about the papers and write the academic report.. Please contact me and let me know if you want any special requirement and do with lower price. Thank you.
$50 USD in 2 days
4.9 (4 reviews)
4.7
4.7
13 freelancers are bidding on average $101 USD for this job
User Avatar
Hi, i have a lot of experience c++ programming. i can easily complete this task for you. we can have a chat. thanks
$70 USD in 3 days
4.9 (296 reviews)
7.1
7.1
User Avatar
Hi mate this is Asad, i have a vast experience in c++ programming, need an A grade? contact me? cheers :)
$122 USD in 2 days
5.0 (37 reviews)
5.9
5.9
User Avatar
Computer Engineer. Plenty of experience solving algorithmic problems via code. C++ is one of my main languages
$40 USD in 3 days
5.0 (54 reviews)
5.2
5.2
User Avatar
$100 USD in 1 day
5.0 (14 reviews)
4.2
4.2
User Avatar
We are team of excellent developers. We have 2 year experience related to your project field. We can do your project and solve your all problems according to your requirements. We have read your description for projects and we understand what you want so we are confident that we can do it easily in mention time. We assure you that you will be completely satisfy with our work. And after delivering your project if you feel some issue in understanding the projects then we will teach you free until you understand. If you have any question then feel free to ask. We are here for you. Thank you Demon Developer Team
$100 USD in 1 day
4.9 (17 reviews)
4.0
4.0
User Avatar
Hi there. I am suitable to this project. Please say me what is the due date. And what price is convinient to you? Regards, Valentin
$155 USD in 3 days
5.0 (10 reviews)
3.3
3.3
User Avatar
'We are team of excellent developers and writers. We have 2 year experience related to your project field. We can do your project and solve your all problems according to your requirements. We have read your description for projects and we understand what you want so we are confident that we can do it easily in mention time. We assure you that you will be completely satisfy with our work. And after delivering your project if you feel some issue in understanding the projects then we will teach you free until you understand. If you have any question then feel free to ask. We are here for you. Thank you
$45 USD in 3 days
4.9 (5 reviews)
2.8
2.8
User Avatar
hello i am full time freelancer having more than 6 years of experience in web development please share some information about your requirement. without knowing your requirement i can not provide you the right quote. lets start discussing about your requirement. thanks
$175 USD in 2 days
0.0 (0 reviews)
0.0
0.0
User Avatar
hi I'm C++ Developer I have seen your requirements I can make this struct code to classes i will object oriented programming techniques it can be done easily hope to hear from you.
$40 USD in 2 days
0.0 (0 reviews)
0.0
0.0

About the client

Flag of UNITED STATES
Arleta, United States
5.0
17
Payment method verified
Member since Feb 25, 2013

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.