Design a vending machine like coffee vending machine

Broadly, think about what objects are involved in a vending machine: VendingMachine - possibly an abstract class DrinkMachine, SnackMachine, and classes extending VendingMachine VendingProduct - an abstract class? Drink, other classes extending VendingProduct Coke, other classes extending Drink &c, &c. But I’m sure you can figure that out pretty easily. The nuts and bolts of the machine will take place in some kind of utility class, with methods to accept bills and coins, calculate change, etc. ...

Design data structures for an online book reader system

Problem Design the data structures for an online book reader system. Solution We will have 2 simple classes - book and user. Book.java public class Book { private long id; private String title; private long authorId; public long getID() { return ID; } public Book(long id, String title, long authorId) { // ... } } ...

Design the classes and data structures for a call center

Problem Imagine you have a call center with three levels of employees: fresher, technical lead (TL), product manager (PM). There can be multiple employees, but only one TL or PM. An incoming telephone call must be allocated to a fresher who is free. If a fresher can’t handle the call, he or she must escalate the call to technical lead. If the TL is not free or not able to handle it, then the call should be escalated to PM. Design the classes and data structures for this problem. Implement a method getCallHandler(). ...

This site uses cookies to improve your experience on our website. By using and continuing to navigate this website, you accept this. Privacy Policy