CIS247C Lab 3 – Operator Overloading – Solution Include Visual studio code, screenshot and word document including screenshot and code – Instant delivery – Perfect Solution
Week 3: Lab Overview
TABLE OF CONTENTS
The purpose of this lab is to practice overloading operators. We will create and overload a Wings class.
You will create a Wings class and overload the operators for this class. Copy the C++ source code and screenshots into a single Microsoft Word document. Remember to hold down the Alt key when you make your screenshots so that only the active window is copied.
Microsoft Office: Word
Use a personal copy, or access the software at https://lab.devry.edu (Links to an external site.)Links to an external site..
Final Step (submitting your lab)
Visual Studio 2015
Use a personal copy, or access the software at https://lab.devry.edu (Links to an external site.)Links to an external site.. You can get a personal copy through the Student Software Store:
Please Note: you can get a personal copy of Visual Studio 2015 and many other software packages through the Student Software Store. Follow these steps:
* Log in to your course in Canvas.
* Click on the Modules button on the left side.
* Click on Course Resources in the Introduction & Resources section (top).
* Scroll down to the Student Software Store section and click the Access Software Store button.
* Click on the Microsoft Imagine Premium tab, which is located just below the Product Search box.
* Click on the item(s) that you want and click the Add to Cart button.
* Follow the on-screen instructions to Check Out and Download your software! If the product has a license key, be sure to save it in case you need to reinstall the product.
Create a C++ project, and call it Week 3—overloading Wings.
• Create a Wings class using a separate header file and implementation file.
• Add the following attributes.
o Flavor (string data type)
o numPieces (short data type)
• Create a single constructor that uses default arguments.
o Flavor should be set to unknown if it is not given.
o numPieces should be set to 0 if it is not given.
• Create a destructor for the class.
• Create accessors and mutators for the attributes.
Part 1 (Links to an external site.)Links to an external site. – Part 2 (Links to an external site.)Links to an external site.
Overload the following operators in the Wings class.
Operator Description Example
+ addition wings3 = wings1 + wings2;
- subtraction wings3 = wings1 – wings2;
- negation wings2 = -wings1; // negative
++ pre-increment ++wings;
++ post-increment wings++;
= assignment wings2 = wings1;
>> input stream operator cin >> wings;
<< output stream operator cout << wings << endl;
Part 1 (Links to an external site.)Links to an external site. - Part 2 (Links to an external site.)Links to an external site. - Part 3 (Links to an external site.)Links to an external site.
Create a main method for your application that tests each of your overloaded operators.
Run your program, and test it. Do the Wings objects add together logically? Do they increment appropriately? Can you display the Wings objects using simply output statements?
Put a breakpoint at the top of your main method, and step through your code. Remember to use Step Out if you accidentally step into the C++ code library. Can you see how your application works?
Part 1 (Links to an external site.)Links to an external site. - Part 2 (Links to an external site.)Links to an external site.
Create a Microsoft Word document called Week 3 Lab. At the top, put your information, including your name, course, Week 3 Lab, and the date.
Run your application. Take screenshots while your application is running to demonstrate that it works properly. Remember to hold down the Alt key and the PrtScrn key at the same time (Alt + PrtScrn) to take screenshots of the active window only. Paste these screenshots into your Word document.
Put the file name for each file in the Word document below the screenshots. Bold the file name, and increase the font. Copy and paste the code for each file below its file name. You should have three files for your project.
Submit the Word document to the Week 3 Lab page underneath Assignments.
* You can also use 2CO option if you want to purchase through Credit Cards/Paypal but make sure you put the correct billing information otherwise you wont be able to receive any download link.
* Your paypal has to be pre-loaded in order to complete the purchase or otherwise please discuss it with us at email@example.com.
* As soon as the payment is received, download link of the solution will automatically be sent to the address used in selected payment method.
* Please check your junk mails as the download link email might go there and please be patient for the download link email. Sometimes, due to server congestion, you may receive download link with a delay.
* All the contents are compressed in one zip folder.
* In case if you get stuck at any point during the payment process, please immediately contact us at firstname.lastname@example.org and we will fix it with you.
* We try our best to reach back to you on immediate basis. However, please wait for atleast 8 hours for a response from our side. Afterall, we are humans.
* Comments/Feedbacks are truely welcomed and there might be some incentives for you for the next lab/quiz/assignment.
* In case of any query, please donot hesitate to contact us at email@example.com.
* MOST IMPORTANT Please use the tutorials as a guide and they need NOT to be used for any submission. Just take help from the material.
******************************************** Good Luck ***************************************************
Any personal information received will only be used to fill your order. We will not sell or redistribute your information to anyone.
We will try our best to resolve the issue and if still persists we can discuss for a refund in case its required.