Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

create an application which contains the following: A class called Generator, which randomly generates an integer value in the range 1 to 10000 whenever the

create an application which contains the following:

A class called Generator, which randomly generates an integer value in the range 1 to 10000 whenever the user requests a new value. This newly generated value must be automatically passed to two different types of objects (classes): o Sum: It should receive the randomly generated value, add it to the previously generated value (if no previous value exists use 0) and then display the result to the console window. o Date: It should receive the randomly generated value, add it to the current date as a number of days and display the generated date to the console window.

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, a new random value generated, and the Sum and Date values displayed on the console window. The program should be based on the observer pattern, which means it should include all of the interfaces and methods required to align to this pattern.

language is C#

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_2

Step: 3

blur-text-image_3

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

More Books

Students also viewed these Databases questions

Question

The Functions of Language Problems with Language

Answered: 1 week ago

Question

The Nature of Language

Answered: 1 week ago