Question: Using C++ language, write a program the solve the underlying abstract structures. All the steps below are a single program. You may use object-oriented (OOP)

Using C++ language, write a program the solve the underlying abstract structures. All the steps below are a single program. You may use object-oriented (OOP) or procedural programming.

Requirements:

1) Implement a menu-based program that operates continuously until the user decides to exit the program.

The menu operations are determined by this statement:

- { x C | P(x) }

- C is a set of menu operations = {

"Define set A",

"Define set B",

"Define set C",

"Display the data set",

"Cartesian product A x B",

"Cartesian product B x C",

"Cartesian product (A x B) x C",

"Cartesian product A x (B x C)",

"Find the subset",

"Find the relation R",

"Exit"

}

2) Implement a menu operation for set A = { a Z + }. Your function requires the user to enter arbitrary length and data.

3) Repeat step 2 for set B

4) Repeat step 2 for set C

5) Implement a menu operation and output the data in sets A, B, and C.

Example:

A = {x, y, z}

B = {...}

C = {...}

6) Implement a menu operation to test any two sets "is" a subset

Example:

A B = true or false

B C = true or false

A C = true or false

7) Implement a menu operation and the Cartesian product A x B

and determine the length of A x B

8) Implement a menu operation and the Cartesian product B x C

and determine the length of B x C

9) Implement a menu operation and the Cartesian product A x (B x C)

and determine the length of A x (B x C)

10) Implement a menu operation and the Cartesian product (A x B) x C)

and determine the length of (A x B) x C

11) Implement a menu operation and find the relation R from any two sets as follows: Given any (x, y) means that (x-y) / 2 is an integer.

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!