Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

create an application which contains the following: A class called StockPrice. This class needs to be able to store the name of a stock (stock

create an application which contains the following:

A class called StockPrice. This class needs to be able to store the name of a stock (stock as in JSE / DOW Jones / FTSE / NY Stock Exchange) and its price. It should also provide an override of the ToString() which returns the stocks name and price.

A class called StockTicker. This class needs to keep track of a list of StockPrices. Whenever a new item is added to the list, an item is removed or a price is updated, the entire stock list must be automatically passed to the following class: o StockDisplay: When created, it should display the entire list of StockPrices to the console window. Every time the list of StockPrices is updated, it should only display the information related to the StockPrice that has changed (i.e. not the entire list). The program should continuously loop until the user presses the e-key to end the program. At each iteration of the loop the screen should be cleared and a menu displayed to the user. The menu should allow the following options (with associated functionality): o (a)dd a new stock o (u)pdate an existing stock o (r)emove an existing stock o (e)nd the program

The program should be based on the observer pattern using C# events, which means it should include all of the interfaces and methods required to align to this pattern, while making use of C# events.

language is C#

please note

interfaces(can be any abstract super type not necessarily java interface). All observers who need the data need to implement observer interface. notify() method in observer interface defines the action to be taken when the subject provides it data.

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

Icdt 88 2nd International Conference On Database Theory Bruges Belgium August 31 September 2 1988 Proceedings Lncs 326

Authors: Marc Gyssens ,Jan Paredaens ,Dirk Van Gucht

1st Edition

3540501711, 978-3540501718

More Books

Students also viewed these Databases questions

Question

Why does sin 2x + cos2x =1 ?

Answered: 1 week ago

Question

What are DNA and RNA and what is the difference between them?

Answered: 1 week ago

Question

Why do living creatures die? Can it be proved that they are reborn?

Answered: 1 week ago