1
Answer

C# class example

Ask a question
akpaga akpaga

akpaga akpaga

12y
1.4k
1
Hi friends,

I am learning C# online and  came across this question in a test

Please use the language of your choice to model a simple cola machine.

Within the cola machine, please create classes for the Drinks, Inventory and Bank.

The Inventory should hold multiple types of drinks and allow for drinks of varying prices to be bought.

The Bank should have a certain amount of money and be updated by the price of a cola when bought by a consumer.

Can some  show me how this can be done in C#...Thank you in advance

Answers (1)
Next Recommended Forum