Skip to content

CS304p Assignment 1 Solution Spring 2022

CS304p Assignment  1 Solution Spring 2022: Be sure to check once before resolving the assignment so that you can correct any mistake you may have submitted the assignment before the date so that you do not have any problems later. The assignment has to be saved with your VUID and submitted within LMS.

You are hired by XYZ company and being a software engineer your task is to develop the small calculator that deals with the complex number. Your responsibility is to write a program that add and subtract two complex number and to achieve this you have to create a class called Complex that has two data members real int and imag int to store the real and imaginary parts of the complex number.

The assignment is submitted after due date. The submitted assignment does not open, execute or file is corrupted. Your assignment is copied from internet, handouts or from any other student.

  • A default constructor that initializes the data members to 0.
  • A member function name get_data() to get the data from user.
  • A member function name display_data() to display the values of complex numbers.
  • A member function name add_complex() to add the two complex numbers using object as an argument.
  • A member function name sub_complex() to subtract the two complex numbers using object as an argument.
  • There should be copy constructor that copies an object. You have to create two objects and copy the data.

Note: Enter the last digit of your VU ID as real part and second last digit as an imaginary part. Definition of both the member function should be outside of the class.

Download Pdf File

Dowload File in .cpp format

CS304p Assignment 1 Solution Spring 2022, cs304p assignment solution 2022, cs304p assignment 1 spring 2022 solution, cs304p assignment file download 2022.

error: Content is protected !!
Ads Blocker Image Powered by Code Help Pro

Ads Blocker Detected!!!

We have detected that you are using extensions to block ads. Kindly Disable Your Adblocker Extensions