Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create a program that reads in stock data from a .csv file. When the program runs, it should do the following: create the program in

Create a program that reads in stock data from a .csv file. When the program runs, it should do the following:

create the program in C#, visual studio Create a Date class that does the following (30 points): o A default constructor o A constructor with an string argument o An integer member variable that represents date in the following format: YYYYMMDD i.e. 20070212 means February 12, 2007 o A string member variable that represents date in the following format: YYYY-MM-DD o An integer member variable that represents a year o An integer member variable that represents a month o An integer member variable that represents a day of the month o A method that converts a YYYY-MM-DD into YYYYMMDD o A method that converts a YYYYMMDD into YYYY-MM-DD o A method that extracts only the year from YYYYMMDD o A method that extracts only the month from YYYYMMDD o A method that extracts only the day from YYYYMMDD Create a Stock Class: this class will represent a stock. You need to decide the member variables of this class based on the input file. This input file is given to you and it is a comma-separated-value file (.csv). This class must have a Date type member variable. Use properties for all of the private member variables/fields. (30 points) The program will asks the user the file name which is FB.csv. If the user enters incorrect file name, the program terminates after displaying an error message on the Console. If the file name is correct, it creates a List of stocks and put all of the stock data into list. Each stock object represents one row of data from the FB.csv file. After reading all of the stock data into the program, create a method in the Main class named MeanPrice, which calculates the average price of the stock, Facebook. This method returns a double value. Create a method in the Main class named HighestPrice, which returns the highest price of the stock and its date. (10 Points) Create a method in the Main class named LowestPrice, which returns the LowestPrice of the stock and its date.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database In Depth Relational Theory For Practitioners

Authors: C.J. Date

1st Edition

0596100124, 978-0596100124

More Books

Students also viewed these Databases questions

Question

4. Describe the role of narratives in constructing history.

Answered: 1 week ago

Question

1. Identify six different types of history.

Answered: 1 week ago