2023 Week 6 Overloaded Operators iLab i L A B O V E R | Assignment Collections

Computer Science 2023 Week 6 Overloaded Operators – iLab

2023 Week 6 Overloaded Operators iLab i L A B O V E R | Assignment Collections

Week 6: Overloaded Operators – iLab

i L A B O V E R V I E W
Scenario and Summary
This lab is to introduce students to the concept of operator overloading as member functions of a class. This will be done in the context of creating a class that will perform four basic mathematical operations on complex numbers.

The C++ compiler has defined operators for all the arithmetic and assignment operations for its native data types, such as integer, float, double, and so forth. However, for user-defined data types, such as classes and structures, these operations are undefined.

C++ allows the programmer to create new definitions for these operators so that they can operate specifically on these user-defined data types. Which set of operators is actually called and implemented is decided during the compilation, and it is based on the data types of the operands involved in the operation.

The ability to define a new set of data-type, dependent operations on existing operators, or functions, is called operator overloading.

Deliverables
Submit a single Notepad file containing the source code for all files of the lab to the Week 5 Dropbox. Your source code should use proper indentation and be error free. Be sure that your last name and the lab number are part of the file name: for example, YourLastName_Lab5.txt.

Each program should include a comment section that includes, at a minimum, your name, the lab and exercise number, and a description of what the program accomplishes.
Submit a lab report (a Word document) containing the following information to the Week 6 Dropbox.
Include your name and the lab or lab exercise number.
Specification: Include a brief description of what the program accomplishes, including its input, key processes, and output.
Test Plan: Include a brief description of the method you used to confirm that your program worked properly. If necessary, include a clearly labeled table with test cases, predicted results, and actual results.
Summary and Conclusions: Write a statement summarizing your predicted and actual output, and identify and explain any differences. For conclusions, write at least one nontrivial paragraph that explains, in detail, either a significant problem you had and how you solved it or, if you had no significant problems, something you learned by doing the exercise.
A UML diagram: This should show all the classes, class members, access specifiers, data types, and function arguments, along with any and all class-to-class relationships.
Answers to Lab Questions: Include the answers to any and all lab questions asked in the lab steps.
Each lab exercise should have a separate section in the lab-report document.

Your lab grade is based upon

the formatting of your source code;
the use of meaningful identifiers;
the extent of internal documentation;
the degree to which an exercises’ specifications are met; and
the completeness of your lab report.
i L A B S T E P S
STEP 1: Create a New Multifile Project

Create a new multifile project, and create a class to model complex-number, mathematical operations using overloaded operators and add main() test functions to test the operations.

Create a class for complex numbers that will provide the means to store both the real and the imaginary values of a complex number.
Design and add overloaded operators to perform correct and complex mathematical operations on objects of the complex-number class.
STEP 2: Create and Add the Overloaded Operators

Overload the addition operator (+) to perform complex mathmatical addition on two objects of the complex-number class.
Overload the subtraction operator (-) to perform complex mathmatical subtraction on two objects of the complex-number class.
Overload the multiplication operator (*) to perform complex mathmatical multiplication on two objects of the complex-number class.
Overload the division operator (/) to perform complex mathmatical division on two objects of the complex-number class.
Overload the assignment operator (=) to assign all the data values of an object in the complex-number class to another object in the complex-number class.
STEP 3: Test the Overloaded Operators

Create at least three objects of the complex-number class in function main() and use them to perform the following operation tests.

Demonstrate the correct operation of the complex addition overloaded operator.
Demonstrate the correct operation of the complex subtraction overloaded operator.
Demonstrate the correct operation of the complex division overloaded operator.
Demonstrate the correct operation of the complex multiplication overloaded operator.

 

We give our students 100% satisfaction with their assignments, which is one of the most important reasons students prefer us to other helpers. Our professional group and planners have more than ten years of rich experience. The only reason is that we have successfully helped more than 100000 students with their assignments on our inception days. Our expert group has more than 2200 professionals in different topics, and that is not all; we get more than 300 jobs every day more than 90% of the assignment get the conversion for payment.

Place Order Now

#write essay #research paper #blog writing #article writing #academic writer #reflective paper #essay pro #types of essays #write my essay #reflective essay #paper writer #essay writing service #essay writer free #essay helper #write my paper #assignment writer #write my essay for me #write an essay for me #uk essay #thesis writer #dissertation writing services #writing a research paper #academic essay #dissertation help #easy essay #do my essay #paper writing service #buy essay #essay writing help #essay service #dissertation writing #online essay writer #write my paper for me #types of essay writing #essay writing website #write my essay for free #reflective report #type my essay #thesis writing services #write paper for me #research paper writing service #essay paper #professional essay writers #write my essay online #essay help online #write my research paper #dissertation writing help #websites that write papers for you for free #write my essay for me cheap #pay someone to write my paper #pay someone to write my research paper #Essaywriting #Academicwriting #Assignmenthelp #Nursingassignment #Nursinghomework #Psychologyassignment #Physicsassignment #Philosophyassignment #Religionassignment #History #Writing #writingtips #Students #universityassignment #onlinewriting #savvyessaywriters #onlineprowriters #assignmentcollection #excelsiorwriters #writinghub #study #exclusivewritings #myassignmentgeek #expertwriters #art #transcription #grammer #college #highschool #StudentsHelpingStudents #studentshirt #StudentShoe #StudentShoes #studentshoponline #studentshopping #studentshouse #StudentShoutout #studentshowcase2017 #StudentsHub #studentsieuczy #StudentsIn #studentsinberlin #studentsinbusiness #StudentsInDubai #studentsininternational