Download or clone the C# project SuperMarket.
This exercise is about using and modifying an existing class. The solution contains a new class FruitBox, in the file FruitBox.cs.
1.Have a look inside the file FruitBox.cs, and see what theFruitBox class definition contains. See if you can identify the instance fields, the constructor, the methods that returninformation (accessors), and the methods that change thevalue of an instance field (mutators)
2.Now try to use the FruitBox class yourself. Insert some codeinto the solution (in the usual place for inserting code), that does the following:
a.Creates a new FruitBox object.
b.Prints out information about the fruit box – use themethod GetBoxContentDescription for this purpose.
c.Adds some fruit to the box, by calling the appropriatemethods
d.Prints out the information again – now you should seethat the information has changed
3.We now wish to add a new method that can calculate thetotal price of the fruit in the box, and return the total price tothe caller. The method should be named GetTotalPrice.Write this method, and add some code to test the newmethod as well.
4.Now add two new methods that can change the price ofbananas and apples, respectively. The new price must thenbe a parameter to the method. Remember to add code inInsertCodeHere.cs to test the new methods.
5.We now have a situation where the price of a piece of fruitcan be different for two different boxes of fruit. Is that agood model of how things really are in a supermarket?