UK: +44 748 007-0908, USA: +1 917 810-5386 [email protected]

A three-dimensional geometric shapes.

Assignment 3
Design and implement a set of classes that define a series of three-dimensional geometric shapes. This design must use inheritance, one base class and at least two derived classes. For the shapes store fundamental data about its size and provide methods to access and modify the data. There should be data in the base class and in the derived classes. The data should be template data types, so that instances of the classes can be created with data types of int, double and float. The design should include methods to calculate the circumference, area and volume of the shapes.
An exception class should be created to indicate that one of the data member of the shape is negative. The exception should provide an appropriate message about what it wrong and which data member is wrong and its value. The exception should be thrown when doing the calculations. Main should throw the exception and handle the exception, which then allows the user to enter new value for the data so it can be corrected and the calculations are performed.
The driver class should create an instance of each of the derived classes. The driver should show that all of the method works correctly and the exceptions are handled correctly. The shapes should use different data types to create the instance (int, double, or float).

Assignment 4
Instructions
This assignment uses the linked list provided for the discussion and the class you created for the discussion. Overload the [ ] operator in the linked list so that it behaves like an array. If 0 is provided it gets the first element (data stored in list) in the list, if 1 is provided then it returns the second element in the list.
Create a class called BaseballPlayer which maintains the player’s stats and name.
The class will have data members for the following stats

  1. Number of hits
  2. Number of home runs
  3. Number of walks
  4. Number of strike outs
    Provide methods
  5. Constructor with four parameters
  6. Accessors and mutators for the data members
  7. Overload any operators that are needed
    The driver class will create several players and put them into an instance of the derived linked list class. The program will tell the user which player has the best stats based the scoring below and which player is the worst.
    • A hit is worth 1 point
    • A homerun is worth 4 points
    • A walk is worth 1 point
    • A strike out is worth -1 points
    • The total of the points will determine who has the higher and lower stats.

Ready to Score Higher Grades?