Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

language is c++ DESIGN ASSIGNMENT CLASSES & DATA ABSTRACTIONS The most important part of developing a program/software is the design process. You are required to

image text in transcribedlanguage is c++

DESIGN ASSIGNMENT CLASSES & DATA ABSTRACTIONS The most important part of developing a program/software is the design process. You are required to create psuedocode and a class diagram for each of the following questions. You may use any tool you desire to create your class diagram, but it cannot be hand drawn. Please note you are not asked to write and C++ code and psuedocode should not include an C++ elements such as but not limited to semicolons, cout, and cin. Due at 11:55pm. Question 1: Complex Numbers Create a class called Complex for performing arithmetic with complex numbers. Write a program to test your class. Complex numbers have the form realPart + imaginary Part *i where i is Use double variables to represent the private data of the class. Provide a constructor that enables an object of this class to be initialized when it's declared. The constructor should contain default values in case no initializers are provided. Provide public member functions that perform the following tasks: A. Adding two Complex numbers: The real parts are added together and the imaginary parts are added together. B. Subtracting two Complex numbers: The real part of the right operand is subtracted from the real part of the left operand, and the imaginary part of the right operand is subtracted from the imaginary part of the left operand. C. Printing Complex numbers in the form (a, b), where a is the real part and b is the imaginary part. Question 2: Hugelnteger Create a class Hugelnteger that uses a 40-element array of digits to store integers as large as 40 digits each. Provide member functions input, output, add and subtract. For comparing Hugelnteger objects, provide functions is EqualTo, isNotEqualTo, isGreaterThan, isLessThan, isGreaterThanOrEqual To and isLessThanOrEqualTo-each of these is a "predicate" function that simply returns true if the relationship holds between the two Hugelntegers and returns false if the relationship does not hold. Also, provide a predicate function isZero. If you feel ambitious, provide member functions multiply, divide and modulus

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

Provide examples of Dimensional Tables.

Answered: 1 week ago