Question: 1. Quadratic Equation: Design and write a C++ code that solves a quadratic equation ax^2 + bx + c = 0. Please use class and

1. Quadratic Equation: Design and write a C++ code that solves a quadratic equation ax^2 + bx + c = 0. Please use class and object definitions and do not use procedural style. Let the roots of be and ax^2 + bx + c = 0 be p and q. Show that the following: p + q = -(b/a) and pq = (c/a), for at least 5 different and non-trivial of values of a, b, c. Make sure that you address that complex numbers as objects.

Notes: Please use class of real numbers and class of complex numbers. Also, make sure that you add relevant member functions in solving the above conditions. When p and q are complex numbers then invoke complex addition and multiplication. When p and q are real then invoke binary addition and multiplication of real numbers. Show for both scenarios.

2. Matrix Operations: Design and write C++ codes that solves the following:

1. Matrix Addition (2x2, 3x5)

2. Matrix Multiplication (2x2, 4x4). Show your results with at least two examples of each. Use C++ objects.

Note: You will create NxM matrix where N = number of rows and M = number columns that are specified by the user. So, write a generic class of matrix that accepts user-defined N and M as input parameters and generates a random matrix. Each cell of the matrix is a random number. Example: Consider a 2x2 matrix: A = [23.1, 54.6 98.2, 87.2 ] Where A[i][j] is a randomly generated number between (0,99). Consider a 3x3 matrix: A = [23.1 54.6 12.4 98.2 87.2 16.3 15.7 31.8 71.2] Where A[i][j] is a randomly generated number between (0,99). Thus generate a random matrix A. Similarly you can generate matrices of other dimensions by specifiying user values N and M. Perform your operations on these matrices.

4. Recursion

Tower of Hanoi (https://en.wikipedia.org/wiki/Tower_of_Hanoi)

1. Implementation

2. Detail explanation of how it works

Implement the following recurrence relations

o F(n) = F(n-1) + F(n-2) F(0)=0; F(1)=1; // Fibonacci Series

o F(n) = n^2 + F(n-1) F(0)=0; // sum of squares

Print all n-digit strictly increasing numbers Given number of digits n in a number, print all n-digit numbers whose digits are strictly increasing from left to right

Examples:

Input: n = 1

Output: 0 1 2 3 4 5 6 7 8 9

Input: n = 2

Output: 01 02 03 04 05 06 07 08 09 12 13 14 15 16 17 18 19 23 24 25 26 27 28 29 34 35 36 37 38 39 45 46 47 48 49 56 57 58 59 67 68 69 78 79 89

5. Dictionary

1. Design a scalable dictionary that stores an English word and its meanings.

2. Implementation

3. Suggest a creative solution

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!