Find Jobs
Hire Freelancers

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

$30-250 USD

Slutfört
Publicerad över sju år sedan

$30-250 USD

Betalning vid leverans
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: 11740014

Om projektet

11 anbud
Distansprojekt
Senaste aktivitet åtta år sedan

Ute efter att tjäna lite pengar?

Fördelar med att lägga anbud hos Freelancer

Ange budget och tidsram
Få betalt för ditt arbete
Beskriv ditt förslag
Det är gratis att registrera sig och att lägga anbud på uppdrag
Tilldelad till:
Använd avatar
I believe on perfect work with 100% satisfaction of my client then payment. I deliver only exceptionally robust and well-designed work as a rule to my client. Hi, I understand your project and I am confident that I can do your project with great accuracy and 100% efficiency. I have seven years programming/teaching experience in Software Architecture/C++/Java/C/Matlab/C#/Algorithm Design and Analysis. I am software developer and providing software solutions to my client from last seven years. I will provide you quality work with 100% accuracy. I want to do best to best work for my client, gain 100% satisfaction and quality work. You can trust me and consider me for your project. I am also faculty member (Instructor) Computer Science and Engineering Department in FAST-NUCES National University Pakistan from four last years. For further you may go to my Profile links. Best Regards, Engr. Shahi Thanks. Contact & Profile Links: W h a t s a p p : +92(346)9211246 V I b e r : +92(346)9211246 [login to view URL] https://www.freelancer.pk/u/shahidost.html
$30 USD Om 3 dagar
4,7 (42 omdömen)
4,9
4,9
11 frilansar lägger i genomsnitt anbud på $82 USD för detta uppdrag
Använd avatar
C++ EXPERT here. VERY EASY for me. Contact me ASAP. I can do this. Thanks, Junaid
$50 USD Om 3 dagar
5,0 (50 omdömen)
5,9
5,9
Använd avatar
Looking forward to discuss further details about the project and deliver the same to your specifications
$35 USD Om 3 dagar
4,9 (37 omdömen)
6,1
6,1
Använd avatar
Hi c++ Expert here , well you assignment will be done in very short time . Looking forward to work with you !
$77 USD Om 3 dagar
4,9 (42 omdömen)
5,3
5,3
Använd avatar
Hello, Dear, how are you? Visual C++ is my main skill! I am a certified developer with 10-years experience developing with Visual C++. I'm very glad to know that there is a suitable task for me. I hope to work with you for performing your task wonderfully. I'm free now and have availability beginning now. Thank you very much for receiving my message. Thanks and Regards.
$155 USD Om 3 dagar
5,0 (17 omdömen)
4,8
4,8
Använd avatar
Unfortunately, your attached filea are missing. Can you please let me see the source codes ? :)
$55 USD Om 2 dagar
4,8 (1 omdöme)
0,4
0,4
Använd avatar
A proposal has not yet been provided
$155 USD Om 3 dagar
0,0 (0 omdömen)
0,0
0,0

Om kunden

Flagga för UNITED STATES
panorama, United States
5,0
1
Verifierad betalningsmetod
Medlem sedan okt. 9, 2016

Kundverifikation

Tack! Vi har skickat en länk för aktivering av gratis kredit.
Något gick fel med ditt e-postmeddelande. Vänligen försök igen.
Registrerade Användare Totalt antal jobb publicerade
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Laddar förhandsgranskning
Tillstånd beviljat för geolokalisering.
Din inloggningssession har löpt ut och du har blivit utloggad. Logga in igen.