Question: no code given. please use C# console app. which notify the customer. thanks in advance. The Observer Design Pattern is a Software Design Pattern in

no code given. please use C# console app. which notify the customer. thanks in advance. no code given. please use C# console app. which notify the customer.

The Observer Design Pattern is a Software Design Pattern in which an object (called as Subject) maintains a list of its dependents (called as Observers) and notifies them automatically when a given state changes by calling one of their methods. Complete the console app that solve the following problem with Observer design pattern: Three customers come to a Car Dealership for buying a Car. Unfortunately, at that time the Car is out of stock. At the dealership, the customers are registered to be notified when the car is available. Customers are registered with a maximum acceptable price of the car. So, when the car will be available, the dealer ship will send a notification to them. When the car is available, the quantity in stock changes, the dealership sends notifications to all the customers who are registered and are willing to accept the current price of the car. Question 2 console app is partially implemented. So, you task is: In the Car.cs class: - Set a new price and call NotifyObservers(). (1 marks) - Add a customer to the waiting List. (1 marks) - Remove a customer from the waiting List. (1 marks) - Notify each customer if the qty is greater than zero. (2 marks) - Remove the customer from the waiting list once notifying them. Use RemoveObserver(). (2 marks) In the Customer.cs class: - Assign the respective values and register this observer to the car. Use RegisterObserver(). (1 marks) - Notify the customer. Use Console.WriteLine(). (1 marks) Note: 1 mark for clarity of the code

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!