Create a class called ''Set'' in C++ using object-oriented techniques

Closed Posted Mar 13, 2002 Paid on delivery
Closed Paid on delivery

NO.1)Create a class called "Set". The max of elements in a Set is 100. Create the array to store the elements using the "new" operator. The only elements can be stored in a Set is an integer. Define objects of Set class as following examples: int a[11]={10,0,1,2,3,4,5,6,7,8,9}; int b[6]={5,1,3,5,7,9}; int c[6]={5,0,2,4,6,8}; int d[3]={2,0,1}; int e[1]={0}; Set Nnatural ; Set one_digit=a; Set odd=b; Set even=c; Set zero=0; Set zero_one=d; Set x=one_digit; Set empty_set2=e; 1. Write constructors (and a destructor) for above operations. 2. Write following functions: Insert Remove Is_empty Card 3. Overload following operators: = : Assignment operation (between 2 sets) + : Union of two sets * : Intersection of two sets - : Difference of two sets = = : Equality of two sets, if all members are same return 1, else 0 [] : Membership of an element to a set < : Subset operator < : Superset operator << : Output a set. Elements will be separated by a blank and an end of line at the end. >> : Input a set. Elements will be separated by a blank until end of line. NO.2)Create a class called "Bag". The Bag class will be a subclass of the class Set. In a Bag the same element can be repeated any number of times. Acordingly some existing Set functions should be redefined in a Bag class. The max of elements in a Bag is 1000. Create the array to store the elements using the "new" operator. The elements can be stored in a Bag is an integer. Bag objects can be constructed in different ways: int a[4]={1,2,3,4}; int b[10]={0,0,0,1,1,2,3,8,9,9}; int c[]={0,1,1,8,9}; int d[]={0,0,8}; Bag empty_bag; Bag bag1(b,10); Set set1(a,4); Bag bag2=bag1; Bag bag3=set1; Bag bag4(c,5); Bag bag5(d,3); 1. Write constructors for above declarations. 2. Inherit functions/operator from Set Class. 3. Add the following functions: sum : find the sum of the integers in a bag product: find the product of the integers in a bag 4. Define the following function: void test(Set & ps1, Set & ps2) { Bag tb(ps1); int i; cout<<ps1<<ps2<<tb; ps1=ps2+ps2; cout<<ps1; cin>>ps2; tb=ps2; cout<<tb; cin>>i; cout<<tb[i]; } *** SEE ATTACHMENT FILE FOR DETAIL OUTLINE! ***

## Deliverables

Complete and fully-functional working program(s) in executable form as well as complete source code of all work done. Program must be fully comment. Complete copyrights to all work purchased. Due March 18, 2002. 12:00PM(Noon) Eastern Time *** SEE ATTACHMENT FILE FOR DETAIL OUTLINE! ***

## Platform

Program must be written in C++ using object-oriented techniques. Program must be able to be compiled and executed on Borland C++ version 5.02 Due March 18, 2002. 12:00PM(Noon) Eastern Time *** SEE ATTACHMENT FILE FOR DETAIL OUTLINE! ***

## Deadline information

Program Due March 18, Monday 12:00PM(Noon) Eastern Time *** SEE ATTACHMENT FILE FOR DETAIL OUTLINE! ***

C Programming Engineering MySQL PHP Software Architecture Software Testing

Project ID: #2842085

About the project

29 proposals Remote project Active Mar 23, 2002

29 freelancers are bidding on average $28 for this job

oleg21

See private message.

$22.95 USD in 14 days
(137 Reviews)
7.0
sanatanvw

See private message.

$17 USD in 14 days
(72 Reviews)
5.5
pickingapples

See private message.

$17 USD in 14 days
(43 Reviews)
4.8
leepwo

See private message.

$42.5 USD in 14 days
(41 Reviews)
4.7
sysg

See private message.

$42.5 USD in 14 days
(25 Reviews)
4.6
salac

See private message.

$21.25 USD in 14 days
(42 Reviews)
4.6
ziran

See private message.

$17 USD in 14 days
(47 Reviews)
4.5
vw139994vw

See private message.

$38.25 USD in 14 days
(60 Reviews)
4.5
royce3

See private message.

$8.5 USD in 14 days
(12 Reviews)
4.3
vhdeprecated

See private message.

$11.9 USD in 14 days
(32 Reviews)
4.2
alokgarg

See private message.

$34 USD in 14 days
(69 Reviews)
4.2
belovlabs

See private message.

$38.25 USD in 14 days
(33 Reviews)
4.0
anu2005

See private message.

$42.5 USD in 14 days
(18 Reviews)
4.0
kasperindia

See private message.

$38.25 USD in 14 days
(35 Reviews)
3.9
iodra

See private message.

$20.4 USD in 14 days
(26 Reviews)
3.8
rcn2000

See private message.

$51 USD in 14 days
(6 Reviews)
3.7
dinario

See private message.

$21.25 USD in 14 days
(16 Reviews)
3.1
fishconsulting

See private message.

$31.45 USD in 14 days
(18 Reviews)
2.9
rw34t2euyu

See private message.

$10.2 USD in 14 days
(8 Reviews)
2.9
sergkork

See private message.

$85 USD in 14 days
(2 Reviews)
2.2