pls. help pls.
Given the fruit class declaration as follows.
class fruit { public:
char fruit_ name[20];
int *qty;
}
i. Implement constructor for fruit class that takes in fruit_name of dynamic
character array type, which holds a string "default" and a parameter s of integer type, which contains 0, for appropriate initializing the members of type Fruit. Use operator new for member variable qty.
ii.To create a class called fruitstall that provides a wide range of fruits, and fruitstall class contains as follows.
ˇ three private member variables,
a) a fruit type variable pointer called basket
b) an integers current showing number of fruit types
c) an integer size for all array with size objects.
ˇ Implement a constructor that takes in s of integer type for basket data member to hold s objects of fruit type and the current is initialized to 0. Other data member is properly initialized, too.
iii.Include a member function AddFruit for fruitstall class that takes in an object F of fruit type. The AddFruit method includes the object F into the basket if space is available; otherwise return 0 for saying tile basket is full. If the object F is successfully placed into the basket, it returns 1. The method should update the data member range.
iv. Create an instance of fruitstall type called stall, which has a size of 10 different fruits.
i dont know how.
pls help
tnx