Write a class named StockPrices . The class constructor should accept an array of stock prices as its argument. The class should have a member function that returns the average of the stock prices. If any stock price in the array is negative or greater than 5000, the class should throw an exception. Demonstrate the class in a program.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here