SYMBOL INDEX (8478 symbols across 2248 files) FILE: design-patterns/Javascript/Behavioral Pattern/Chain of Responsibilites/supportRequest.js class supportHandler (line 3) | class supportHandler { method constructor (line 4) | constructor(nextHandler) { method handleRequest (line 9) | handleRequest(request, type) { class InternetConnectionTeam (line 20) | class InternetConnectionTeam extends supportHandler { method handleRequest (line 21) | handleRequest(request, type) { class InternetSupportTeam (line 39) | class InternetSupportTeam extends supportHandler { method handleRequest (line 40) | handleRequest(request, type) { class PhoneConnectionTeam (line 53) | class PhoneConnectionTeam extends supportHandler { method handleRequest (line 54) | handleRequest(request, type) { class PhoneSupportTeam (line 72) | class PhoneSupportTeam extends supportHandler { method handleRequest (line 73) | handleRequest(request, type) { FILE: design-patterns/Javascript/Behavioral Pattern/Command Design Pattern/command.js class Command (line 2) | class Command { method execute (line 3) | execute() {} class LightOnCommand (line 7) | class LightOnCommand extends Command { method constructor (line 8) | constructor(light) { method execute (line 13) | execute() { class LightOffCommand (line 17) | class LightOffCommand extends Command { method constructor (line 18) | constructor(light) { method execute (line 23) | execute() { class FanOnCommand (line 29) | class FanOnCommand extends Command { method constructor (line 30) | constructor(fan) { method execute (line 35) | execute() { class FanOffCommand (line 41) | class FanOffCommand extends Command { method constructor (line 42) | constructor(fan) { method execute (line 47) | execute() { FILE: design-patterns/Javascript/Behavioral Pattern/Command Design Pattern/invoker.js class RemoteControl (line 2) | class RemoteControl { method setCommand (line 3) | setCommand(command) { method pressButton (line 7) | pressButton() { FILE: design-patterns/Javascript/Behavioral Pattern/Command Design Pattern/receiver.js class Light (line 2) | class Light { method turnOn (line 3) | turnOn() { method turnOff (line 7) | turnOff() { class Fan (line 13) | class Fan { method turnOn (line 14) | turnOn() { method turnOff (line 18) | turnOff() { FILE: design-patterns/Javascript/Behavioral Pattern/Iterator Design Pattern/aggregate.js class Aggregate (line 4) | class Aggregate { method createIterator (line 5) | createIterator() { class ConcreteAggregate (line 10) | class ConcreteAggregate extends Aggregate { method constructor (line 11) | constructor() { method addBook (line 16) | addBook(book) { method createIterator (line 20) | createIterator() { FILE: design-patterns/Javascript/Behavioral Pattern/Iterator Design Pattern/book.js class Book (line 1) | class Book { method constructor (line 2) | constructor(title, author) { method getDetails (line 7) | getDetails() { FILE: design-patterns/Javascript/Behavioral Pattern/Iterator Design Pattern/iterator.js class Iterator (line 1) | class Iterator { method next (line 2) | next() { method hasNext (line 6) | hasNext() { class LibraryIterator (line 12) | class LibraryIterator extends Iterator { method constructor (line 13) | constructor(collection) { method hasNext (line 19) | hasNext() { method next (line 24) | next() { FILE: design-patterns/Javascript/Behavioral Pattern/Mediator Design Pattern/mediator.js class Mediator (line 2) | class Mediator { method register (line 3) | register(user) { method send (line 7) | send(message, user) { class ChatRoom (line 13) | class ChatRoom extends Mediator { method constructor (line 14) | constructor() { method register (line 19) | register(user) { method send (line 23) | send(message, from) { FILE: design-patterns/Javascript/Behavioral Pattern/Mediator Design Pattern/user.js class User (line 1) | class User { method constructor (line 2) | constructor(name, mediator) { method send (line 7) | send(message) { method receive (line 12) | receive(message) { FILE: design-patterns/Javascript/Behavioral Pattern/Memento Design Pattern/Example2/canvas.js class DrawingCanvas (line 4) | class DrawingCanvas { method constructor (line 5) | constructor() { method addShape (line 10) | addShape(shape) { method removeLastShape (line 15) | removeLastShape() { method save (line 20) | save() { method restore (line 25) | restore(memento) { method show (line 30) | show() { FILE: design-patterns/Javascript/Behavioral Pattern/Memento Design Pattern/Example2/careTaker.js class History (line 3) | class History { method constructor (line 4) | constructor() { method saveMemento (line 9) | saveMemento(memento) { method getMemento (line 14) | getMemento(index) { method removeMemento (line 19) | removeMemento() { method getLatestMemento (line 22) | getLatestMemento() { method removeLastMemento (line 28) | removeLastMemento() { FILE: design-patterns/Javascript/Behavioral Pattern/Memento Design Pattern/Example2/memento.js class CanvasMemento (line 2) | class CanvasMemento { method constructor (line 3) | constructor(state) { method getState (line 8) | getState() { FILE: design-patterns/Javascript/Behavioral Pattern/Memento Design Pattern/careTaker.js class CareTaker (line 3) | class CareTaker { method constructor (line 4) | constructor() { method saveMemento (line 8) | saveMemento(memento) { method getMemento (line 12) | getMemento(index) { FILE: design-patterns/Javascript/Behavioral Pattern/Memento Design Pattern/memento.js class Memento (line 2) | class Memento { method constructor (line 3) | constructor(state) { method getState (line 7) | getState() { FILE: design-patterns/Javascript/Behavioral Pattern/Memento Design Pattern/orginator.js class TextEditor (line 5) | class TextEditor { method constructor (line 6) | constructor() { method write (line 10) | write(content) { method getContent (line 14) | getContent() { method save (line 18) | save() { method restore (line 22) | restore(memento) { FILE: design-patterns/Javascript/Behavioral Pattern/Observer Design Pattern/observer.js class Observer (line 1) | class Observer { method update (line 2) | update(temperature) { class WebUI (line 7) | class WebUI extends Observer { method update (line 8) | update(temperature) { class MobileUI (line 13) | class MobileUI extends Observer { method update (line 14) | update(temperature) { FILE: design-patterns/Javascript/Behavioral Pattern/Observer Design Pattern/publisher.js class WeatherStation (line 1) | class WeatherStation { method constructor (line 2) | constructor() { method addObserver (line 8) | addObserver(observer) { method removeObserver (line 13) | removeObserver(observer) { method notifyObservers (line 18) | notifyObservers() { method setTemperature (line 23) | setTemperature(temperature) { FILE: design-patterns/Javascript/Behavioral Pattern/State Design Pattern/context.js class Phone (line 4) | class Phone { method constructor (line 5) | constructor() { method setState (line 8) | setState(state) { method alert (line 11) | alert() { method answer (line 14) | answer() { method hangup (line 17) | hangup() { FILE: design-patterns/Javascript/Behavioral Pattern/State Design Pattern/state.js class PhoneState (line 2) | class PhoneState { method alert (line 3) | alert() {} method answer (line 4) | answer() {} method hangup (line 5) | hangup() {} class Ringing (line 11) | class Ringing extends PhoneState { method alert (line 12) | alert() { method answer (line 15) | answer(context) { method hangup (line 19) | hangup() { class InCall (line 25) | class InCall extends PhoneState { method alert (line 26) | alert() { method answer (line 29) | answer() { method hangup (line 32) | hangup(context) { class Idle (line 39) | class Idle extends PhoneState { method alert (line 40) | alert() { method answer (line 43) | answer() { method hangup (line 47) | hangup() { FILE: design-patterns/Javascript/Behavioral Pattern/Strategy Design Pattern/paymentStrategy.js class PaymentGateway (line 5) | class PaymentGateway { method pay (line 6) | pay(amount) { class Cash (line 14) | class Cash extends PaymentGateway { method pay (line 15) | pay(amount) { class UPI (line 21) | class UPI extends PaymentGateway { method constructor (line 22) | constructor(UPI_ID, UPI_PIN) { method pay (line 27) | pay(amount) { class Card (line 35) | class Card extends PaymentGateway { method constructor (line 36) | constructor(cardNumber, CVV) { method pay (line 41) | pay(amount) { class InternetBanking (line 49) | class InternetBanking extends PaymentGateway { method constructor (line 50) | constructor(accountNumber, IFSC) { method pay (line 55) | pay(amount) { FILE: design-patterns/Javascript/Behavioral Pattern/Strategy Design Pattern/shoppingCart_Context.js class ShoppinCart (line 3) | class ShoppinCart { method constructor (line 4) | constructor() { method addItem (line 10) | addItem(item) { method viewCart (line 15) | viewCart() { method setPaymentMethod (line 23) | setPaymentMethod(paymentMethod) { method checkout (line 28) | checkout() { FILE: design-patterns/Javascript/Behavioral Pattern/Template Design Pattern/beverages.js class Food (line 2) | class Food { method prepareFood (line 3) | prepareFood() { method boilWater (line 11) | boilWater() { method brew (line 14) | brew() { method pourInCup (line 18) | pourInCup() { method addCondiments (line 21) | addCondiments() { method noNeedVegetables (line 26) | noNeedVegetables() { method addVegetables (line 32) | addVegetables() { method shouldAddVegetables (line 37) | shouldAddVegetables() { FILE: design-patterns/Javascript/Behavioral Pattern/Template Design Pattern/beveragesTypes.js class Tea (line 6) | class Tea extends Food { method brew (line 7) | brew() { method addCondiments (line 11) | addCondiments() { method addVegetables (line 15) | addVegetables() { method shouldAddVegetables (line 19) | shouldAddVegetables() { class Coffee (line 24) | class Coffee extends Food { method brew (line 25) | brew() { method addCondiments (line 29) | addCondiments() { FILE: design-patterns/Javascript/Behavioral Pattern/Visitor Design Pattern/element.js class Shape (line 2) | class Shape { method accept (line 3) | accept(visitor) { class Circle (line 8) | class Circle extends Shape { method constructor (line 9) | constructor(radius) { method accept (line 14) | accept(visitor) { class Rectangle (line 18) | class Rectangle extends Shape { method constructor (line 19) | constructor(width, height) { method accept (line 25) | accept(visitor) { FILE: design-patterns/Javascript/Behavioral Pattern/Visitor Design Pattern/visitor.js class ShapeVisitor (line 2) | class ShapeVisitor { method visitCircle (line 3) | visitCircle(circle) { method visitRectangle (line 7) | visitRectangle(rectangle) { class AreaVisitor (line 13) | class AreaVisitor extends ShapeVisitor { method visitCircle (line 14) | visitCircle(circle) { method visitRectangle (line 19) | visitRectangle(rectangle) { class PerimeterVisitor (line 25) | class PerimeterVisitor extends ShapeVisitor { method visitCircle (line 26) | visitCircle(circle) { method visitRectangle (line 31) | visitRectangle(rectangle) { FILE: design-patterns/Javascript/Creational Pattern/AbstractFactory Design Pattern/abstract.js class Chair (line 2) | class Chair { method sitOn (line 3) | sitOn() { class Sofa (line 8) | class Sofa { method lieOn (line 9) | lieOn() { class ModernChair (line 15) | class ModernChair extends Chair { method sitOn (line 16) | sitOn() { class ModernSofa (line 21) | class ModernSofa extends Sofa { method lieOn (line 22) | lieOn() { class ClassicChair (line 28) | class ClassicChair extends Chair { method sitOn (line 29) | sitOn() { class ClassicSofa (line 34) | class ClassicSofa extends Sofa { method lieOn (line 35) | lieOn() { class FurnitureFactory (line 41) | class FurnitureFactory { method createChair (line 42) | createChair() { method createSofa (line 45) | createSofa() { class ModernFurnitureFactory (line 51) | class ModernFurnitureFactory extends FurnitureFactory { method createChair (line 52) | createChair() { method createSofa (line 55) | createSofa() { class ClassicFurnitureFactory (line 61) | class ClassicFurnitureFactory extends FurnitureFactory { method createChair (line 62) | createChair() { method createSofa (line 65) | createSofa() { FILE: design-patterns/Javascript/Creational Pattern/AbstractFactory Design Pattern/main.js function createFurniture (line 6) | function createFurniture(factory) { FILE: design-patterns/Javascript/Creational Pattern/Builder Design Pattern/computerBuilder.js class Computer (line 1) | class Computer { method constructor (line 2) | constructor(builder) { class ComputerBuilder (line 10) | class ComputerBuilder { method constructor (line 11) | constructor(cpu, ram) { method addStorage (line 17) | addStorage(hardDisk) { method addMoniter (line 22) | addMoniter(moniter) { method build (line 27) | build() { FILE: design-patterns/Javascript/Creational Pattern/Factory Design Pattern/factory.js class pizzaFactory (line 3) | class pizzaFactory { method createPizza (line 4) | static createPizza(pizzaType) { FILE: design-patterns/Javascript/Creational Pattern/Factory Design Pattern/main.js function main (line 3) | function main() { FILE: design-patterns/Javascript/Creational Pattern/Factory Design Pattern/pizza.js class Pizza (line 1) | class Pizza { method prepare (line 2) | prepare() { method bake (line 5) | bake() { method cut (line 8) | cut() { method box (line 11) | box() { class cheesePizza (line 16) | class cheesePizza extends Pizza { method prepare (line 17) | prepare() { class pepperoniPizza (line 22) | class pepperoniPizza extends Pizza { method prepare (line 23) | prepare() { FILE: design-patterns/Javascript/Creational Pattern/Prototype Design Pattern/app.js class Car (line 1) | class Car{ method constructor (line 2) | constructor(model, year, color){ method clone (line 8) | clone(){ // Clone method to clone the current object method getDetails (line 12) | getDetails(){ FILE: design-patterns/Javascript/Creational Pattern/Singleton Design Pattern/singleton.js class Singleton (line 4) | class Singleton { method constructor (line 5) | constructor() { method increment (line 15) | increment() { method getData (line 20) | getData() { FILE: design-patterns/Javascript/Structural Pattern/Adapter Design Pattern/adapter.js class USB_Adapter (line 5) | class USB_Adapter { method constructor (line 6) | constructor(connector) { method plugIn (line 10) | plugIn() { FILE: design-patterns/Javascript/Structural Pattern/Adapter Design Pattern/usbA_connector.js class USB_A_Connector (line 5) | class USB_A_Connector { method connect (line 6) | connect() { FILE: design-patterns/Javascript/Structural Pattern/Adapter Design Pattern/usbC_device.js class USB_C_Device (line 5) | class USB_C_Device { method plugIn (line 6) | plugIn() { FILE: design-patterns/Javascript/Structural Pattern/Bridge Design Pattern/device.js class Device (line 4) | class Device { method turnOn (line 5) | turnOn() { method turnOff (line 8) | turnOff() { class TV (line 14) | class TV extends Device { method turnOn (line 15) | turnOn() { method turnOff (line 19) | turnOff() { class Radio (line 25) | class Radio extends Device { method turnOn (line 26) | turnOn() { method turnOff (line 30) | turnOff() { FILE: design-patterns/Javascript/Structural Pattern/Bridge Design Pattern/remoteControl.js class RemoteControl (line 3) | class RemoteControl { method constructor (line 4) | constructor(device) { method pressOn (line 8) | pressOn() { method pressOff (line 12) | pressOff() { FILE: design-patterns/Javascript/Structural Pattern/Composite Design Pattern/component.js class Component (line 3) | class Component { method showDetails (line 4) | showDetails() { FILE: design-patterns/Javascript/Structural Pattern/Composite Design Pattern/file.js class File (line 3) | class File extends Component { method constructor (line 4) | constructor(name) { method showDetails (line 9) | showDetails() { FILE: design-patterns/Javascript/Structural Pattern/Composite Design Pattern/folder.js class Folder (line 5) | class Folder extends Component { method constructor (line 6) | constructor(name) { method add (line 12) | add(file) { method showDetails (line 16) | showDetails() { FILE: design-patterns/Javascript/Structural Pattern/Decorator Design Pattern/additional.js class Cream (line 3) | class Cream { method constructor (line 4) | constructor(coffee) { method cost (line 8) | cost() { class Sugar (line 13) | class Sugar { method constructor (line 14) | constructor(coffee) { method cost (line 18) | cost() { class Ice (line 23) | class Ice{ method constructor (line 24) | constructor(coffee) { method cost (line 28) | cost() { FILE: design-patterns/Javascript/Structural Pattern/Decorator Design Pattern/coffee.js class Coffee (line 3) | class Coffee { method cost (line 4) | cost() { FILE: design-patterns/Javascript/Structural Pattern/Facade Design Pattern/dvdPlayer.js class DVDPlayer (line 3) | class DVDPlayer { method on (line 4) | on() { method play (line 7) | play(movie) { method off (line 11) | off() { FILE: design-patterns/Javascript/Structural Pattern/Facade Design Pattern/lights.js class Lights (line 3) | class Lights { method on (line 4) | on() { method off (line 8) | off() { FILE: design-patterns/Javascript/Structural Pattern/Facade Design Pattern/movieFacade.js class MovieFacade (line 7) | class MovieFacade { method constructor (line 8) | constructor() { method watchMovie (line 16) | watchMovie(movie) { method getSnacks (line 27) | getSnacks(snacks) { method endMovie (line 34) | endMovie() { FILE: design-patterns/Javascript/Structural Pattern/Facade Design Pattern/projector.js class Projector (line 3) | class Projector { method on (line 4) | on() { method connect (line 8) | connect(source) { method off (line 12) | off() { FILE: design-patterns/Javascript/Structural Pattern/Facade Design Pattern/snacks.js class Snacks (line 3) | class Snacks { method noteOrder (line 4) | noteOrder(snacks) { method prepare (line 7) | prepare() { method serve (line 11) | serve(snacks) { FILE: design-patterns/Javascript/Structural Pattern/Facade Design Pattern/soundSystem.js class SoundSystem (line 3) | class SoundSystem { method on (line 4) | on() { method setVolume (line 8) | setVolume(volume) { method off (line 12) | off() { FILE: design-patterns/Javascript/Structural Pattern/Flyweight Design Pattern/circle.js class Circle (line 2) | class Circle{ method constructor (line 3) | constructor(color){ method draw (line 7) | draw(size, x, y){ FILE: design-patterns/Javascript/Structural Pattern/Flyweight Design Pattern/circleFactory.js class CircleFactory (line 5) | class CircleFactory { method constructor (line 6) | constructor() { method getCircle (line 10) | getCircle(color) { FILE: design-patterns/Javascript/Structural Pattern/Proxy Design Pattern/proxyImage.js class ProxyImage (line 5) | class ProxyImage { method constructor (line 6) | constructor(fileName) { method display (line 11) | display() { FILE: design-patterns/Javascript/Structural Pattern/Proxy Design Pattern/real_Image.js class realImage (line 1) | class realImage { method constructor (line 2) | constructor(fileName) { method loadFromDisk (line 7) | loadFromDisk() { method display (line 11) | display() { FILE: design-patterns/cpp/adapter/in_house_payment_processor.h function class (line 5) | class InHousePaymentProcessor : public PaymentProcessor { FILE: design-patterns/cpp/adapter/legacy_gateway.h function class (line 4) | class LegacyGateway { FILE: design-patterns/cpp/adapter/legacy_gateway_adapter.h function class (line 5) | class LegacyGatewayAdapter : public PaymentProcessor { FILE: design-patterns/cpp/adapter/main.cpp function main (line 6) | int main() { FILE: design-patterns/cpp/adapter/payment_processor.h function class (line 4) | class PaymentProcessor { FILE: design-patterns/cpp/bridge/circle.h function class (line 4) | class Circle : public Shape { FILE: design-patterns/cpp/bridge/main.cpp function main (line 7) | int main() { FILE: design-patterns/cpp/bridge/raster_renderer.h function class (line 4) | class RasterRenderer : public Renderer { FILE: design-patterns/cpp/bridge/rectangle.h function class (line 4) | class Rectangle : public Shape { FILE: design-patterns/cpp/bridge/renderer.h function class (line 3) | class Renderer { FILE: design-patterns/cpp/bridge/shape.h function class (line 4) | class Shape { FILE: design-patterns/cpp/bridge/vector_renderer.h function class (line 4) | class VectorRenderer : public Renderer { FILE: design-patterns/cpp/builder/http_request.h function class (line 6) | class HttpRequest { FILE: design-patterns/cpp/builder/http_request_builder.cpp function HttpRequest (line 37) | HttpRequest HttpRequest::Builder::build() { FILE: design-patterns/cpp/builder/main.cpp function main (line 5) | int main() { FILE: design-patterns/cpp/chainofresponsibility/auth_handler.h function class (line 5) | class AuthHandler : public BaseHandler { FILE: design-patterns/cpp/chainofresponsibility/authorization_handler.h function class (line 5) | class AuthorizationHandler : public BaseHandler { FILE: design-patterns/cpp/chainofresponsibility/base_handler.h function class (line 4) | class BaseHandler : public RequestHandler { FILE: design-patterns/cpp/chainofresponsibility/business_logic_handler.h function class (line 5) | class BusinessLogicHandler : public BaseHandler { FILE: design-patterns/cpp/chainofresponsibility/main.cpp function main (line 9) | int main() { FILE: design-patterns/cpp/chainofresponsibility/rate_limit_handler.h function class (line 5) | class RateLimitHandler : public BaseHandler { FILE: design-patterns/cpp/chainofresponsibility/request.h function class (line 4) | class Request { FILE: design-patterns/cpp/chainofresponsibility/request_handler.h function class (line 4) | class RequestHandler { FILE: design-patterns/cpp/chainofresponsibility/validation_handler.h function class (line 5) | class ValidationHandler : public BaseHandler { FILE: design-patterns/cpp/composite/file.h function class (line 5) | class File : public FileSystemItem { FILE: design-patterns/cpp/composite/file_system_item.h function class (line 4) | class FileSystemItem { FILE: design-patterns/cpp/composite/folder.h function class (line 7) | class Folder : public FileSystemItem { FILE: design-patterns/cpp/composite/main.cpp function main (line 6) | int main() { FILE: design-patterns/cpp/decorator/bold_decorator.h function class (line 4) | class BoldDecorator : public TextDecorator { FILE: design-patterns/cpp/decorator/italic_decorator.h function class (line 4) | class ItalicDecorator : public TextDecorator { FILE: design-patterns/cpp/decorator/main.cpp function main (line 7) | int main() { FILE: design-patterns/cpp/decorator/plain_text_view.h function class (line 5) | class PlainTextView : public TextView { FILE: design-patterns/cpp/decorator/text_decorator.h function class (line 4) | class TextDecorator : public TextView { FILE: design-patterns/cpp/decorator/text_view.h function class (line 3) | class TextView { FILE: design-patterns/cpp/decorator/underline_decorator.h function class (line 4) | class UnderlineDecorator : public TextDecorator { FILE: design-patterns/cpp/facade/build_system.h function class (line 7) | class BuildSystem { FILE: design-patterns/cpp/facade/deployment_facade.h function class (line 9) | class DeploymentFacade { FILE: design-patterns/cpp/facade/deployment_target.h function class (line 7) | class DeploymentTarget { FILE: design-patterns/cpp/facade/main.cpp function main (line 4) | int main() { FILE: design-patterns/cpp/facade/testing_framework.h function class (line 6) | class TestingFramework { FILE: design-patterns/cpp/facade/version_control_system.h function class (line 7) | class VersionControlSystem { FILE: design-patterns/cpp/factory/email_notification.h function class (line 4) | class EmailNotification : public Notification { FILE: design-patterns/cpp/factory/main.cpp function main (line 4) | int main() { FILE: design-patterns/cpp/factory/notification.h function class (line 4) | class Notification { FILE: design-patterns/cpp/factory/notification_factory.h function class (line 6) | class NotificationFactory { FILE: design-patterns/cpp/factory/push_notification.h function class (line 4) | class PushNotification : public Notification { FILE: design-patterns/cpp/factory/sms_notification.h function class (line 4) | class SMSNotification : public Notification { FILE: design-patterns/cpp/flyweight/circle.h function class (line 5) | class Circle : public Shape { FILE: design-patterns/cpp/flyweight/main.cpp function main (line 4) | int main() { FILE: design-patterns/cpp/flyweight/shape.h function class (line 4) | class Shape { FILE: design-patterns/cpp/flyweight/shape_factory.cpp function Shape (line 6) | Shape* ShapeFactory::getCircle(const std::string& color) { FILE: design-patterns/cpp/flyweight/shape_factory.h function class (line 7) | class ShapeFactory { FILE: design-patterns/cpp/iterator/container.h function class (line 4) | class Container { FILE: design-patterns/cpp/iterator/iterator.h function class (line 4) | class Iterator { FILE: design-patterns/cpp/iterator/main.cpp function main (line 4) | int main() { FILE: design-patterns/cpp/iterator/name_iterator.h function class (line 6) | class NameIterator : public Iterator { FILE: design-patterns/cpp/iterator/name_repository.cpp function Iterator (line 8) | Iterator* NameRepository::getIterator() { FILE: design-patterns/cpp/iterator/name_repository.h function class (line 6) | class NameRepository : public Container { FILE: design-patterns/cpp/mediator/button.h function class (line 4) | class Button : public UIComponent { FILE: design-patterns/cpp/mediator/form_mediator.h function class (line 7) | class FormMediator : public UIMediator { FILE: design-patterns/cpp/mediator/label.h function class (line 5) | class Label : public UIComponent { FILE: design-patterns/cpp/mediator/main.cpp function main (line 7) | int main() { FILE: design-patterns/cpp/mediator/text_field.h function class (line 5) | class TextField : public UIComponent { FILE: design-patterns/cpp/mediator/ui_component.h function class (line 4) | class UIComponent { FILE: design-patterns/cpp/mediator/ui_mediator.h function class (line 6) | class UIMediator { FILE: design-patterns/cpp/memento/main.cpp function main (line 5) | int main() { FILE: design-patterns/cpp/memento/text_editor.cpp function TextEditorMemento (line 13) | TextEditorMemento TextEditor::save() const { FILE: design-patterns/cpp/memento/text_editor.h function class (line 5) | class TextEditor { FILE: design-patterns/cpp/memento/text_editor_memento.h function class (line 4) | class TextEditorMemento { FILE: design-patterns/cpp/memento/text_editor_undo_manager.h function class (line 5) | class TextEditorUndoManager { FILE: design-patterns/cpp/observer/fitness_data.h function class (line 6) | class FitnessData : public FitnessDataSubject { FILE: design-patterns/cpp/observer/fitness_data_observer.h function class (line 6) | class FitnessDataObserver { FILE: design-patterns/cpp/observer/fitness_data_subject.h function class (line 4) | class FitnessDataSubject { FILE: design-patterns/cpp/observer/goal_notifier.h function class (line 4) | class GoalNotifier : public FitnessDataObserver { FILE: design-patterns/cpp/observer/live_activity_display.h function class (line 4) | class LiveActivityDisplay : public FitnessDataObserver { FILE: design-patterns/cpp/observer/main.cpp function main (line 7) | int main() { FILE: design-patterns/cpp/observer/progress_logger.h function class (line 4) | class ProgressLogger : public FitnessDataObserver { FILE: design-patterns/cpp/prototype/enemy.cpp function Enemy (line 7) | Enemy* Enemy::clone() const { FILE: design-patterns/cpp/prototype/enemy.h function class (line 5) | class Enemy : public EnemyPrototype { FILE: design-patterns/cpp/prototype/enemy_prototype.h function class (line 3) | class EnemyPrototype { FILE: design-patterns/cpp/prototype/enemy_registry.h function class (line 8) | class EnemyRegistry { FILE: design-patterns/cpp/proxy/image.h function class (line 4) | class Image { FILE: design-patterns/cpp/proxy/image_gallery_app_v1.cpp function main (line 4) | int main() { FILE: design-patterns/cpp/proxy/image_gallery_app_v2.cpp function main (line 4) | int main() { FILE: design-patterns/cpp/proxy/image_proxy.h function class (line 7) | class ImageProxy : public Image { FILE: design-patterns/cpp/singleton/double_checked_singleton.cpp function DoubleCheckedSingleton (line 7) | DoubleCheckedSingleton& DoubleCheckedSingleton::getInstance() { FILE: design-patterns/cpp/singleton/double_checked_singleton.h function class (line 6) | class DoubleCheckedSingleton { FILE: design-patterns/cpp/singleton/eager_singleton.cpp function EagerSingleton (line 6) | EagerSingleton& EagerSingleton::getInstance() { FILE: design-patterns/cpp/singleton/eager_singleton.h function class (line 3) | class EagerSingleton { FILE: design-patterns/cpp/singleton/lazy_singleton.cpp function LazySingleton (line 6) | LazySingleton& LazySingleton::getInstance() { FILE: design-patterns/cpp/singleton/lazy_singleton.h function class (line 4) | class LazySingleton { FILE: design-patterns/cpp/singleton/main.cpp function main (line 7) | int main() { FILE: design-patterns/cpp/singleton/thread_safe_singleton.cpp function ThreadSafeSingleton (line 7) | ThreadSafeSingleton& ThreadSafeSingleton::getInstance() { FILE: design-patterns/cpp/singleton/thread_safe_singleton.h function class (line 5) | class ThreadSafeSingleton { FILE: design-patterns/cpp/state/dispensing_state.h function class (line 4) | class DispensingState : public MachineState { FILE: design-patterns/cpp/state/has_money_state.h function class (line 4) | class HasMoneyState : public MachineState { FILE: design-patterns/cpp/state/idle_state.h function class (line 4) | class IdleState : public MachineState { FILE: design-patterns/cpp/state/item_selected_state.h function class (line 4) | class ItemSelectedState : public MachineState { FILE: design-patterns/cpp/state/machine_state.h function class (line 6) | class MachineState { FILE: design-patterns/cpp/state/main.cpp function main (line 4) | int main() { FILE: design-patterns/cpp/state/vending_machine.h function class (line 6) | class VendingMachine { FILE: design-patterns/cpp/strategy/distance_based_shipping.h function class (line 4) | class DistanceBasedShipping : public ShippingStrategy { FILE: design-patterns/cpp/strategy/flat_rate_shipping.h function class (line 4) | class FlatRateShipping : public ShippingStrategy { FILE: design-patterns/cpp/strategy/order.h function class (line 4) | class Order { FILE: design-patterns/cpp/strategy/shipping_cost_service.h function class (line 5) | class ShippingCostService { FILE: design-patterns/cpp/strategy/shipping_strategy.h function class (line 4) | class ShippingStrategy { FILE: design-patterns/cpp/strategy/third_party_api_shipping.h function class (line 4) | class ThirdPartyApiShipping : public ShippingStrategy { FILE: design-patterns/cpp/strategy/weight_based_shipping.h function class (line 4) | class WeightBasedShipping : public ShippingStrategy { FILE: design-patterns/cpp/templatemethod/abstract_report_exporter.h function class (line 5) | class AbstractReportExporter { FILE: design-patterns/cpp/templatemethod/csv_report_exporter.h function class (line 4) | class CsvReportExporter : public AbstractReportExporter { FILE: design-patterns/cpp/templatemethod/excel_report_exporter.h function class (line 4) | class ExcelReportExporter : public AbstractReportExporter { FILE: design-patterns/cpp/templatemethod/pdf_report_exporter.h function class (line 4) | class PdfReportExporter : public AbstractReportExporter { FILE: design-patterns/cpp/templatemethod/report_app.cpp function main (line 7) | int main() { FILE: design-patterns/cpp/templatemethod/report_data.h function class (line 7) | class ReportData { FILE: design-patterns/csharp/adapter/CheckoutService.cs class CheckoutService (line 5) | public class CheckoutService method CheckoutService (line 9) | public CheckoutService(IPaymentProcessor paymentProcessor) method Checkout (line 14) | public bool Checkout(double amount, string currency) FILE: design-patterns/csharp/adapter/IPaymentProcessor.cs type IPaymentProcessor (line 3) | public interface IPaymentProcessor method ProcessPayment (line 5) | void ProcessPayment(double amount, string currency); method IsPaymentSuccessful (line 6) | bool IsPaymentSuccessful(); method GetTransactionId (line 7) | string GetTransactionId(); FILE: design-patterns/csharp/adapter/InHousePaymentProcessor.cs class InHousePaymentProcessor (line 5) | public class InHousePaymentProcessor : IPaymentProcessor method ProcessPayment (line 10) | public void ProcessPayment(double amount, string currency) method IsPaymentSuccessful (line 26) | public bool IsPaymentSuccessful() method GetTransactionId (line 31) | public string GetTransactionId() FILE: design-patterns/csharp/adapter/LegacyGateway.cs class LegacyGateway (line 5) | public class LegacyGateway method ExecuteTransaction (line 10) | public void ExecuteTransaction(double totalAmount, string currency) method CheckStatus (line 18) | public bool CheckStatus(long transactionReference) method GetReferenceNumber (line 24) | public long GetReferenceNumber() FILE: design-patterns/csharp/adapter/LegacyGatewayAdapter.cs class LegacyGatewayAdapter (line 5) | public class LegacyGatewayAdapter : IPaymentProcessor method LegacyGatewayAdapter (line 10) | public LegacyGatewayAdapter() method ProcessPayment (line 15) | public void ProcessPayment(double amount, string currency) method IsPaymentSuccessful (line 29) | public bool IsPaymentSuccessful() method GetTransactionId (line 35) | public string GetTransactionId() FILE: design-patterns/csharp/adapter/Program.cs class Program (line 5) | class Program method Main (line 7) | static void Main(string[] args) FILE: design-patterns/csharp/bridge/Circle.cs class Circle (line 3) | public class Circle : Shape method Circle (line 7) | public Circle(IRenderer renderer, float radius) : base(renderer) method Draw (line 12) | public override void Draw() FILE: design-patterns/csharp/bridge/IRenderer.cs type IRenderer (line 3) | public interface IRenderer method RenderCircle (line 5) | void RenderCircle(float radius); method RenderRectangle (line 6) | void RenderRectangle(float width, float height); FILE: design-patterns/csharp/bridge/Program.cs class Program (line 5) | class Program method Main (line 7) | static void Main(string[] args) FILE: design-patterns/csharp/bridge/RasterRenderer.cs class RasterRenderer (line 5) | public class RasterRenderer : IRenderer method RenderCircle (line 7) | public void RenderCircle(float radius) method RenderRectangle (line 12) | public void RenderRectangle(float width, float height) FILE: design-patterns/csharp/bridge/Rectangle.cs class Rectangle (line 3) | public class Rectangle : Shape method Rectangle (line 8) | public Rectangle(IRenderer renderer, float width, float height) : base... method Draw (line 14) | public override void Draw() FILE: design-patterns/csharp/bridge/Shape.cs class Shape (line 3) | public abstract class Shape method Shape (line 7) | protected Shape(IRenderer renderer) method Draw (line 12) | public abstract void Draw(); FILE: design-patterns/csharp/bridge/VectorRenderer.cs class VectorRenderer (line 5) | public class VectorRenderer : IRenderer method RenderCircle (line 7) | public void RenderCircle(float radius) method RenderRectangle (line 12) | public void RenderRectangle(float width, float height) FILE: design-patterns/csharp/builder/HttpRequest.cs class HttpRequest (line 7) | public class HttpRequest method HttpRequest (line 17) | private HttpRequest(Builder builder) method ToString (line 27) | public override string ToString() class Builder (line 39) | public class Builder method Builder (line 52) | public Builder(string url) method WithMethod (line 62) | public Builder WithMethod(string method) method WithHeader (line 68) | public Builder WithHeader(string key, string value) method WithQueryParam (line 77) | public Builder WithQueryParam(string key, string value) method WithBody (line 86) | public Builder WithBody(string body) method WithTimeout (line 92) | public Builder WithTimeout(int timeoutMillis) method Build (line 102) | public HttpRequest Build() FILE: design-patterns/csharp/builder/Program.cs class Program (line 5) | class Program method Main (line 7) | static void Main(string[] args) FILE: design-patterns/csharp/chainofresponsibility/AuthHandler.cs class AuthHandler (line 5) | public class AuthHandler : BaseHandler method Handle (line 7) | public override void Handle(Request request) FILE: design-patterns/csharp/chainofresponsibility/AuthorizationHandler.cs class AuthorizationHandler (line 5) | public class AuthorizationHandler : BaseHandler method Handle (line 7) | public override void Handle(Request request) FILE: design-patterns/csharp/chainofresponsibility/BaseHandler.cs class BaseHandler (line 3) | public abstract class BaseHandler : IRequestHandler method SetNext (line 7) | public void SetNext(IRequestHandler next) method Handle (line 12) | public abstract void Handle(Request request); method HandleNext (line 14) | protected void HandleNext(Request request) FILE: design-patterns/csharp/chainofresponsibility/BusinessLogicHandler.cs class BusinessLogicHandler (line 5) | public class BusinessLogicHandler : BaseHandler method Handle (line 7) | public override void Handle(Request request) FILE: design-patterns/csharp/chainofresponsibility/RateLimitHandler.cs class RateLimitHandler (line 5) | public class RateLimitHandler : BaseHandler method Handle (line 9) | public override void Handle(Request request) FILE: design-patterns/csharp/chainofresponsibility/Request.cs class Request (line 3) | public class Request method Request (line 10) | public Request(string user, string role, int requestCount, string payl... FILE: design-patterns/csharp/chainofresponsibility/ValidationHandler.cs class ValidationHandler (line 5) | public class ValidationHandler : BaseHandler method Handle (line 7) | public override void Handle(Request request) FILE: design-patterns/csharp/composite/File.cs class File (line 5) | public class File : IFileSystemItem method File (line 10) | public File(string name, int size) method GetSize (line 16) | public int GetSize() method PrintStructure (line 21) | public void PrintStructure(string indent) method Delete (line 26) | public void Delete() FILE: design-patterns/csharp/composite/Folder.cs class Folder (line 6) | public class Folder : IFileSystemItem method Folder (line 11) | public Folder(string name) method Add (line 17) | public void Add(IFileSystemItem item) method Remove (line 22) | public void Remove(IFileSystemItem item) method GetSize (line 27) | public int GetSize() method PrintStructure (line 37) | public void PrintStructure(string indent) method Delete (line 46) | public void Delete() FILE: design-patterns/csharp/composite/IFileSystemItem.cs type IFileSystemItem (line 3) | public interface IFileSystemItem method GetSize (line 5) | int GetSize(); method PrintStructure (line 6) | void PrintStructure(string indent); method Delete (line 7) | void Delete(); FILE: design-patterns/csharp/composite/Program.cs class Program (line 5) | class Program method Main (line 7) | static void Main(string[] args) FILE: design-patterns/csharp/decorator/BoldDecorator.cs class BoldDecorator (line 5) | public class BoldDecorator : TextDecorator method BoldDecorator (line 7) | public BoldDecorator(ITextView inner) : base(inner) method Render (line 11) | public override void Render() FILE: design-patterns/csharp/decorator/ITextView.cs type ITextView (line 3) | public interface ITextView method Render (line 5) | void Render(); FILE: design-patterns/csharp/decorator/ItalicDecorator.cs class ItalicDecorator (line 5) | public class ItalicDecorator : TextDecorator method ItalicDecorator (line 7) | public ItalicDecorator(ITextView inner) : base(inner) method Render (line 11) | public override void Render() FILE: design-patterns/csharp/decorator/PlainTextView.cs class PlainTextView (line 5) | public class PlainTextView : ITextView method PlainTextView (line 9) | public PlainTextView(string text) method Render (line 14) | public void Render() FILE: design-patterns/csharp/decorator/Program.cs class Program (line 5) | class Program method Main (line 7) | static void Main(string[] args) FILE: design-patterns/csharp/decorator/TextDecorator.cs class TextDecorator (line 3) | public abstract class TextDecorator : ITextView method TextDecorator (line 7) | public TextDecorator(ITextView inner) method Render (line 12) | public abstract void Render(); FILE: design-patterns/csharp/decorator/UnderlineDecorator.cs class UnderlineDecorator (line 5) | public class UnderlineDecorator : TextDecorator method UnderlineDecorator (line 7) | public UnderlineDecorator(ITextView inner) : base(inner) method Render (line 11) | public override void Render() FILE: design-patterns/csharp/facade/BuildSystem.cs class BuildSystem (line 6) | public class BuildSystem method CompileProject (line 8) | public bool CompileProject() method GetArtifactPath (line 16) | public string GetArtifactPath() method SimulateDelay (line 23) | private void SimulateDelay(int ms) FILE: design-patterns/csharp/facade/DeploymentFacade.cs class DeploymentFacade (line 5) | public class DeploymentFacade method DeploymentFacade (line 12) | public DeploymentFacade() method DeployApplication (line 20) | public bool DeployApplication(string branch, string serverAddress) method DeployHotfix (line 64) | public bool DeployHotfix(string branch, string serverAddress) FILE: design-patterns/csharp/facade/DeploymentTarget.cs class DeploymentTarget (line 6) | public class DeploymentTarget method TransferArtifact (line 8) | public void TransferArtifact(string artifactPath, string server) method ActivateNewVersion (line 15) | public void ActivateNewVersion(string server) method SimulateDelay (line 22) | private void SimulateDelay(int ms) FILE: design-patterns/csharp/facade/Program.cs class Program (line 5) | class Program method Main (line 7) | static void Main(string[] args) FILE: design-patterns/csharp/facade/TestingFramework.cs class TestingFramework (line 6) | public class TestingFramework method RunUnitTests (line 8) | public bool RunUnitTests() method RunIntegrationTests (line 16) | public bool RunIntegrationTests() method SimulateDelay (line 24) | private void SimulateDelay(int ms) FILE: design-patterns/csharp/factory/EmailNotification.cs class EmailNotification (line 5) | public class EmailNotification : INotification method Send (line 7) | public void Send(string message) FILE: design-patterns/csharp/factory/INotification.cs type INotification (line 3) | public interface INotification method Send (line 5) | void Send(string message); FILE: design-patterns/csharp/factory/NotificationServiceNaive.cs class NotificationServiceNaive (line 5) | public class NotificationServiceNaive method SendNotification (line 7) | public void SendNotification(string type, string message) FILE: design-patterns/csharp/factory/Program.cs class Program (line 5) | class Program method Main (line 7) | static void Main(string[] args) FILE: design-patterns/csharp/factory/PushNotification.cs class PushNotification (line 5) | public class PushNotification : INotification method Send (line 7) | public void Send(string message) FILE: design-patterns/csharp/factory/SMSNotification.cs class SMSNotification (line 5) | public class SMSNotification : INotification method Send (line 7) | public void Send(string message) FILE: design-patterns/csharp/flyweight/CharacterFlyweightFactory.cs class CharacterFlyweightFactory (line 6) | public class CharacterFlyweightFactory method GetFlyweight (line 10) | public static ICharacterFlyweight GetFlyweight(char symbol, string fon... method GetFlyweightCount (line 20) | public int GetFlyweightCount() FILE: design-patterns/csharp/flyweight/CharacterGlyph.cs class CharacterGlyph (line 5) | public class CharacterGlyph : ICharacterFlyweight method CharacterGlyph (line 12) | public CharacterGlyph(char symbol, string fontFamily, int fontSize, st... method Draw (line 20) | public void Draw(int x, int y) FILE: design-patterns/csharp/flyweight/ICharacterFlyweight.cs type ICharacterFlyweight (line 3) | public interface ICharacterFlyweight method Draw (line 5) | void Draw(int x, int y); FILE: design-patterns/csharp/flyweight/Program.cs class Program (line 5) | class Program method Main (line 7) | static void Main(string[] args) FILE: design-patterns/csharp/flyweight/TextEditorClient.cs class TextEditorClient (line 6) | public class TextEditorClient method AddCharacter (line 11) | public void AddCharacter(char c, int x, int y, string font, int size, ... method RenderDocument (line 17) | public void RenderDocument() class RenderedCharacter (line 26) | private class RenderedCharacter method RenderedCharacter (line 31) | public RenderedCharacter(ICharacterFlyweight glyph, int x, int y) method Draw (line 38) | public void Draw() FILE: design-patterns/csharp/iterator/IIterableCollection.cs type IIterableCollection (line 3) | public interface IIterableCollection method CreateIterator (line 5) | IIterator CreateIterator(); FILE: design-patterns/csharp/iterator/IIterator.cs type IIterator (line 3) | public interface IIterator method HasNext (line 5) | bool HasNext(); method Next (line 6) | T Next(); FILE: design-patterns/csharp/mediator/Button.cs class Button (line 5) | public class Button : UIComponent method Button (line 9) | public Button(IUIMediator mediator) : base(mediator) method Click (line 13) | public void Click() method SetEnabled (line 26) | public void SetEnabled(bool value) FILE: design-patterns/csharp/mediator/FormMediator.cs class FormMediator (line 3) | public class FormMediator : IUIMediator method SetUsernameField (line 10) | public void SetUsernameField(TextField usernameField) method SetPasswordField (line 15) | public void SetPasswordField(TextField passwordField) method SetLoginButton (line 20) | public void SetLoginButton(Button loginButton) method SetStatusLabel (line 25) | public void SetStatusLabel(Label statusLabel) method ComponentChanged (line 30) | public void ComponentChanged(UIComponent component) FILE: design-patterns/csharp/mediator/IUIMediator.cs type IUIMediator (line 3) | public interface IUIMediator method ComponentChanged (line 5) | void ComponentChanged(UIComponent component); FILE: design-patterns/csharp/mediator/Label.cs class Label (line 5) | public class Label : UIComponent method Label (line 9) | public Label(IUIMediator mediator) : base(mediator) method SetText (line 13) | public void SetText(string message) FILE: design-patterns/csharp/mediator/Program.cs class Program (line 5) | class Program method Main (line 7) | static void Main(string[] args) FILE: design-patterns/csharp/mediator/TextField.cs class TextField (line 5) | public class TextField : UIComponent method TextField (line 9) | public TextField(IUIMediator mediator) : base(mediator) method SetText (line 13) | public void SetText(string newText) method GetText (line 20) | public string GetText() FILE: design-patterns/csharp/mediator/UIComponent.cs class UIComponent (line 3) | public abstract class UIComponent method UIComponent (line 7) | public UIComponent(IUIMediator mediator) method NotifyMediator (line 12) | public void NotifyMediator() FILE: design-patterns/csharp/memento/Program.cs class Program (line 5) | class Program method Main (line 7) | static void Main(string[] args) FILE: design-patterns/csharp/memento/TextEditor.cs class TextEditor (line 5) | public class TextEditor method Type (line 9) | public void Type(string newText) method GetContent (line 15) | public string GetContent() method Save (line 20) | public TextEditorMemento Save() method Restore (line 26) | public void Restore(TextEditorMemento memento) FILE: design-patterns/csharp/memento/TextEditorMemento.cs class TextEditorMemento (line 3) | public class TextEditorMemento method TextEditorMemento (line 7) | public TextEditorMemento(string state) method GetState (line 12) | public string GetState() FILE: design-patterns/csharp/memento/TextEditorUndoManager.cs class TextEditorUndoManager (line 6) | public class TextEditorUndoManager method Save (line 10) | public void Save(TextEditor editor) method Undo (line 15) | public void Undo(TextEditor editor) FILE: design-patterns/csharp/observer/FitnessData.cs class FitnessData (line 6) | public class FitnessData : IFitnessDataSubject method RegisterObserver (line 14) | public void RegisterObserver(IFitnessDataObserver observer) method RemoveObserver (line 19) | public void RemoveObserver(IFitnessDataObserver observer) method NotifyObservers (line 24) | public void NotifyObservers() method NewFitnessDataPushed (line 32) | public void NewFitnessDataPushed(int steps, int activeMinutes, int cal... method DailyReset (line 43) | public void DailyReset() FILE: design-patterns/csharp/observer/GoalNotifier.cs class GoalNotifier (line 5) | public class GoalNotifier : IFitnessDataObserver method Update (line 11) | public void Update(FitnessData data) FILE: design-patterns/csharp/observer/IFitnessDataObserver.cs type IFitnessDataObserver (line 3) | public interface IFitnessDataObserver method Update (line 5) | void Update(FitnessData data); FILE: design-patterns/csharp/observer/IFitnessDataSubject.cs type IFitnessDataSubject (line 3) | public interface IFitnessDataSubject method RegisterObserver (line 5) | void RegisterObserver(IFitnessDataObserver observer); method RemoveObserver (line 6) | void RemoveObserver(IFitnessDataObserver observer); method NotifyObservers (line 7) | void NotifyObservers(); FILE: design-patterns/csharp/observer/LiveActivityDisplay.cs class LiveActivityDisplay (line 5) | public class LiveActivityDisplay : IFitnessDataObserver method Update (line 7) | public void Update(FitnessData data) FILE: design-patterns/csharp/observer/ProgressLogger.cs class ProgressLogger (line 5) | public class ProgressLogger : IFitnessDataObserver method Update (line 7) | public void Update(FitnessData data) FILE: design-patterns/csharp/prototype/Enemy.cs class Enemy (line 5) | public class Enemy : IEnemyPrototype method Enemy (line 13) | public Enemy(string type, int health, double speed, bool armored, stri... method Clone (line 22) | public IEnemyPrototype Clone() method SetHealth (line 27) | public void SetHealth(int health) method PrintStats (line 32) | public void PrintStats() FILE: design-patterns/csharp/prototype/EnemyRegistry.cs class EnemyRegistry (line 6) | public class EnemyRegistry method Register (line 10) | public void Register(string key, Enemy prototype) method Get (line 15) | public Enemy Get(string key) FILE: design-patterns/csharp/prototype/Game.cs class Game (line 5) | class Game method Main (line 7) | static void Main(string[] args) FILE: design-patterns/csharp/prototype/IEnemyPrototype.cs type IEnemyPrototype (line 3) | public interface IEnemyPrototype method Clone (line 5) | IEnemyPrototype Clone(); FILE: design-patterns/csharp/proxy/HighResolutionImage.cs class HighResolutionImage (line 6) | public class HighResolutionImage : IImage method HighResolutionImage (line 11) | public HighResolutionImage(string fileName) method LoadImageFromDisk (line 17) | private void LoadImageFromDisk() method Display (line 26) | public void Display() method GetFileName (line 32) | public string GetFileName() FILE: design-patterns/csharp/proxy/IImage.cs type IImage (line 3) | public interface IImage method Display (line 5) | void Display(); method GetFileName (line 6) | string GetFileName(); FILE: design-patterns/csharp/proxy/ImageGalleryApp.cs class ImageGalleryApp (line 5) | class ImageGalleryApp method Main (line 7) | static void Main(string[] args) FILE: design-patterns/csharp/proxy/ImageProxy.cs class ImageProxy (line 5) | public class ImageProxy : IImage method ImageProxy (line 10) | public ImageProxy(string fileName) method GetFileName (line 16) | public string GetFileName() method Display (line 22) | public void Display() FILE: design-patterns/csharp/singleton/BillPughSingleton.cs class BillPughSingleton (line 3) | public class BillPughSingleton method BillPughSingleton (line 5) | private BillPughSingleton() { } method GetInstance (line 6) | public static BillPughSingleton GetInstance() class Nested (line 10) | private class Nested method Nested (line 13) | static Nested() { } FILE: design-patterns/csharp/singleton/DoubleCheckedLockingSingleton.cs class DoubleCheckedLockingSingleton (line 3) | public class DoubleCheckedLockingSingleton method DoubleCheckedLockingSingleton (line 7) | private DoubleCheckedLockingSingleton() { } method GetInstance (line 8) | public static DoubleCheckedLockingSingleton GetInstance() FILE: design-patterns/csharp/singleton/EagerSingleton.cs class EagerSingleton (line 3) | public class EagerSingleton method EagerSingleton (line 6) | private EagerSingleton() { } method GetInstance (line 7) | public static EagerSingleton GetInstance() FILE: design-patterns/csharp/singleton/LazySingleton.cs class LazySingleton (line 3) | public class LazySingleton method LazySingleton (line 6) | private LazySingleton() { } method GetInstance (line 7) | public static LazySingleton GetInstance() FILE: design-patterns/csharp/singleton/SingletonDemo.cs class SingletonDemo (line 5) | class SingletonDemo method Main (line 7) | static void Main(string[] args) FILE: design-patterns/csharp/singleton/StaticBlockSingleton.cs class StaticBlockSingleton (line 5) | public class StaticBlockSingleton method StaticBlockSingleton (line 8) | static StaticBlockSingleton() method StaticBlockSingleton (line 19) | private StaticBlockSingleton() { } method GetInstance (line 20) | public static StaticBlockSingleton GetInstance() FILE: design-patterns/csharp/singleton/ThreadSafeSingleton.cs class ThreadSafeSingleton (line 3) | public class ThreadSafeSingleton method ThreadSafeSingleton (line 7) | private ThreadSafeSingleton() { } method GetInstance (line 8) | public static ThreadSafeSingleton GetInstance() FILE: design-patterns/csharp/state/DispensingState.cs class DispensingState (line 5) | public class DispensingState : IMachineState method SelectItem (line 7) | public void SelectItem(VendingMachine context, string itemCode) method InsertCoin (line 12) | public void InsertCoin(VendingMachine context, double amount) method DispenseItem (line 17) | public void DispenseItem(VendingMachine context) FILE: design-patterns/csharp/state/HasMoneyState.cs class HasMoneyState (line 6) | public class HasMoneyState : IMachineState method SelectItem (line 8) | public void SelectItem(VendingMachine context, string itemCode) method InsertCoin (line 13) | public void InsertCoin(VendingMachine context, double amount) method DispenseItem (line 18) | public void DispenseItem(VendingMachine context) FILE: design-patterns/csharp/state/IMachineState.cs type IMachineState (line 3) | public interface IMachineState method SelectItem (line 5) | void SelectItem(VendingMachine context, string itemCode); method InsertCoin (line 6) | void InsertCoin(VendingMachine context, double amount); method DispenseItem (line 7) | void DispenseItem(VendingMachine context); FILE: design-patterns/csharp/state/IdleState.cs class IdleState (line 5) | public class IdleState : IMachineState method SelectItem (line 7) | public void SelectItem(VendingMachine context, string itemCode) method InsertCoin (line 14) | public void InsertCoin(VendingMachine context, double amount) method DispenseItem (line 19) | public void DispenseItem(VendingMachine context) FILE: design-patterns/csharp/state/ItemSelectedState.cs class ItemSelectedState (line 5) | public class ItemSelectedState : IMachineState method SelectItem (line 7) | public void SelectItem(VendingMachine context, string itemCode) method InsertCoin (line 12) | public void InsertCoin(VendingMachine context, double amount) method DispenseItem (line 19) | public void DispenseItem(VendingMachine context) FILE: design-patterns/csharp/state/Program.cs class Program (line 5) | class Program method Main (line 7) | static void Main(string[] args) FILE: design-patterns/csharp/state/VendingMachine.cs class VendingMachine (line 3) | public class VendingMachine method VendingMachine (line 9) | public VendingMachine() method SetState (line 14) | public void SetState(IMachineState newState) method SetSelectedItem (line 19) | public void SetSelectedItem(string itemCode) method SetInsertedAmount (line 24) | public void SetInsertedAmount(double amount) method GetSelectedItem (line 29) | public string GetSelectedItem() method GetInsertedAmount (line 34) | public double GetInsertedAmount() method SelectItem (line 39) | public void SelectItem(string itemCode) method InsertCoin (line 44) | public void InsertCoin(double amount) method DispenseItem (line 49) | public void DispenseItem() method Reset (line 54) | public void Reset() FILE: design-patterns/csharp/strategy/DistanceBasedShipping.cs class DistanceBasedShipping (line 3) | public class DistanceBasedShipping : IShippingStrategy method CalculateCost (line 10) | public double CalculateCost(Order order) FILE: design-patterns/csharp/strategy/FlatRateShipping.cs class FlatRateShipping (line 3) | public class FlatRateShipping : IShippingStrategy method CalculateCost (line 7) | public double CalculateCost(Order order) FILE: design-patterns/csharp/strategy/IShippingStrategy.cs type IShippingStrategy (line 3) | public interface IShippingStrategy method CalculateCost (line 5) | double CalculateCost(Order order); FILE: design-patterns/csharp/strategy/Order.cs class Order (line 3) | public class Order method GetTotalWeight (line 5) | public double GetTotalWeight() => 5.0; method GetDestinationZone (line 6) | public string GetDestinationZone() => "ZoneA"; method GetOrderValue (line 7) | public double GetOrderValue() => 150.0; FILE: design-patterns/csharp/strategy/Program.cs class Program (line 5) | class Program method Main (line 7) | static void Main(string[] args) FILE: design-patterns/csharp/strategy/ShippingCostService.cs class ShippingCostService (line 3) | public class ShippingCostService method ShippingCostService (line 7) | public ShippingCostService(IShippingStrategy shippingStrategy) method CalculateShippingCost (line 12) | public double CalculateShippingCost(Order order) FILE: design-patterns/csharp/strategy/ThirdPartyApiShipping.cs class ThirdPartyApiShipping (line 3) | public class ThirdPartyApiShipping : IShippingStrategy method CalculateCost (line 5) | public double CalculateCost(Order order) FILE: design-patterns/csharp/strategy/WeightBasedShipping.cs class WeightBasedShipping (line 3) | public class WeightBasedShipping : IShippingStrategy method CalculateCost (line 7) | public double CalculateCost(Order order) FILE: design-patterns/csharp/templatemethod/AbstractReportExporter.cs class AbstractReportExporter (line 5) | public abstract class AbstractReportExporter method ExportReport (line 7) | public void ExportReport(ReportData data, string filePath) method PrepareData (line 19) | protected virtual void PrepareData(ReportData data) method OpenFile (line 25) | protected virtual void OpenFile(string filePath) method WriteHeader (line 30) | protected abstract void WriteHeader(ReportData data); method WriteDataRows (line 32) | protected abstract void WriteDataRows(ReportData data); method WriteFooter (line 35) | protected virtual void WriteFooter(ReportData data) method CloseFile (line 41) | protected virtual void CloseFile(string filePath) FILE: design-patterns/csharp/templatemethod/CsvReportExporter.cs class CsvReportExporter (line 6) | public class CsvReportExporter : AbstractReportExporter method WriteHeader (line 8) | protected override void WriteHeader(ReportData data) method WriteDataRows (line 14) | protected override void WriteDataRows(ReportData data) FILE: design-patterns/csharp/templatemethod/ExcelReportExporter.cs class ExcelReportExporter (line 5) | public class ExcelReportExporter : AbstractReportExporter method WriteHeader (line 7) | protected override void WriteHeader(ReportData data) method WriteDataRows (line 16) | protected override void WriteDataRows(ReportData data) FILE: design-patterns/csharp/templatemethod/PdfReportExporter.cs class PdfReportExporter (line 5) | public class PdfReportExporter : AbstractReportExporter method WriteHeader (line 7) | protected override void WriteHeader(ReportData data) method WriteDataRows (line 18) | protected override void WriteDataRows(ReportData data) FILE: design-patterns/csharp/templatemethod/Program.cs class Program (line 5) | class Program method Main (line 7) | static void Main(string[] args) FILE: design-patterns/csharp/templatemethod/ReportData.cs class ReportData (line 5) | public class ReportData method GetHeaders (line 7) | public List GetHeaders() method GetRows (line 12) | public List> GetRows() FILE: design-patterns/golang/adapter/checkout_service.go type CheckoutService (line 6) | type CheckoutService struct method ProcessCheckout (line 18) | func (cs *CheckoutService) ProcessCheckout(amount float64, currency st... function NewCheckoutService (line 11) | func NewCheckoutService(paymentProcessor PaymentProcessor) *CheckoutServ... FILE: design-patterns/golang/adapter/in_house_payment_processor.go type InHousePaymentProcessor (line 9) | type InHousePaymentProcessor struct method ProcessPayment (line 15) | func (p *InHousePaymentProcessor) ProcessPayment(amount float64, curre... method IsPaymentSuccessful (line 23) | func (p *InHousePaymentProcessor) IsPaymentSuccessful() bool { method GetTransactionID (line 28) | func (p *InHousePaymentProcessor) GetTransactionID() string { FILE: design-patterns/golang/adapter/legacy_gateway.go type LegacyGateway (line 9) | type LegacyGateway struct method ExecuteTransaction (line 15) | func (lg *LegacyGateway) ExecuteTransaction(totalAmount float64, curre... method CheckStatus (line 23) | func (lg *LegacyGateway) CheckStatus(transactionReference int64) bool { method GetReferenceNumber (line 29) | func (lg *LegacyGateway) GetReferenceNumber() int64 { FILE: design-patterns/golang/adapter/legacy_gateway_adapter.go type LegacyGatewayAdapter (line 6) | type LegacyGatewayAdapter struct method ProcessPayment (line 18) | func (adapter *LegacyGatewayAdapter) ProcessPayment(amount float64, cu... method IsPaymentSuccessful (line 23) | func (adapter *LegacyGatewayAdapter) IsPaymentSuccessful() bool { method GetTransactionID (line 28) | func (adapter *LegacyGatewayAdapter) GetTransactionID() string { function NewLegacyGatewayAdapter (line 11) | func NewLegacyGatewayAdapter(legacyGateway *LegacyGateway) *LegacyGatewa... FILE: design-patterns/golang/adapter/main.go function main (line 8) | func main() { FILE: design-patterns/golang/adapter/payment_processor.go type PaymentProcessor (line 4) | type PaymentProcessor interface FILE: design-patterns/golang/bridge/circle.go type Circle (line 4) | type Circle struct method Draw (line 18) | func (c *Circle) Draw() { function NewCircle (line 10) | func NewCircle(renderer Renderer, radius float64) *Circle { FILE: design-patterns/golang/bridge/main.go function main (line 8) | func main() { FILE: design-patterns/golang/bridge/raster_renderer.go type RasterRenderer (line 6) | type RasterRenderer struct method RenderCircle (line 14) | func (r *RasterRenderer) RenderCircle(radius float64) { method RenderRectangle (line 19) | func (r *RasterRenderer) RenderRectangle(width, height float64) { function NewRasterRenderer (line 9) | func NewRasterRenderer() *RasterRenderer { FILE: design-patterns/golang/bridge/rectangle.go type Rectangle (line 4) | type Rectangle struct method Draw (line 20) | func (r *Rectangle) Draw() { function NewRectangle (line 11) | func NewRectangle(renderer Renderer, width, height float64) *Rectangle { FILE: design-patterns/golang/bridge/renderer.go type Renderer (line 4) | type Renderer interface FILE: design-patterns/golang/bridge/shape.go type Shape (line 4) | type Shape interface type BaseShape (line 9) | type BaseShape struct function NewBaseShape (line 14) | func NewBaseShape(renderer Renderer) *BaseShape { FILE: design-patterns/golang/bridge/vector_renderer.go type VectorRenderer (line 6) | type VectorRenderer struct method RenderCircle (line 14) | func (v *VectorRenderer) RenderCircle(radius float64) { method RenderRectangle (line 19) | func (v *VectorRenderer) RenderRectangle(width, height float64) { function NewVectorRenderer (line 9) | func NewVectorRenderer() *VectorRenderer { FILE: design-patterns/golang/builder/http_request.go type HttpRequest (line 8) | type HttpRequest struct method GetURL (line 30) | func (r *HttpRequest) GetURL() string { method GetMethod (line 35) | func (r *HttpRequest) GetMethod() string { method GetHeaders (line 40) | func (r *HttpRequest) GetHeaders() map[string]string { method GetQueryParams (line 45) | func (r *HttpRequest) GetQueryParams() map[string]string { method GetBody (line 50) | func (r *HttpRequest) GetBody() string { method GetTimeout (line 55) | func (r *HttpRequest) GetTimeout() int { method String (line 60) | func (r *HttpRequest) String() string { function NewHttpRequest (line 18) | func NewHttpRequest(builder *HttpRequestBuilder) *HttpRequest { FILE: design-patterns/golang/builder/http_request_builder.go type HttpRequestBuilder (line 9) | type HttpRequestBuilder struct method Method (line 34) | func (b *HttpRequestBuilder) Method(method string) *HttpRequestBuilder { method Header (line 44) | func (b *HttpRequestBuilder) Header(key, value string) *HttpRequestBui... method QueryParam (line 52) | func (b *HttpRequestBuilder) QueryParam(key, value string) *HttpReques... method Body (line 60) | func (b *HttpRequestBuilder) Body(body string) *HttpRequestBuilder { method Timeout (line 66) | func (b *HttpRequestBuilder) Timeout(timeoutMillis int) *HttpRequestBu... method Build (line 74) | func (b *HttpRequestBuilder) Build() *HttpRequest { function NewHttpRequestBuilder (line 19) | func NewHttpRequestBuilder(url string) (*HttpRequestBuilder, error) { FILE: design-patterns/golang/builder/main.go function main (line 8) | func main() { FILE: design-patterns/golang/chainofresponsibility/authentication_handler.go type AuthenticationHandler (line 6) | type AuthenticationHandler struct method Handle (line 11) | func (h *AuthenticationHandler) Handle(request *Request) { FILE: design-patterns/golang/chainofresponsibility/base_handler.go type BaseHandler (line 4) | type BaseHandler struct method SetNext (line 9) | func (h *BaseHandler) SetNext(handler RequestHandler) { method HandleNext (line 14) | func (h *BaseHandler) HandleNext(request *Request) { FILE: design-patterns/golang/chainofresponsibility/main.go function main (line 7) | func main() { FILE: design-patterns/golang/chainofresponsibility/request.go type Request (line 4) | type Request struct function NewRequest (line 10) | func NewRequest(user, role string, requestCount int, payload string) *Re... FILE: design-patterns/golang/chainofresponsibility/request_handler.go type RequestHandler (line 4) | type RequestHandler interface FILE: design-patterns/golang/chainofresponsibility/validation_handler.go type ValidationHandler (line 6) | type ValidationHandler struct method Handle (line 11) | func (h *ValidationHandler) Handle(request *Request) { FILE: design-patterns/golang/composite/file.go type File (line 6) | type File struct method GetName (line 20) | func (f *File) GetName() string { method GetSize (line 25) | func (f *File) GetSize() int64 { method Print (line 30) | func (f *File) Print(indent string) { method Delete (line 35) | func (f *File) Delete() { function NewFile (line 12) | func NewFile(name string, size int64) *File { FILE: design-patterns/golang/composite/file_system_item.go type FileSystemItem (line 4) | type FileSystemItem interface FILE: design-patterns/golang/composite/folder.go type Folder (line 6) | type Folder struct method GetName (line 20) | func (f *Folder) GetName() string { method GetSize (line 25) | func (f *Folder) GetSize() int64 { method Add (line 34) | func (f *Folder) Add(item FileSystemItem) { method Remove (line 39) | func (f *Folder) Remove(item FileSystemItem) { method Print (line 49) | func (f *Folder) Print(indent string) { method Delete (line 57) | func (f *Folder) Delete() { function NewFolder (line 12) | func NewFolder(name string) *Folder { FILE: design-patterns/golang/composite/main.go function main (line 5) | func main() { FILE: design-patterns/golang/decorator/beverage.go type Beverage (line 4) | type Beverage interface FILE: design-patterns/golang/decorator/beverage_decorator.go type BeverageDecorator (line 4) | type BeverageDecorator struct method GetDescription (line 16) | func (d *BeverageDecorator) GetDescription() string { method Cost (line 21) | func (d *BeverageDecorator) Cost() float64 { function NewBeverageDecorator (line 9) | func NewBeverageDecorator(beverage Beverage) *BeverageDecorator { FILE: design-patterns/golang/decorator/milk_decorator.go type MilkDecorator (line 4) | type MilkDecorator struct method GetDescription (line 16) | func (d *MilkDecorator) GetDescription() string { method Cost (line 21) | func (d *MilkDecorator) Cost() float64 { function NewMilkDecorator (line 9) | func NewMilkDecorator(beverage Beverage) *MilkDecorator { FILE: design-patterns/golang/decorator/simple_coffee.go type SimpleCoffee (line 4) | type SimpleCoffee struct method GetDescription (line 12) | func (c *SimpleCoffee) GetDescription() string { method Cost (line 17) | func (c *SimpleCoffee) Cost() float64 { function NewSimpleCoffee (line 7) | func NewSimpleCoffee() *SimpleCoffee { FILE: design-patterns/golang/facade/build_system.go type BuildSystem (line 8) | type BuildSystem struct method CompileProject (line 16) | func (b *BuildSystem) CompileProject() bool { method GetArtifactPath (line 24) | func (b *BuildSystem) GetArtifactPath() string { function NewBuildSystem (line 11) | func NewBuildSystem() *BuildSystem { FILE: design-patterns/golang/facade/deployment_facade.go type DeploymentFacade (line 6) | type DeploymentFacade struct method DeployApplication (line 24) | func (f *DeploymentFacade) DeployApplication(branch, serverAddress str... method DeployHotfix (line 57) | func (f *DeploymentFacade) DeployHotfix(branch, serverAddress string) ... function NewDeploymentFacade (line 14) | func NewDeploymentFacade() *DeploymentFacade { FILE: design-patterns/golang/facade/deployment_target.go type DeploymentTarget (line 8) | type DeploymentTarget struct method TransferArtifact (line 16) | func (d *DeploymentTarget) TransferArtifact(artifactPath, serverAddres... method ActivateNewVersion (line 23) | func (d *DeploymentTarget) ActivateNewVersion(serverAddress string) { function NewDeploymentTarget (line 11) | func NewDeploymentTarget() *DeploymentTarget { FILE: design-patterns/golang/facade/main.go function main (line 5) | func main() { FILE: design-patterns/golang/factory/email_notification.go type EmailNotification (line 6) | type EmailNotification struct method Send (line 14) | func (e *EmailNotification) Send(message string) { function NewEmailNotification (line 9) | func NewEmailNotification() *EmailNotification { FILE: design-patterns/golang/factory/main.go function main (line 5) | func main() { FILE: design-patterns/golang/factory/notification.go type Notification (line 4) | type Notification interface FILE: design-patterns/golang/factory/simple_notification_factory.go type SimpleNotificationFactory (line 4) | type SimpleNotificationFactory struct method CreateNotification (line 12) | func (f *SimpleNotificationFactory) CreateNotification(notificationTyp... function NewSimpleNotificationFactory (line 7) | func NewSimpleNotificationFactory() *SimpleNotificationFactory { FILE: design-patterns/golang/factory/sms_notification.go type SMSNotification (line 6) | type SMSNotification struct method Send (line 14) | func (s *SMSNotification) Send(message string) { function NewSMSNotification (line 9) | func NewSMSNotification() *SMSNotification { FILE: design-patterns/golang/flyweight/character_flyweight.go type CharacterFlyweight (line 4) | type CharacterFlyweight interface FILE: design-patterns/golang/flyweight/character_flyweight_factory.go type CharacterFlyweightFactory (line 6) | type CharacterFlyweightFactory struct method GetFlyweight (line 18) | func (f *CharacterFlyweightFactory) GetFlyweight(symbol rune, fontFami... method GetFlyweightCount (line 27) | func (f *CharacterFlyweightFactory) GetFlyweightCount() int { function NewCharacterFlyweightFactory (line 11) | func NewCharacterFlyweightFactory() *CharacterFlyweightFactory { FILE: design-patterns/golang/flyweight/character_glyph.go type CharacterGlyph (line 6) | type CharacterGlyph struct method Draw (line 24) | func (g *CharacterGlyph) Draw(x, y int) { function NewCharacterGlyph (line 14) | func NewCharacterGlyph(symbol rune, fontFamily string, fontSize int, col... FILE: design-patterns/golang/flyweight/main.go function main (line 5) | func main() { FILE: design-patterns/golang/flyweight/text_editor_client.go type TextEditorClient (line 4) | type TextEditorClient struct method RenderText (line 16) | func (c *TextEditorClient) RenderText(text string, x, y int, fontFamil... method GetUniqueCharacterCount (line 24) | func (c *TextEditorClient) GetUniqueCharacterCount() int { function NewTextEditorClient (line 9) | func NewTextEditorClient() *TextEditorClient { FILE: design-patterns/golang/iterator/book.go type Book (line 4) | type Book struct function NewBook (line 10) | func NewBook(title, author string) *Book { FILE: design-patterns/golang/iterator/book_collection.go type BookCollection (line 4) | type BookCollection struct method AddBook (line 16) | func (bc *BookCollection) AddBook(book *Book) { method CreateIterator (line 21) | func (bc *BookCollection) CreateIterator() Iterator { function NewBookCollection (line 9) | func NewBookCollection() *BookCollection { type BookIterator (line 26) | type BookIterator struct method HasNext (line 40) | func (bi *BookIterator) HasNext() bool { method Next (line 45) | func (bi *BookIterator) Next() interface{} { function NewBookIterator (line 32) | func NewBookIterator(collection *BookCollection) *BookIterator { FILE: design-patterns/golang/iterator/collection.go type Collection (line 4) | type Collection interface FILE: design-patterns/golang/iterator/iterator.go type Iterator (line 4) | type Iterator interface FILE: design-patterns/golang/iterator/main.go function main (line 5) | func main() { FILE: design-patterns/golang/mediator/chat_mediator.go type ChatMediator (line 4) | type ChatMediator struct method AddUser (line 14) | func (m *ChatMediator) AddUser(user Colleague) { method SendMessage (line 20) | func (m *ChatMediator) SendMessage(message string, sender Colleague) { function NewChatMediator (line 9) | func NewChatMediator() *ChatMediator { FILE: design-patterns/golang/mediator/colleague.go type Colleague (line 4) | type Colleague interface FILE: design-patterns/golang/mediator/main.go function main (line 3) | func main() { FILE: design-patterns/golang/mediator/mediator.go type Mediator (line 4) | type Mediator interface FILE: design-patterns/golang/mediator/user.go type User (line 6) | type User struct method SetMediator (line 16) | func (u *User) SetMediator(mediator Mediator) { method GetName (line 20) | func (u *User) GetName() string { method ReceiveMessage (line 24) | func (u *User) ReceiveMessage(message string) { method SendMessage (line 29) | func (u *User) SendMessage(message string) { function NewUser (line 12) | func NewUser(name string) *User { FILE: design-patterns/golang/memento/main.go function main (line 5) | func main() { FILE: design-patterns/golang/memento/text_editor.go type TextEditor (line 6) | type TextEditor struct method Type (line 16) | func (e *TextEditor) Type(words string) { method GetContent (line 22) | func (e *TextEditor) GetContent() string { method Save (line 27) | func (e *TextEditor) Save() *TextEditorMemento { method Restore (line 33) | func (e *TextEditor) Restore(memento *TextEditorMemento) { function NewTextEditor (line 11) | func NewTextEditor() *TextEditor { FILE: design-patterns/golang/memento/text_editor_memento.go type TextEditorMemento (line 4) | type TextEditorMemento struct function NewTextEditorMemento (line 9) | func NewTextEditorMemento(state string) *TextEditorMemento { FILE: design-patterns/golang/memento/text_editor_undo_manager.go type TextEditorUndoManager (line 6) | type TextEditorUndoManager struct method Save (line 16) | func (m *TextEditorUndoManager) Save(editor *TextEditor) { method Undo (line 21) | func (m *TextEditorUndoManager) Undo(editor *TextEditor) { function NewTextEditorUndoManager (line 11) | func NewTextEditorUndoManager() *TextEditorUndoManager { FILE: design-patterns/golang/observer/fitness_data.go type FitnessData (line 4) | type FitnessData struct method RegisterObserver (line 18) | func (f *FitnessData) RegisterObserver(observer FitnessDataObserver) { method RemoveObserver (line 22) | func (f *FitnessData) RemoveObserver(observer FitnessDataObserver) { method NotifyObservers (line 31) | func (f *FitnessData) NotifyObservers() { method SetMeasurements (line 38) | func (f *FitnessData) SetMeasurements(steps int, calories int, distanc... function NewFitnessData (line 12) | func NewFitnessData() *FitnessData { FILE: design-patterns/golang/observer/fitness_data_observer.go type FitnessDataObserver (line 4) | type FitnessDataObserver interface FILE: design-patterns/golang/observer/fitness_data_subject.go type FitnessDataSubject (line 4) | type FitnessDataSubject interface FILE: design-patterns/golang/observer/goal_notifier.go type GoalNotifier (line 6) | type GoalNotifier struct method Update (line 14) | func (g *GoalNotifier) Update(steps int, calories int, distance float6... function NewGoalNotifier (line 10) | func NewGoalNotifier(goalSteps int) *GoalNotifier { FILE: design-patterns/golang/observer/live_activity_display.go type LiveActivityDisplay (line 6) | type LiveActivityDisplay struct method Update (line 12) | func (l *LiveActivityDisplay) Update(steps int, calories int, distance... function NewLiveActivityDisplay (line 8) | func NewLiveActivityDisplay() *LiveActivityDisplay { FILE: design-patterns/golang/observer/main.go function main (line 3) | func main() { FILE: design-patterns/golang/observer/progress_logger.go type ProgressLogger (line 6) | type ProgressLogger struct method Update (line 12) | func (p *ProgressLogger) Update(steps int, calories int, distance floa... function NewProgressLogger (line 8) | func NewProgressLogger() *ProgressLogger { FILE: design-patterns/golang/prototype/enemy.go type Enemy (line 6) | type Enemy struct method Clone (line 26) | func (e *Enemy) Clone() EnemyPrototype { method SetHealth (line 31) | func (e *Enemy) SetHealth(health int) { method PrintStats (line 36) | func (e *Enemy) PrintStats() { function NewEnemy (line 15) | func NewEnemy(type_ string, health int, speed float64, armored bool, wea... FILE: design-patterns/golang/prototype/enemy_prototype.go type EnemyPrototype (line 4) | type EnemyPrototype interface FILE: design-patterns/golang/prototype/enemy_registry.go type EnemyRegistry (line 4) | type EnemyRegistry struct method Register (line 16) | func (r *EnemyRegistry) Register(key string, prototype *Enemy) { method Get (line 21) | func (r *EnemyRegistry) Get(key string) *Enemy { function NewEnemyRegistry (line 9) | func NewEnemyRegistry() *EnemyRegistry { FILE: design-patterns/golang/prototype/main.go function main (line 3) | func main() { FILE: design-patterns/golang/proxy/high_resolution_image.go type HighResolutionImage (line 9) | type HighResolutionImage struct method loadImageFromDisk (line 21) | func (i *HighResolutionImage) loadImageFromDisk() { method Display (line 29) | func (i *HighResolutionImage) Display() { method GetFileName (line 34) | func (i *HighResolutionImage) GetFileName() string { function NewHighResolutionImage (line 15) | func NewHighResolutionImage(fileName string) *HighResolutionImage { FILE: design-patterns/golang/proxy/image.go type Image (line 4) | type Image interface FILE: design-patterns/golang/proxy/image_proxy.go type ImageProxy (line 6) | type ImageProxy struct method GetFileName (line 17) | func (p *ImageProxy) GetFileName() string { method Display (line 22) | func (p *ImageProxy) Display() { function NewImageProxy (line 12) | func NewImageProxy(fileName string) *ImageProxy { FILE: design-patterns/golang/proxy/main.go function main (line 5) | func main() { FILE: design-patterns/golang/singleton/double_checked_singleton.go type DoubleCheckedSingleton (line 6) | type DoubleCheckedSingleton struct function GetDoubleCheckedInstance (line 14) | func GetDoubleCheckedInstance() *DoubleCheckedSingleton { FILE: design-patterns/golang/singleton/eager_singleton.go type EagerSingleton (line 4) | type EagerSingleton struct function GetInstance (line 10) | func GetInstance() *EagerSingleton { FILE: design-patterns/golang/singleton/lazy_singleton.go type LazySingleton (line 6) | type LazySingleton struct function GetInstance (line 14) | func GetInstance() *LazySingleton { FILE: design-patterns/golang/singleton/thread_safe_singleton.go type ThreadSafeSingleton (line 6) | type ThreadSafeSingleton struct function GetThreadSafeInstance (line 14) | func GetThreadSafeInstance() *ThreadSafeSingleton { FILE: design-patterns/golang/state/has_money_state.go type HasMoneyState (line 6) | type HasMoneyState struct method SelectItem (line 8) | func (s *HasMoneyState) SelectItem(context *VendingMachine, item strin... method InsertCoin (line 12) | func (s *HasMoneyState) InsertCoin(context *VendingMachine, amount flo... method DispenseItem (line 16) | func (s *HasMoneyState) DispenseItem(context *VendingMachine) { FILE: design-patterns/golang/state/idle_state.go type IdleState (line 6) | type IdleState struct method SelectItem (line 8) | func (s *IdleState) SelectItem(context *VendingMachine, item string) { method InsertCoin (line 14) | func (s *IdleState) InsertCoin(context *VendingMachine, amount float64) { method DispenseItem (line 18) | func (s *IdleState) DispenseItem(context *VendingMachine) { FILE: design-patterns/golang/state/item_selected_state.go type ItemSelectedState (line 6) | type ItemSelectedState struct method SelectItem (line 8) | func (s *ItemSelectedState) SelectItem(context *VendingMachine, item s... method InsertCoin (line 12) | func (s *ItemSelectedState) InsertCoin(context *VendingMachine, amount... method DispenseItem (line 18) | func (s *ItemSelectedState) DispenseItem(context *VendingMachine) { FILE: design-patterns/golang/state/machine_state.go type MachineState (line 4) | type MachineState interface FILE: design-patterns/golang/state/main.go function main (line 3) | func main() { FILE: design-patterns/golang/state/vending_machine.go type VendingMachine (line 6) | type VendingMachine struct method SetState (line 18) | func (vm *VendingMachine) SetState(state MachineState) { method SetSelectedItem (line 22) | func (vm *VendingMachine) SetSelectedItem(item string) { method SetInsertedAmount (line 26) | func (vm *VendingMachine) SetInsertedAmount(amount float64) { method GetSelectedItem (line 30) | func (vm *VendingMachine) GetSelectedItem() string { method GetInsertedAmount (line 34) | func (vm *VendingMachine) GetInsertedAmount() float64 { method SelectItem (line 38) | func (vm *VendingMachine) SelectItem(item string) { method InsertCoin (line 42) | func (vm *VendingMachine) InsertCoin(amount float64) { method DispenseItem (line 46) | func (vm *VendingMachine) DispenseItem() { method Reset (line 50) | func (vm *VendingMachine) Reset() { function NewVendingMachine (line 12) | func NewVendingMachine() *VendingMachine { FILE: design-patterns/golang/strategy/credit_card_payment.go type CreditCardPayment (line 6) | type CreditCardPayment struct method Pay (line 24) | func (c *CreditCardPayment) Pay(amount float64) string { function NewCreditCardPayment (line 14) | func NewCreditCardPayment(cardNumber, name, cvv, dateOfExp string) *Cred... FILE: design-patterns/golang/strategy/main.go function main (line 3) | func main() { FILE: design-patterns/golang/strategy/payment_strategy.go type PaymentStrategy (line 4) | type PaymentStrategy interface FILE: design-patterns/golang/strategy/paypal_payment.go type PayPalPayment (line 6) | type PayPalPayment struct method Pay (line 16) | func (p *PayPalPayment) Pay(amount float64) string { function NewPayPalPayment (line 11) | func NewPayPalPayment(email string) *PayPalPayment { FILE: design-patterns/golang/strategy/shopping_cart.go type ShoppingCart (line 6) | type ShoppingCart struct method SetPaymentStrategy (line 15) | func (c *ShoppingCart) SetPaymentStrategy(strategy PaymentStrategy) { method Checkout (line 19) | func (c *ShoppingCart) Checkout() { function NewShoppingCart (line 11) | func NewShoppingCart(amount float64) *ShoppingCart { FILE: design-patterns/golang/templatemethod/csv_data_processor.go type CSVDataProcessor (line 5) | type CSVDataProcessor struct method ReadData (line 7) | func (c *CSVDataProcessor) ReadData() { method ProcessData (line 11) | func (c *CSVDataProcessor) ProcessData() { method SaveData (line 15) | func (c *CSVDataProcessor) SaveData() { FILE: design-patterns/golang/templatemethod/data_processor.go type DataProcessor (line 8) | type DataProcessor interface type BaseDataProcessor (line 14) | type BaseDataProcessor struct method Process (line 18) | func (b *BaseDataProcessor) Process() { FILE: design-patterns/golang/templatemethod/main.go function main (line 3) | func main() { FILE: design-patterns/golang/templatemethod/xml_data_processor.go type XMLDataProcessor (line 5) | type XMLDataProcessor struct method ReadData (line 7) | func (x *XMLDataProcessor) ReadData() { method ProcessData (line 11) | func (x *XMLDataProcessor) ProcessData() { method SaveData (line 15) | func (x *XMLDataProcessor) SaveData() { FILE: design-patterns/java/abstractfactory/AppLauncher.java class AppLauncher (line 1) | public class AppLauncher { method main (line 2) | public static void main(String[] args) { FILE: design-patterns/java/abstractfactory/Application.java class Application (line 1) | public class Application { method Application (line 5) | public Application(GUIFactory factory) { method renderUI (line 10) | public void renderUI() { FILE: design-patterns/java/abstractfactory/Button.java type Button (line 1) | public interface Button { method paint (line 2) | void paint(); method onClick (line 3) | void onClick(); FILE: design-patterns/java/abstractfactory/Checkbox.java type Checkbox (line 1) | public interface Checkbox { method paint (line 2) | void paint(); method onSelect (line 3) | void onSelect(); FILE: design-patterns/java/abstractfactory/GUIFactory.java type GUIFactory (line 1) | public interface GUIFactory { method createButton (line 2) | Button createButton(); method createCheckbox (line 3) | Checkbox createCheckbox(); FILE: design-patterns/java/abstractfactory/MacOSButton.java class MacOSButton (line 1) | public class MacOSButton implements Button { method paint (line 2) | @Override method onClick (line 7) | @Override FILE: design-patterns/java/abstractfactory/MacOSCheckbox.java class MacOSCheckbox (line 1) | public class MacOSCheckbox implements Checkbox { method paint (line 2) | @Override method onSelect (line 7) | @Override FILE: design-patterns/java/abstractfactory/MacOSFactory.java class MacOSFactory (line 1) | public class MacOSFactory implements GUIFactory { method createButton (line 2) | @Override method createCheckbox (line 7) | @Override FILE: design-patterns/java/abstractfactory/WindowsButton.java class WindowsButton (line 1) | public class WindowsButton implements Button { method paint (line 2) | @Override method onClick (line 7) | @Override FILE: design-patterns/java/abstractfactory/WindowsCheckbox.java class WindowsCheckbox (line 1) | public class WindowsCheckbox implements Checkbox { method paint (line 2) | @Override method onSelect (line 7) | @Override FILE: design-patterns/java/abstractfactory/WindowsFactory.java class WindowsFactory (line 1) | public class WindowsFactory implements GUIFactory { method createButton (line 2) | @Override method createCheckbox (line 7) | @Override FILE: design-patterns/java/abstractfactory/shoefactory/BumpySole.java class BumpySole (line 1) | public class BumpySole implements Sole { method soleBuild (line 3) | @Override method soleMaterial (line 8) | @Override FILE: design-patterns/java/abstractfactory/shoefactory/CasualShoeFactory.java class CasualShoeFactory (line 1) | public class CasualShoeFactory implements ShoeFactory { method createShoeSole (line 3) | @Override method createShoeLace (line 8) | @Override FILE: design-patterns/java/abstractfactory/shoefactory/FlatSole.java class FlatSole (line 1) | public class FlatSole implements Sole { method soleBuild (line 3) | @Override method soleMaterial (line 8) | @Override FILE: design-patterns/java/abstractfactory/shoefactory/FormalShoeFactory.java class FormalShoeFactory (line 1) | public class FormalShoeFactory implements ShoeFactory { method createShoeSole (line 3) | @Override method createShoeLace (line 8) | @Override FILE: design-patterns/java/abstractfactory/shoefactory/RoundShoeLace.java class RoundShoeLace (line 1) | public class RoundShoeLace implements ShoeLace { method shoeLaceBuild (line 3) | @Override method shoeLaceMaterial (line 8) | @Override FILE: design-patterns/java/abstractfactory/shoefactory/Shoe.java class Shoe (line 1) | public class Shoe { method Shoe (line 5) | public Shoe(Sole sole, ShoeLace shoeLace){ method displayBuildShoe (line 10) | public void displayBuildShoe() FILE: design-patterns/java/abstractfactory/shoefactory/ShoeFactory.java type ShoeFactory (line 1) | public interface ShoeFactory { method createShoeSole (line 2) | public Sole createShoeSole(); method createShoeLace (line 3) | public ShoeLace createShoeLace(); FILE: design-patterns/java/abstractfactory/shoefactory/ShoeLace.java type ShoeLace (line 1) | public interface ShoeLace { method shoeLaceBuild (line 3) | public String shoeLaceBuild(); method shoeLaceMaterial (line 4) | public String shoeLaceMaterial(); FILE: design-patterns/java/abstractfactory/shoefactory/ShoeManufacture.java class ShoeManufacture (line 1) | public class ShoeManufacture { method produceShoe (line 4) | public static Shoe produceShoe(String shoeType) method main (line 20) | public static void main(String[] args) { FILE: design-patterns/java/abstractfactory/shoefactory/Sole.java type Sole (line 1) | public interface Sole { method soleBuild (line 3) | public String soleBuild(); method soleMaterial (line 4) | public String soleMaterial(); FILE: design-patterns/java/abstractfactory/shoefactory/SportsShoeFactory.java class SportsShoeFactory (line 1) | public class SportsShoeFactory implements ShoeFactory { method createShoeSole (line 3) | @Override method createShoeLace (line 8) | @Override FILE: design-patterns/java/abstractfactory/shoefactory/TapeShoeLace.java class TapeShoeLace (line 1) | public class TapeShoeLace implements ShoeLace{ method shoeLaceBuild (line 3) | @Override method shoeLaceMaterial (line 8) | @Override FILE: design-patterns/java/abstractfactory/shoefactory/ThinSole.java class ThinSole (line 1) | public class ThinSole implements Sole { method soleBuild (line 3) | @Override method soleMaterial (line 8) | @Override FILE: design-patterns/java/adapter/CheckoutService.java class CheckoutService (line 1) | public class CheckoutService { method CheckoutService (line 4) | public CheckoutService(PaymentProcessor paymentProcessor) { method checkout (line 8) | public void checkout(double amount, String currency) { FILE: design-patterns/java/adapter/ECommerceAppV1.java class ECommerceAppV1 (line 1) | public class ECommerceAppV1 { method main (line 2) | public static void main(String[] args) { FILE: design-patterns/java/adapter/ECommerceAppV2.java class ECommerceAppV2 (line 1) | public class ECommerceAppV2 { method main (line 2) | public static void main(String[] args) { FILE: design-patterns/java/adapter/InHousePaymentProcessor.java class InHousePaymentProcessor (line 1) | public class InHousePaymentProcessor implements PaymentProcessor { method processPayment (line 5) | @Override method isPaymentSuccessful (line 14) | @Override method getTransactionId (line 19) | @Override FILE: design-patterns/java/adapter/LegacyGateway.java class LegacyGateway (line 1) | public class LegacyGateway { method executeTransaction (line 5) | public void executeTransaction(double totalAmount, String currency) { method checkStatus (line 12) | public boolean checkStatus(long transactionReference) { method getReferenceNumber (line 17) | public long getReferenceNumber() { FILE: design-patterns/java/adapter/LegacyGatewayAdapter.java class LegacyGatewayAdapter (line 1) | public class LegacyGatewayAdapter implements PaymentProcessor { method LegacyGatewayAdapter (line 4) | public LegacyGatewayAdapter(LegacyGateway legacyGateway) { method processPayment (line 8) | @Override method isPaymentSuccessful (line 15) | @Override method getTransactionId (line 20) | @Override FILE: design-patterns/java/adapter/PaymentProcessor.java type PaymentProcessor (line 1) | public interface PaymentProcessor { method processPayment (line 2) | void processPayment(double amount, String currency); method isPaymentSuccessful (line 3) | boolean isPaymentSuccessful(); method getTransactionId (line 4) | String getTransactionId(); FILE: design-patterns/java/bridge/BridgeDemo.java class BridgeDemo (line 1) | public class BridgeDemo { method main (line 2) | public static void main(String[] args) { FILE: design-patterns/java/bridge/Circle.java class Circle (line 1) | public class Circle extends Shape { method Circle (line 4) | public Circle(Renderer renderer, float radius) { method draw (line 9) | @Override FILE: design-patterns/java/bridge/RasterRenderer.java class RasterRenderer (line 1) | public class RasterRenderer implements Renderer { method renderCircle (line 2) | @Override method renderRectangle (line 7) | @Override FILE: design-patterns/java/bridge/Rectangle.java class Rectangle (line 1) | public class Rectangle extends Shape { method Rectangle (line 5) | public Rectangle(Renderer renderer, float width, float height) { method draw (line 11) | @Override FILE: design-patterns/java/bridge/Renderer.java type Renderer (line 1) | public interface Renderer { method renderCircle (line 2) | void renderCircle(float radius); method renderRectangle (line 3) | void renderRectangle(float width, float height); FILE: design-patterns/java/bridge/Shape.java class Shape (line 1) | public abstract class Shape { method Shape (line 4) | public Shape(Renderer renderer) { method draw (line 8) | public abstract void draw(); FILE: design-patterns/java/bridge/VectorRenderer.java class VectorRenderer (line 1) | public class VectorRenderer implements Renderer { method renderCircle (line 2) | @Override method renderRectangle (line 7) | @Override FILE: design-patterns/java/builder/HttpAppBuilder.java class HttpAppBuilder (line 1) | public class HttpAppBuilder { method main (line 2) | public static void main(String[] args) { FILE: design-patterns/java/builder/HttpAppTelescoping.java class HttpAppTelescoping (line 1) | public class HttpAppTelescoping { method main (line 2) | public static void main(String[] args) { FILE: design-patterns/java/builder/HttpRequest.java class HttpRequest (line 5) | public class HttpRequest { method HttpRequest (line 14) | private HttpRequest(Builder builder) { method getUrl (line 24) | public String getUrl() { return url; } method getMethod (line 25) | public String getMethod() { return method; } method getHeaders (line 26) | public Map getHeaders() { return headers; } method getQueryParams (line 27) | public Map getQueryParams() { return queryParams; } method getBody (line 28) | public String getBody() { return body; } method getTimeout (line 29) | public int getTimeout() { return timeout; } method toString (line 31) | @Override class Builder (line 44) | public static class Builder { method Builder (line 56) | public Builder(String url) { method method (line 64) | public Builder method(String method) { method header (line 69) | public Builder header(String key, String value) { method queryParam (line 76) | public Builder queryParam(String key, String value) { method body (line 83) | public Builder body(String body) { method timeout (line 88) | public Builder timeout(int timeoutMillis) { method build (line 96) | public HttpRequest build() { FILE: design-patterns/java/builder/HttpRequestTelescoping.java class HttpRequestTelescoping (line 5) | public class HttpRequestTelescoping { method HttpRequestTelescoping (line 13) | public HttpRequestTelescoping(String url) { method HttpRequestTelescoping (line 16) | public HttpRequestTelescoping(String url, String method) { method HttpRequestTelescoping (line 19) | public HttpRequestTelescoping(String url, String method, Map { method createIterator (line 2) | Iterator createIterator(); FILE: design-patterns/java/iterator/Iterator.java type Iterator (line 1) | public interface Iterator { method hasNext (line 2) | boolean hasNext(); method next (line 3) | T next(); FILE: design-patterns/java/iterator/MusicPlayer.java class MusicPlayer (line 1) | public class MusicPlayer { method main (line 2) | public static void main(String[] args) { FILE: design-patterns/java/iterator/Playlist.java class Playlist (line 4) | public class Playlist implements IterableCollection { method addSong (line 7) | public void addSong(String song) { method getSongAt (line 11) | public String getSongAt(int index) { method getSize (line 15) | public int getSize() { method createIterator (line 19) | @Override FILE: design-patterns/java/iterator/PlaylistIterator.java class PlaylistIterator (line 1) | public class PlaylistIterator implements Iterator { method PlaylistIterator (line 5) | public PlaylistIterator(Playlist playlist) { method hasNext (line 9) | @Override method next (line 14) | @Override FILE: design-patterns/java/iterator/books/Book.java class Book (line 1) | class Book { method Book (line 4) | public Book(String title) { method getTitle (line 8) | public String getTitle() { FILE: design-patterns/java/iterator/books/BookShelf.java class BookShelf (line 5) | class BookShelf implements Container { method BookShelf (line 8) | public BookShelf() { method addBook (line 12) | public void addBook(Book book) { method getIterator (line 16) | @Override class BookShelfIterator (line 22) | private class BookShelfIterator implements Iterator { method hasNext (line 25) | @Override method next (line 30) | @Override FILE: design-patterns/java/iterator/books/Container.java type Container (line 1) | interface Container { method getIterator (line 2) | Iterator getIterator(); FILE: design-patterns/java/iterator/books/Iterator.java type Iterator (line 1) | interface Iterator { method hasNext (line 2) | boolean hasNext(); method next (line 3) | T next(); FILE: design-patterns/java/iterator/books/IteratorDemo.java class IteratorDemo (line 1) | public class IteratorDemo { method main (line 2) | public static void main(String[] args) { FILE: design-patterns/java/mediator/Button.java class Button (line 1) | public class Button extends UIComponent { method Button (line 4) | public Button(UIMediator mediator) { method click (line 8) | public void click() { method setEnabled (line 17) | public void setEnabled(boolean value) { FILE: design-patterns/java/mediator/FormMediator.java class FormMediator (line 1) | public class FormMediator implements UIMediator { method setUsernameField (line 7) | public void setUsernameField(TextField usernameField) { method setPasswordField (line 11) | public void setPasswordField(TextField passwordField) { method setLoginButton (line 15) | public void setLoginButton(Button loginButton) { method setStatusLabel (line 19) | public void setStatusLabel(Label statusLabel) { method componentChanged (line 23) | @Override FILE: design-patterns/java/mediator/Label.java class Label (line 1) | public class Label extends UIComponent { method Label (line 4) | public Label(UIMediator mediator) { method setText (line 8) | public void setText(String message) { FILE: design-patterns/java/mediator/MediatorApp.java class MediatorApp (line 1) | public class MediatorApp { method main (line 2) | public static void main(String[] args) { FILE: design-patterns/java/mediator/TextField.java class TextField (line 1) | public class TextField extends UIComponent { method TextField (line 4) | public TextField(UIMediator mediator) { method setText (line 8) | public void setText(String newText) { method getText (line 14) | public String getText() { FILE: design-patterns/java/mediator/UIComponent.java class UIComponent (line 1) | public abstract class UIComponent { method UIComponent (line 4) | public UIComponent(UIMediator mediator) { method notifyMediator (line 8) | public void notifyMediator() { FILE: design-patterns/java/mediator/UIMediator.java type UIMediator (line 1) | public interface UIMediator { method componentChanged (line 2) | void componentChanged(UIComponent component); FILE: design-patterns/java/memento/TextEditor.java class TextEditor (line 1) | public class TextEditor { method type (line 4) | public void type(String newText) { method getContent (line 9) | public String getContent() { method save (line 13) | public TextEditorMemento save() { method restore (line 18) | public void restore(TextEditorMemento memento) { FILE: design-patterns/java/memento/TextEditorMemento.java class TextEditorMemento (line 1) | public class TextEditorMemento { method TextEditorMemento (line 4) | public TextEditorMemento(String state) { method getState (line 8) | public String getState() { FILE: design-patterns/java/memento/TextEditorNaive.java class TextEditorNaive (line 1) | public class TextEditorNaive { method type (line 4) | public void type(String newText) { method undo (line 8) | public void undo(String previousContent) { method getContent (line 12) | public String getContent() { FILE: design-patterns/java/memento/TextEditorUndoManager.java class TextEditorUndoManager (line 3) | public class TextEditorUndoManager { method save (line 6) | public void save(TextEditor editor) { method undo (line 10) | public void undo(TextEditor editor) { FILE: design-patterns/java/memento/TextEditorUndoV1.java class TextEditorUndoV1 (line 1) | public class TextEditorUndoV1 { method main (line 2) | public static void main(String[] args) { FILE: design-patterns/java/memento/TextEditorUndoV2.java class TextEditorUndoV2 (line 1) | public class TextEditorUndoV2 { method main (line 2) | public static void main(String[] args) { FILE: design-patterns/java/observer/FitnessAppNaiveClient.java class FitnessAppNaiveClient (line 1) | public class FitnessAppNaiveClient { method main (line 2) | public static void main(String[] args) { FILE: design-patterns/java/observer/FitnessAppObserverDemo.java class FitnessAppObserverDemo (line 1) | public class FitnessAppObserverDemo { method main (line 2) | public static void main(String[] args) { FILE: design-patterns/java/observer/FitnessData.java class FitnessData (line 3) | public class FitnessData implements FitnessDataSubject { method registerObserver (line 10) | @Override method removeObserver (line 15) | @Override method notifyObservers (line 20) | @Override method newFitnessDataPushed (line 27) | public void newFitnessDataPushed(int steps, int activeMinutes, int cal... method dailyReset (line 37) | public void dailyReset() { method getSteps (line 46) | public int getSteps() { return steps; } method getActiveMinutes (line 47) | public int getActiveMinutes() { return activeMinutes; } method getCalories (line 48) | public int getCalories() { return calories; } FILE: design-patterns/java/observer/FitnessDataNaive.java class FitnessDataNaive (line 1) | public class FitnessDataNaive { method FitnessDataNaive (line 11) | public FitnessDataNaive(LiveActivityDisplayNaive ld, ProgressLoggerNai... method newFitnessDataPushed (line 18) | public void newFitnessDataPushed(int newSteps, int newActiveMinutes, i... method dailyReset (line 32) | public void dailyReset() { FILE: design-patterns/java/observer/FitnessDataObserver.java type FitnessDataObserver (line 1) | public interface FitnessDataObserver { method update (line 2) | void update(FitnessData data); FILE: design-patterns/java/observer/FitnessDataSubject.java type FitnessDataSubject (line 1) | public interface FitnessDataSubject { method registerObserver (line 2) | void registerObserver(FitnessDataObserver o); method removeObserver (line 3) | void removeObserver(FitnessDataObserver o); method notifyObservers (line 4) | void notifyObservers(); FILE: design-patterns/java/observer/GoalNotifier.java class GoalNotifier (line 1) | public class GoalNotifier implements FitnessDataObserver { method update (line 5) | @Override method reset (line 13) | public void reset() { FILE: design-patterns/java/observer/LiveActivityDisplay.java class LiveActivityDisplay (line 1) | public class LiveActivityDisplay implements FitnessDataObserver { method update (line 2) | @Override FILE: design-patterns/java/observer/LiveActivityDisplayNaive.java class LiveActivityDisplayNaive (line 1) | public class LiveActivityDisplayNaive { method showStats (line 2) | public void showStats(int steps, int activeMinutes, int calories) { FILE: design-patterns/java/observer/NotificationServiceNaive.java class NotificationServiceNaive (line 1) | public class NotificationServiceNaive { method checkAndNotify (line 5) | public void checkAndNotify(int currentSteps) { method resetDailyNotifications (line 12) | public void resetDailyNotifications() { FILE: design-patterns/java/observer/ProgressLogger.java class ProgressLogger (line 1) | public class ProgressLogger implements FitnessDataObserver { method update (line 2) | @Override FILE: design-patterns/java/observer/ProgressLoggerNaive.java class ProgressLoggerNaive (line 1) | public class ProgressLoggerNaive { method logDataPoint (line 2) | public void logDataPoint(int steps, int activeMinutes, int calories) { FILE: design-patterns/java/prototype/Enemy.java class Enemy (line 1) | public class Enemy implements EnemyPrototype { method Enemy (line 8) | public Enemy(String type, int health, double speed, boolean armored, S... method clone (line 16) | @Override method setHealth (line 21) | public void setHealth(int health) { method printStats (line 25) | public void printStats() { FILE: design-patterns/java/prototype/EnemyPrototype.java type EnemyPrototype (line 1) | public interface EnemyPrototype { method clone (line 2) | EnemyPrototype clone(); FILE: design-patterns/java/prototype/EnemyRegistry.java class EnemyRegistry (line 4) | public class EnemyRegistry { method register (line 7) | public void register(String key, Enemy prototype) { method get (line 11) | public Enemy get(String key) { FILE: design-patterns/java/prototype/Game.java class Game (line 1) | public class Game { method main (line 2) | public static void main(String[] args) { FILE: design-patterns/java/proxy/HighResolutionImage.java class HighResolutionImage (line 1) | public class HighResolutionImage implements Image { method HighResolutionImage (line 5) | public HighResolutionImage(String fileName) { method loadImageFromDisk (line 10) | private void loadImageFromDisk() { method display (line 22) | @Override method getFileName (line 28) | @Override FILE: design-patterns/java/proxy/Image.java type Image (line 1) | public interface Image { method display (line 2) | void display(); method getFileName (line 3) | String getFileName(); FILE: design-patterns/java/proxy/ImageGalleryAppV1.java class ImageGalleryAppV1 (line 1) | public class ImageGalleryAppV1 { method main (line 2) | public static void main(String[] args) { FILE: design-patterns/java/proxy/ImageGalleryAppV2.java class ImageGalleryAppV2 (line 1) | public class ImageGalleryAppV2 { method main (line 2) | public static void main(String[] args) { FILE: design-patterns/java/proxy/ImageProxy.java class ImageProxy (line 1) | public class ImageProxy implements Image { method ImageProxy (line 5) | public ImageProxy(String fileName) { method getFileName (line 10) | @Override method display (line 16) | @Override FILE: design-patterns/java/singleton/BillPughSingleton.java class BillPughSingleton (line 1) | class BillPughSingleton { method BillPughSingleton (line 3) | private BillPughSingleton() {} class SingletonHelper (line 6) | private static class SingletonHelper { method getInstance (line 11) | public static BillPughSingleton getInstance() { FILE: design-patterns/java/singleton/DoubleCheckedLockingSingleton.java class DoubleCheckedSingleton (line 1) | class DoubleCheckedSingleton { method DoubleCheckedSingleton (line 6) | private DoubleCheckedSingleton() {} method getInstance (line 9) | public static DoubleCheckedSingleton getInstance() { FILE: design-patterns/java/singleton/EagerSingleton.java class EagerSingleton (line 1) | class EagerSingleton { method EagerSingleton (line 6) | private EagerSingleton() {} method getInstance (line 9) | public static EagerSingleton getInstance() { FILE: design-patterns/java/singleton/EnumSingleton.java type EnumSingleton (line 1) | public enum EnumSingleton { method doSomething (line 4) | public void doSomething() { FILE: design-patterns/java/singleton/LazySingleton.java class LazySingleton (line 1) | class LazySingleton { method LazySingleton (line 6) | private LazySingleton() {} method getInstance (line 9) | public static LazySingleton getInstance() { FILE: design-patterns/java/singleton/StaticBlockSingleton.java class StaticBlockSingleton (line 1) | class StaticBlockSingleton { method StaticBlockSingleton (line 6) | private StaticBlockSingleton() {} method getInstance (line 18) | public static StaticBlockSingleton getInstance() { FILE: design-patterns/java/singleton/ThreadSafeSingleton.java class ThreadSafeSingleton (line 1) | class ThreadSafeSingleton { method ThreadSafeSingleton (line 6) | private ThreadSafeSingleton() {} method getInstance (line 9) | public static synchronized ThreadSafeSingleton getInstance() { FILE: design-patterns/java/state/DispensingState.java class DispensingState (line 1) | public class DispensingState implements MachineState { method selectItem (line 2) | @Override method insertCoin (line 7) | @Override method dispenseItem (line 12) | @Override FILE: design-patterns/java/state/HasMoneyState.java class HasMoneyState (line 1) | public class HasMoneyState implements MachineState { method selectItem (line 2) | @Override method insertCoin (line 7) | @Override method dispenseItem (line 12) | @Override FILE: design-patterns/java/state/IdleState.java class IdleState (line 1) | public class IdleState implements MachineState { method selectItem (line 2) | @Override method insertCoin (line 9) | @Override method dispenseItem (line 14) | @Override FILE: design-patterns/java/state/ItemSelectedState.java class ItemSelectedState (line 1) | public class ItemSelectedState implements MachineState { method selectItem (line 2) | @Override method insertCoin (line 7) | @Override method dispenseItem (line 14) | @Override FILE: design-patterns/java/state/MachineState.java type MachineState (line 1) | public interface MachineState { method selectItem (line 2) | void selectItem(VendingMachine context, String itemCode); method insertCoin (line 3) | void insertCoin(VendingMachine context, double amount); method dispenseItem (line 4) | void dispenseItem(VendingMachine context); FILE: design-patterns/java/state/VendingMachine.java class VendingMachine (line 1) | public class VendingMachine { method VendingMachine (line 6) | public VendingMachine() { method setState (line 10) | public void setState(MachineState newState) { method setSelectedItem (line 14) | public void setSelectedItem(String itemCode) { method setInsertedAmount (line 18) | public void setInsertedAmount(double amount) { method getSelectedItem (line 22) | public String getSelectedItem() { method getInsertedAmount (line 26) | public double getInsertedAmount() { method selectItem (line 30) | public void selectItem(String itemCode) { method insertCoin (line 34) | public void insertCoin(double amount) { method dispenseItem (line 38) | public void dispenseItem() { method reset (line 42) | public void reset() { FILE: design-patterns/java/state/VendingMachineApp.java class VendingMachineApp (line 1) | public class VendingMachineApp { method main (line 2) | public static void main(String[] args) { FILE: design-patterns/java/state/VendingMachineNaive.java class VendingMachineNaive (line 1) | public class VendingMachineNaive { type State (line 2) | private enum State { method selectItem (line 13) | public void selectItem(String itemCode) { method insertCoin (line 32) | public void insertCoin(double amount) { method dispenseItem (line 51) | public void dispenseItem() { method cancelTransaction (line 79) | public void cancelTransaction() { method resetMachine (line 98) | private void resetMachine() { FILE: design-patterns/java/strategy/DistanceBasedShipping.java class DistanceBasedShipping (line 1) | public class DistanceBasedShipping implements ShippingStrategy { method DistanceBasedShipping (line 4) | public DistanceBasedShipping(double ratePerKm) { method calculateCost (line 8) | @Override FILE: design-patterns/java/strategy/ECommerceAppV1.java class ECommerceAppV1 (line 1) | public class ECommerceAppV1 { method main (line 2) | public static void main(String[] args) { FILE: design-patterns/java/strategy/ECommerceAppV2.java class ECommerceAppV2 (line 1) | public class ECommerceAppV2 { method main (line 2) | public static void main(String[] args) { FILE: design-patterns/java/strategy/FlatRateShipping.java class FlatRateShipping (line 1) | public class FlatRateShipping implements ShippingStrategy { method FlatRateShipping (line 4) | public FlatRateShipping(double rate) { method calculateCost (line 8) | @Override FILE: design-patterns/java/strategy/Order.java class Order (line 1) | public class Order { method getTotalWeight (line 2) | public double getTotalWeight() { return 5.0; /* kg */ } method getDestinationZone (line 3) | public String getDestinationZone() { return "ZoneA"; } method getOrderValue (line 4) | public double getOrderValue() { return 150.0; } FILE: design-patterns/java/strategy/ShippingCostCalculatorNaive.java class ShippingCostCalculatorNaive (line 1) | public class ShippingCostCalculatorNaive { method calculateShippingCost (line 2) | public double calculateShippingCost(Order order, String strategyType) { FILE: design-patterns/java/strategy/ShippingCostService.java class ShippingCostService (line 1) | public class ShippingCostService { method ShippingCostService (line 5) | public ShippingCostService(ShippingStrategy strategy) { method setStrategy (line 10) | public void setStrategy(ShippingStrategy strategy) { method calculateShippingCost (line 15) | public double calculateShippingCost(Order order) { FILE: design-patterns/java/strategy/ShippingStrategy.java type ShippingStrategy (line 1) | public interface ShippingStrategy { method calculateCost (line 2) | double calculateCost(Order order); FILE: design-patterns/java/strategy/ThirdPartyApiShipping.java class ThirdPartyApiShipping (line 1) | public class ThirdPartyApiShipping implements ShippingStrategy { method ThirdPartyApiShipping (line 5) | public ThirdPartyApiShipping(double baseFee, double percentageFee) { method calculateCost (line 10) | @Override FILE: design-patterns/java/strategy/WeightBasedShipping.java class WeightBasedShipping (line 1) | public class WeightBasedShipping implements ShippingStrategy { method WeightBasedShipping (line 4) | public WeightBasedShipping(double ratePerKg) { method calculateCost (line 8) | @Override FILE: design-patterns/java/templatemethod/AbstractReportExporter.java class AbstractReportExporter (line 1) | public abstract class AbstractReportExporter { method exportReport (line 2) | public final void exportReport(ReportData data, String filePath) { method prepareData (line 13) | protected void prepareData(ReportData data) { method openFile (line 18) | protected void openFile(String filePath) { method writeHeader (line 22) | protected abstract void writeHeader(ReportData data); method writeDataRows (line 24) | protected abstract void writeDataRows(ReportData data); method writeFooter (line 27) | protected void writeFooter(ReportData data) { method closeFile (line 32) | protected void closeFile(String filePath) { FILE: design-patterns/java/templatemethod/CsvReportExporter.java class CsvReportExporter (line 3) | public class CsvReportExporter extends AbstractReportExporter { method writeHeader (line 7) | @Override method writeDataRows (line 12) | @Override FILE: design-patterns/java/templatemethod/CsvReportExporterNaive.java class CsvReportExporterNaive (line 1) | class CsvReportExporterNaive { method export (line 2) | public void export(ReportData data, String filePath) { FILE: design-patterns/java/templatemethod/ExcelReportExporter.java class ExcelReportExporter (line 3) | public class ExcelReportExporter extends AbstractReportExporter { method writeHeader (line 7) | @Override method writeDataRows (line 12) | @Override FILE: design-patterns/java/templatemethod/ExcelReportExporterNaive.java class ExcelReportExporterNaive (line 1) | public class ExcelReportExporterNaive { method export (line 2) | public void export(ReportData data, String filePath) { FILE: design-patterns/java/templatemethod/PdfReportExporter.java class PdfReportExporter (line 3) | public class PdfReportExporter extends AbstractReportExporter { method writeHeader (line 7) | @Override method writeDataRows (line 12) | @Override FILE: design-patterns/java/templatemethod/PdfReportExporterNaive.java class PdfReportExporterNaive (line 1) | class PdfReportExporterNaive { method export (line 2) | public void export(ReportData data, String filePath) { FILE: design-patterns/java/templatemethod/ReportAppNaive.java class ReportAppNaive (line 1) | public class ReportAppNaive { method main (line 2) | public static void main(String[] args) { FILE: design-patterns/java/templatemethod/ReportAppTemplateMethod.java class ReportAppTemplateMethod (line 1) | public class ReportAppTemplateMethod { method main (line 2) | public static void main(String[] args) { FILE: design-patterns/java/templatemethod/ReportData.java class ReportData (line 5) | public class ReportData { method getHeaders (line 6) | public List getHeaders() { method getRows (line 9) | public List> getRows() { FILE: design-patterns/java/visitor/AreaCalculatorVisitor.java class AreaCalculatorVisitor (line 1) | public class AreaCalculatorVisitor implements ShapeVisitor { method visitCircle (line 2) | @Override method visitRectangle (line 8) | @Override FILE: design-patterns/java/visitor/Circle.java class Circle (line 1) | public class Circle implements Shape { method Circle (line 4) | public Circle(double radius) { method getRadius (line 8) | public double getRadius() { method accept (line 12) | @Override FILE: design-patterns/java/visitor/Rectangle.java class Rectangle (line 1) | public class Rectangle implements Shape { method Rectangle (line 5) | public Rectangle(double width, double height) { method getWidth (line 10) | public double getWidth() { method getHeight (line 14) | public double getHeight() { method accept (line 18) | @Override FILE: design-patterns/java/visitor/Shape.java type Shape (line 1) | public interface Shape { method accept (line 2) | void accept(ShapeVisitor visitor); FILE: design-patterns/java/visitor/ShapeVisitor.java type ShapeVisitor (line 1) | public interface ShapeVisitor { method visitCircle (line 2) | void visitCircle(Circle circle); method visitRectangle (line 3) | void visitRectangle(Rectangle rectangle); FILE: design-patterns/java/visitor/SvgExporterVisitor.java class SvgExporterVisitor (line 1) | public class SvgExporterVisitor implements ShapeVisitor { method visitCircle (line 2) | @Override method visitRectangle (line 7) | @Override FILE: design-patterns/java/visitor/VisitorPatternDemo.java class VisitorPatternDemo (line 1) | public class VisitorPatternDemo { method main (line 2) | public static void main(String[] args) { FILE: oop/rust/abstraction/main.rs type CoffeeMaker (line 11) | pub trait CoffeeMaker { method brew (line 12) | fn brew(&mut self); method add_water (line 13) | fn add_water(&mut self, amount: u32); method add_water (line 62) | fn add_water(&mut self, amount: u32) { method brew (line 69) | fn brew(&mut self) { type PremiumCoffeeMachine (line 19) | pub struct PremiumCoffeeMachine { method new (line 28) | pub fn new(water: u32, beans: u32) -> Self { method grind_beans (line 37) | fn grind_beans(&mut self) -> bool { method heat_water (line 48) | fn heat_water(&mut self) -> bool { function main (line 81) | fn main() { FILE: oop/rust/aggregation/main.rs type Book (line 9) | struct Book { method new (line 15) | fn new(title: &str, author: &str) -> Self { method read (line 22) | fn read(&self) { type Library (line 29) | struct Library<'a> { function new (line 36) | fn new(name: &str) -> Self { function add_book (line 44) | fn add_book(&mut self, book: &'a Book) { function list_books (line 48) | fn list_books(&self) { type Reader (line 59) | struct Reader { function main (line 65) | fn main() { FILE: oop/rust/association/main.rs type Student (line 18) | struct Student { type Teacher (line 22) | struct Teacher { method new (line 29) | fn new(name: &str) -> Self { method add_student (line 36) | fn add_student(&mut self, student: Rc) { method show_students (line 40) | fn show_students(&self) { type Library (line 55) | struct Library { method new (line 68) | fn new(name: &str) -> Rc { method add_book (line 75) | fn add_book(library: &Rc, title: &str) { method show_books (line 86) | fn show_books(&self) { type Book (line 60) | struct Book { method show_library (line 95) | fn show_library(&self) { function main (line 104) | fn main() { FILE: oop/rust/classes_and_objects/main.rs type Car (line 12) | pub struct Car { method new (line 26) | pub fn new(color: String, make: String, model: String, year: u32) -> S... method display_info (line 38) | pub fn display_info(&self) { function main (line 50) | fn main() { FILE: oop/rust/composition/main.rs type Engine (line 10) | struct Engine { method new (line 15) | fn new(horsepower: u32) -> Self { method start (line 19) | fn start(&self) { type Wheel (line 24) | struct Wheel { method new (line 29) | fn new(wheel_type: &str) -> Self { method rotate (line 35) | fn rotate(&self) { type Transmission (line 40) | struct Transmission { method new (line 45) | fn new(trans_type: &str) -> Self { method shift (line 51) | fn shift(&self) { type Car (line 58) | struct Car { method new (line 67) | fn new(hp: u32, wheel_type: &str, trans_type: &str) -> Self { method drive (line 75) | fn drive(&self) { type PowerSource (line 87) | trait PowerSource { method power_up (line 88) | fn power_up(&self); method power_up (line 93) | fn power_up(&self) { method power_up (line 100) | fn power_up(&self) { type ElectricMotor (line 91) | struct ElectricMotor; type DieselMotor (line 98) | struct DieselMotor; type HybridVehicle (line 105) | struct HybridVehicle { method new (line 111) | fn new(source: Box) -> Self { method start (line 115) | fn start(&self) { function main (line 120) | fn main() { FILE: oop/rust/encapsulation/main.rs type BankAccount (line 10) | pub struct BankAccount { method new (line 16) | pub fn new(owner: &str, balance: f64) -> Self { method balance (line 24) | pub fn balance(&self) -> f64 { method deposit (line 29) | pub fn deposit(&mut self, amount: f64) { type Employee (line 42) | pub struct Employee { method new (line 48) | pub fn new(name: &str, age: u8) -> Self { method name (line 56) | pub fn name(&self) -> &str { method set_age (line 61) | pub fn set_age(&mut self, age: u8) { method age (line 69) | pub fn age(&self) -> u8 { type Processor (line 77) | pub struct Processor { method new (line 83) | pub fn new(card_number: &str, amount: f64) -> Self { method mask_card (line 92) | fn mask_card(real_no: &str) -> String { method process (line 101) | pub fn process(&self) { function main (line 107) | fn main() { FILE: oop/rust/inheritance/main.rs type Animal (line 12) | trait Animal { method name (line 13) | fn name(&self) -> &String; method eat (line 16) | fn eat(&self) { method name (line 29) | fn name(&self) -> &String { type Dog (line 22) | struct Dog { method bark (line 35) | fn bark(&self) { type Living (line 43) | trait Living { method live (line 44) | fn live(&self) { println!("I am alive."); } type Mammal (line 48) | trait Mammal: Living { method walk (line 49) | fn walk(&self) { println!("I can walk."); } type Cat (line 52) | struct Cat; type SoundMaker (line 63) | trait SoundMaker { method make_sound (line 64) | fn make_sound(&self) { method make_sound (line 73) | fn make_sound(&self) { type Cow (line 69) | struct Cow; type BaseEntity (line 82) | struct BaseEntity { method save (line 87) | fn save(&self) { type User (line 93) | struct User { method new (line 99) | fn new(id: u32, username: &str) -> Self { method save_user (line 106) | fn save_user(&self) { function main (line 113) | fn main() { FILE: oop/rust/interfaces/main.rs type Vehicle (line 9) | pub trait Vehicle { method start (line 10) | fn start(&self); method stop (line 11) | fn stop(&self); method start (line 21) | fn start(&self) { method stop (line 24) | fn stop(&self) { type Car (line 15) | pub struct Car { type Flyable (line 30) | trait Flyable { method fly (line 31) | fn fly(&self); method fly (line 41) | fn fly(&self) { type Drivable (line 34) | trait Drivable { method drive (line 35) | fn drive(&self); method drive (line 47) | fn drive(&self) { type FlyingCar (line 38) | struct FlyingCar; type Animal (line 53) | trait Animal { method sound (line 54) | fn sound(&self); method sleep (line 57) | fn sleep(&self) { method sound (line 65) | fn sound(&self) { type Dog (line 62) | struct Dog; type MathOperations (line 70) | trait MathOperations { method add (line 72) | fn add(a: i32, b: i32) -> i32 { type Calculator (line 77) | struct Calculator; type Payment (line 81) | trait Payment { method pay (line 82) | fn pay(&self, amount: f64); method pay (line 87) | fn pay(&self, amount: f64) { method pay (line 94) | fn pay(&self, amount: f64) { type CreditCard (line 85) | struct CreditCard; type PayPal (line 92) | struct PayPal; function main (line 99) | fn main() { FILE: oop/rust/polymorphism/main.rs type Addable (line 10) | trait Addable { method add (line 11) | fn add(&self, other: i32) -> i32; method add (line 20) | fn add(&self, other: i32) -> i32 { type Number (line 15) | struct Number { function static_add (line 28) | fn static_add(item: T, extra: i32) -> i32 { type Animal (line 35) | trait Animal { method make_sound (line 36) | fn make_sound(&self); method make_sound (line 41) | fn make_sound(&self) { method make_sound (line 48) | fn make_sound(&self) { type Dog (line 39) | struct Dog; type Cat (line 46) | struct Cat; type Vehicle (line 56) | trait Vehicle { method start (line 57) | fn start(&self); method start (line 62) | fn start(&self) { method start (line 69) | fn start(&self) { type Car (line 60) | struct Car; type Bike (line 67) | struct Bike; type Payment (line 77) | trait Payment { method pay (line 78) | fn pay(&self, amount: f64); method pay (line 83) | fn pay(&self, amount: f64) { method pay (line 90) | fn pay(&self, amount: f64) { type CreditCardPayment (line 81) | struct CreditCardPayment; type PayPalPayment (line 88) | struct PayPalPayment; function process (line 96) | fn process(payment_method: &dyn Payment, amount: f64) { function main (line 101) | fn main() { FILE: solutions/cpp/airlinemanagementsystem/AirlineManagementSystem.cpp function Flight (line 70) | Flight* AirlineManagementSystem::findFlight(std::string flightNumber) co... function Passenger (line 77) | Passenger* AirlineManagementSystem::findPassenger(std::string passportNu... function Booking (line 84) | Booking* AirlineManagementSystem::findBooking(std::string bookingId) con... FILE: solutions/cpp/airlinemanagementsystem/AirlineManagementSystem.hpp class AirlineManagementSystem (line 10) | class AirlineManagementSystem { FILE: solutions/cpp/airlinemanagementsystem/AirlineManagementSystemDemo.cpp function main (line 4) | int main() { FILE: solutions/cpp/airlinemanagementsystem/Booking.cpp function Flight (line 8) | Flight* Booking::getFlight() const { return flight; } function Passenger (line 9) | Passenger* Booking::getPassenger() const { return passenger; } FILE: solutions/cpp/airlinemanagementsystem/Booking.hpp class Booking (line 8) | class Booking { FILE: solutions/cpp/airlinemanagementsystem/Flight.hpp class Flight (line 8) | class Flight { FILE: solutions/cpp/airlinemanagementsystem/Passenger.hpp class Passenger (line 6) | class Passenger { FILE: solutions/cpp/airlinemanagementsystem/Seat.hpp class Seat (line 4) | class Seat { FILE: solutions/cpp/atm/ATM.hpp class ATM (line 8) | class ATM { FILE: solutions/cpp/atm/ATMDemo.cpp function main (line 4) | int main() { FILE: solutions/cpp/atm/Account.hpp class Account (line 6) | class Account { FILE: solutions/cpp/carrentalsystem/Car.hpp class Car (line 6) | class Car { FILE: solutions/cpp/carrentalsystem/CarRentalSystem.cpp function Car (line 73) | Car* CarRentalSystem::findCar(std::string carId) const { function Customer (line 80) | Customer* CarRentalSystem::findCustomer(std::string customerId) const { function Rental (line 87) | Rental* CarRentalSystem::findRental(std::string rentalId) const { FILE: solutions/cpp/carrentalsystem/CarRentalSystem.hpp class CarRentalSystem (line 10) | class CarRentalSystem { FILE: solutions/cpp/carrentalsystem/CarRentalSystemDemo.cpp function main (line 4) | int main() { FILE: solutions/cpp/carrentalsystem/Customer.hpp class Customer (line 6) | class Customer { FILE: solutions/cpp/carrentalsystem/Rental.cpp function Car (line 13) | Car* Rental::getCar() const { return car; } function Customer (line 14) | Customer* Rental::getCustomer() const { return customer; } FILE: solutions/cpp/carrentalsystem/Rental.hpp class Rental (line 8) | class Rental { FILE: solutions/cpp/chessgame/Board.hpp class Board (line 7) | class Board { FILE: solutions/cpp/chessgame/ChessDemo.cpp function main (line 4) | int main() { FILE: solutions/cpp/chessgame/Game.cpp function Color (line 40) | Color Game::getCurrentTurn() const { FILE: solutions/cpp/chessgame/Game.hpp class Game (line 6) | class Game { FILE: solutions/cpp/chessgame/Piece.cpp function PieceType (line 7) | PieceType Piece::getType() const { return type; } function Color (line 8) | Color Piece::getColor() const { return color; } function Position (line 9) | Position Piece::getPosition() const { return position; } FILE: solutions/cpp/chessgame/Piece.hpp type PieceType (line 7) | enum class PieceType { type Color (line 11) | enum class Color { class Piece (line 15) | class Piece { method Piece (line 23) | Piece(PieceType type, Color color, Position position) method PieceType (line 28) | PieceType getType() const { return type; } method Color (line 29) | Color getColor() const { return color; } method Position (line 30) | Position getPosition() const { return position; } method isCaptured (line 31) | bool isCaptured() const { return captured; } method setPosition (line 33) | void setPosition(Position newPosition) { position = newPosition; } method setCaptured (line 34) | void setCaptured(bool status) { captured = status; } method getSymbol (line 38) | std::string getSymbol() const { FILE: solutions/cpp/chessgame/Position.hpp class Position (line 4) | class Position { FILE: solutions/cpp/chessgame/pieces/Bishop.hpp class Bishop (line 6) | class Bishop : public Piece { FILE: solutions/cpp/chessgame/pieces/King.hpp class King (line 6) | class King : public Piece { FILE: solutions/cpp/chessgame/pieces/Knight.hpp class Knight (line 6) | class Knight : public Piece { FILE: solutions/cpp/chessgame/pieces/Pawn.hpp class Pawn (line 6) | class Pawn : public Piece { FILE: solutions/cpp/chessgame/pieces/Queen.hpp class Queen (line 6) | class Queen : public Piece { FILE: solutions/cpp/chessgame/pieces/Rook.hpp class Rook (line 6) | class Rook : public Piece { FILE: solutions/cpp/coffeevendingmachine/Coffee.cpp function CoffeeType (line 6) | CoffeeType Coffee::getType() const { return type; } FILE: solutions/cpp/coffeevendingmachine/Coffee.hpp class Coffee (line 7) | class Coffee { FILE: solutions/cpp/coffeevendingmachine/CoffeeType.hpp type CoffeeType (line 4) | enum class CoffeeType { FILE: solutions/cpp/coffeevendingmachine/CoffeeVendingMachine.cpp function Coffee (line 77) | Coffee* CoffeeVendingMachine::findCoffee(CoffeeType type) { FILE: solutions/cpp/coffeevendingmachine/CoffeeVendingMachine.hpp class CoffeeVendingMachine (line 8) | class CoffeeVendingMachine { FILE: solutions/cpp/coffeevendingmachine/CoffeeVendingMachineDemo.cpp function main (line 4) | int main() { FILE: solutions/cpp/coffeevendingmachine/Inventory.hpp class Inventory (line 7) | class Inventory { FILE: solutions/cpp/concertticketbookingsystem/Booking.cpp function Concert (line 12) | Concert* Booking::getConcert() const { return concert; } FILE: solutions/cpp/concertticketbookingsystem/Booking.hpp class Booking (line 7) | class Booking { FILE: solutions/cpp/concertticketbookingsystem/BookingSystem.cpp function Concert (line 71) | Concert* BookingSystem::findConcert(std::string concertId) const { function Booking (line 78) | Booking* BookingSystem::findBooking(std::string bookingId) const { FILE: solutions/cpp/concertticketbookingsystem/BookingSystem.hpp class BookingSystem (line 9) | class BookingSystem { FILE: solutions/cpp/concertticketbookingsystem/Concert.hpp class Concert (line 8) | class Concert { FILE: solutions/cpp/concertticketbookingsystem/ConcertBookingDemo.cpp function main (line 4) | int main() { FILE: solutions/cpp/concertticketbookingsystem/Seat.hpp class Seat (line 4) | class Seat { FILE: solutions/cpp/courseregistrationsystem/Course.hpp class Course (line 8) | class Course { FILE: solutions/cpp/courseregistrationsystem/RegistrationSystem.cpp function Course (line 61) | Course* RegistrationSystem::findCourse(std::string courseId) const { function Student (line 68) | Student* RegistrationSystem::findStudent(std::string studentId) const { FILE: solutions/cpp/courseregistrationsystem/RegistrationSystem.hpp class RegistrationSystem (line 9) | class RegistrationSystem { FILE: solutions/cpp/courseregistrationsystem/RegistrationSystemDemo.cpp function main (line 4) | int main() { FILE: solutions/cpp/courseregistrationsystem/Student.hpp class Course (line 7) | class Course class Student (line 9) | class Student { FILE: solutions/cpp/cricinfo/CricInfoDemo.cpp function main (line 4) | int main() { FILE: solutions/cpp/cricinfo/CricInfoSystem.cpp function Team (line 19) | Team* CricInfoSystem::findTeam(const std::string& teamId) const { function Match (line 26) | Match* CricInfoSystem::findMatch(const std::string& matchId) const { FILE: solutions/cpp/cricinfo/CricInfoSystem.hpp class CricInfoSystem (line 8) | class CricInfoSystem { FILE: solutions/cpp/cricinfo/Match.cpp function Team (line 10) | Team* Match::getTeam1() const { return team1; } function Team (line 11) | Team* Match::getTeam2() const { return team2; } function Team (line 15) | Team* Match::getWinner() const { return winner; } FILE: solutions/cpp/cricinfo/Match.hpp class Match (line 10) | class Match { FILE: solutions/cpp/cricinfo/Player.cpp function PlayerType (line 11) | PlayerType Player::getType() const { return type; } function PlayerStats (line 12) | PlayerStats& Player::getStats() { return stats; } FILE: solutions/cpp/cricinfo/Player.hpp type PlayerType (line 7) | enum class PlayerType { class Player (line 13) | class Player { FILE: solutions/cpp/cricinfo/PlayerStats.hpp type PlayerStats (line 4) | struct PlayerStats { method PlayerStats (line 11) | PlayerStats() FILE: solutions/cpp/cricinfo/Team.cpp function Player (line 27) | Player* Team::findPlayer(const std::string& playerId) const { FILE: solutions/cpp/cricinfo/Team.hpp class Team (line 8) | class Team { FILE: solutions/cpp/digitalwalletservice/Transaction.cpp function TransactionType (line 13) | TransactionType Transaction::getType() const { return type; } FILE: solutions/cpp/digitalwalletservice/Transaction.hpp type TransactionType (line 6) | enum class TransactionType { class Transaction (line 12) | class Transaction { FILE: solutions/cpp/digitalwalletservice/User.hpp class User (line 6) | class User { FILE: solutions/cpp/digitalwalletservice/Wallet.hpp class Wallet (line 8) | class Wallet { FILE: solutions/cpp/digitalwalletservice/WalletDemo.cpp function main (line 4) | int main() { FILE: solutions/cpp/digitalwalletservice/WalletSystem.cpp function Wallet (line 18) | Wallet* WalletSystem::createWallet(std::string userId) { function User (line 139) | User* WalletSystem::findUser(const std::string& userId) const { function Wallet (line 146) | Wallet* WalletSystem::findWallet(const std::string& walletId) const { FILE: solutions/cpp/digitalwalletservice/WalletSystem.hpp class WalletSystem (line 10) | class WalletSystem { FILE: solutions/cpp/elevatorsystem/Elevator.cpp function Direction (line 12) | Direction Elevator::getDirection() const { return direction; } function Status (line 13) | Status Elevator::getStatus() const { return status; } FILE: solutions/cpp/elevatorsystem/Elevator.hpp type Direction (line 9) | enum class Direction { type Status (line 15) | enum class Status { class Elevator (line 21) | class Elevator { FILE: solutions/cpp/elevatorsystem/ElevatorDemo.cpp function main (line 6) | int main() { FILE: solutions/cpp/elevatorsystem/ElevatorSystem.cpp function Elevator (line 46) | Elevator* ElevatorSystem::findElevator(int elevatorId) const { FILE: solutions/cpp/elevatorsystem/ElevatorSystem.hpp class ElevatorSystem (line 7) | class ElevatorSystem { FILE: solutions/cpp/elevatorsystem/Request.hpp class Request (line 4) | class Request { FILE: solutions/cpp/fooddeliveryservice/DeliveryDemo.cpp function main (line 4) | int main() { FILE: solutions/cpp/fooddeliveryservice/DeliveryService.cpp function Order (line 20) | Order* DeliveryService::createOrder(std::string userId, std::string rest... function User (line 82) | User* DeliveryService::findUser(const std::string& userId) const { function Restaurant (line 89) | Restaurant* DeliveryService::findRestaurant(const std::string& restauran... function Order (line 96) | Order* DeliveryService::findOrder(const std::string& orderId) const { FILE: solutions/cpp/fooddeliveryservice/DeliveryService.hpp class DeliveryService (line 10) | class DeliveryService { FILE: solutions/cpp/fooddeliveryservice/MenuItem.hpp class MenuItem (line 6) | class MenuItem { FILE: solutions/cpp/fooddeliveryservice/Order.cpp function User (line 14) | User* Order::getUser() const { return user; } function Restaurant (line 15) | Restaurant* Order::getRestaurant() const { return restaurant; } function OrderStatus (line 16) | OrderStatus Order::getStatus() const { return status; } FILE: solutions/cpp/fooddeliveryservice/Order.hpp type OrderStatus (line 11) | enum class OrderStatus { class Order (line 19) | class Order { FILE: solutions/cpp/fooddeliveryservice/Restaurant.cpp function MenuItem (line 33) | MenuItem* Restaurant::findMenuItem(const std::string& itemId) const { FILE: solutions/cpp/fooddeliveryservice/Restaurant.hpp class Restaurant (line 8) | class Restaurant { FILE: solutions/cpp/fooddeliveryservice/User.hpp class User (line 6) | class User { FILE: solutions/cpp/hotelmanagementsystem/Booking.cpp function Guest (line 14) | Guest* Booking::getGuest() const { return guest; } function Room (line 15) | Room* Booking::getRoom() const { return room; } function BookingStatus (line 20) | BookingStatus Booking::getStatus() const { return status; } FILE: solutions/cpp/hotelmanagementsystem/Booking.hpp type BookingStatus (line 8) | enum class BookingStatus { class Booking (line 15) | class Booking { FILE: solutions/cpp/hotelmanagementsystem/Guest.hpp class Guest (line 6) | class Guest { FILE: solutions/cpp/hotelmanagementsystem/HotelDemo.cpp function main (line 4) | int main() { FILE: solutions/cpp/hotelmanagementsystem/HotelManager.cpp function Booking (line 20) | Booking* HotelManager::createBooking(std::string guestId, std::string ro... function Room (line 105) | Room* HotelManager::findRoom(const std::string& roomNumber) const { function Guest (line 112) | Guest* HotelManager::findGuest(const std::string& guestId) const { function Booking (line 119) | Booking* HotelManager::findBooking(const std::string& bookingId) const { FILE: solutions/cpp/hotelmanagementsystem/HotelManager.hpp class HotelManager (line 10) | class HotelManager { FILE: solutions/cpp/hotelmanagementsystem/Room.cpp function RoomType (line 10) | RoomType Room::getType() const { return type; } function RoomStatus (line 11) | RoomStatus Room::getStatus() const { return status; } FILE: solutions/cpp/hotelmanagementsystem/Room.hpp type RoomType (line 6) | enum class RoomType { type RoomStatus (line 12) | enum class RoomStatus { class Room (line 18) | class Room { FILE: solutions/cpp/librarymanagementsystem/Book.cpp function BookStatus (line 14) | BookStatus Book::getStatus() const { return status; } FILE: solutions/cpp/librarymanagementsystem/Book.hpp type BookStatus (line 6) | enum class BookStatus { class Book (line 13) | class Book { FILE: solutions/cpp/librarymanagementsystem/LibraryDemo.cpp function main (line 4) | int main() { FILE: solutions/cpp/librarymanagementsystem/LibraryManager.cpp function Book (line 156) | Book* LibraryManager::findBook(const std::string& bookId) const { function Member (line 163) | Member* LibraryManager::findMember(const std::string& memberId) const { function Transaction (line 170) | Transaction* LibraryManager::findTransaction(const std::string& bookId, FILE: solutions/cpp/librarymanagementsystem/LibraryManager.hpp class LibraryManager (line 10) | class LibraryManager { FILE: solutions/cpp/librarymanagementsystem/Member.hpp class Member (line 8) | class Member { FILE: solutions/cpp/librarymanagementsystem/Transaction.cpp function Book (line 11) | Book* Transaction::getBook() const { return book; } function Member (line 12) | Member* Transaction::getMember() const { return member; } function TransactionType (line 13) | TransactionType Transaction::getType() const { return type; } FILE: solutions/cpp/librarymanagementsystem/Transaction.hpp type TransactionType (line 8) | enum class TransactionType { class Transaction (line 15) | class Transaction { FILE: solutions/cpp/linkedin/LinkedInDemo.cpp function main (line 4) | int main() { FILE: solutions/cpp/linkedin/LinkedInManager.cpp function Post (line 15) | Post* LinkedInManager::createPost(std::string userId, std::string content, function User (line 116) | User* LinkedInManager::findUser(const std::string& userId) const { function Post (line 123) | Post* LinkedInManager::findPost(const std::string& postId) const { FILE: solutions/cpp/linkedin/LinkedInManager.hpp class LinkedInManager (line 9) | class LinkedInManager { FILE: solutions/cpp/linkedin/Post.cpp function User (line 11) | User* Post::getAuthor() const { return author; } function PostType (line 13) | PostType Post::getType() const { return type; } FILE: solutions/cpp/linkedin/Post.hpp type PostType (line 8) | enum class PostType { class Post (line 15) | class Post { FILE: solutions/cpp/linkedin/Profile.hpp type Experience (line 7) | struct Experience { type Education (line 15) | struct Education { class Profile (line 23) | class Profile { FILE: solutions/cpp/linkedin/User.cpp function Profile (line 17) | Profile* User::getProfile() const { return profile; } FILE: solutions/cpp/linkedin/User.hpp class User (line 9) | class User { FILE: solutions/cpp/loggingframework/ConsoleAppender.hpp class ConsoleAppender (line 6) | class ConsoleAppender : public LogAppender { FILE: solutions/cpp/loggingframework/FileAppender.hpp class FileAppender (line 8) | class FileAppender : public LogAppender { FILE: solutions/cpp/loggingframework/LogAppender.hpp class LogAppender (line 6) | class LogAppender { FILE: solutions/cpp/loggingframework/LogLevel.hpp type LogLevel (line 4) | enum class LogLevel { function logLevelToString (line 14) | inline std::string logLevelToString(LogLevel level) { FILE: solutions/cpp/loggingframework/LogMessage.cpp function LogLevel (line 16) | LogLevel LogMessage::getLevel() const { return level; } FILE: solutions/cpp/loggingframework/LogMessage.hpp class LogMessage (line 8) | class LogMessage { FILE: solutions/cpp/loggingframework/Logger.hpp class Logger (line 11) | class Logger { FILE: solutions/cpp/loggingframework/LoggingDemo.cpp function main (line 6) | int main() { FILE: solutions/cpp/lrucache/DoublyLinkedList.hpp type Node (line 5) | struct Node { method Node (line 11) | Node(K key, V value) : key(key), value(value), prev(nullptr), next(nul... class DoublyLinkedList (line 15) | class DoublyLinkedList { method DoublyLinkedList (line 22) | DoublyLinkedList() : head(nullptr), tail(nullptr), size(0) {} method moveToFront (line 46) | void moveToFront(Node* node) { method removeNode (line 63) | void removeNode(Node* node) { method getSize (line 98) | int getSize() const { return size; } method isEmpty (line 99) | bool isEmpty() const { return size == 0; } FILE: solutions/cpp/lrucache/LRUCache.hpp class LRUCache (line 8) | class LRUCache { method LRUCache (line 15) | LRUCache(int capacity) : capacity(capacity) {} method V (line 17) | V get(K key) { method put (line 28) | void put(K key, V value) { method contains (line 50) | bool contains(K key) const { method getSize (line 54) | int getSize() const { method isEmpty (line 58) | bool isEmpty() const { method clear (line 62) | void clear() { method display (line 70) | void display() const { FILE: solutions/cpp/lrucache/LRUCacheDemo.cpp function main (line 5) | int main() { FILE: solutions/cpp/movieticketbookingsystem/Booking.cpp function Show (line 22) | Show* Booking::getShow() const { return show; } function BookingStatus (line 27) | BookingStatus Booking::getStatus() const { return status; } FILE: solutions/cpp/movieticketbookingsystem/Booking.hpp type BookingStatus (line 8) | enum class BookingStatus { class Booking (line 14) | class Booking { FILE: solutions/cpp/movieticketbookingsystem/BookingDemo.cpp function main (line 4) | int main() { FILE: solutions/cpp/movieticketbookingsystem/BookingSystem.cpp function Booking (line 21) | Booking* BookingSystem::createBooking(std::string showId, std::string cu... function Show (line 103) | Show* BookingSystem::findShow(const std::string& showId) const { function Booking (line 114) | Booking* BookingSystem::findBooking(const std::string& bookingId) const { FILE: solutions/cpp/movieticketbookingsystem/BookingSystem.hpp class BookingSystem (line 11) | class BookingSystem { FILE: solutions/cpp/movieticketbookingsystem/Movie.cpp function MovieGenre (line 13) | MovieGenre Movie::getGenre() const { return genre; } FILE: solutions/cpp/movieticketbookingsystem/Movie.hpp type MovieGenre (line 7) | enum class MovieGenre { class Movie (line 16) | class Movie { FILE: solutions/cpp/movieticketbookingsystem/Show.cpp function Movie (line 12) | Movie* Show::getMovie() const { return movie; } function ShowStatus (line 16) | ShowStatus Show::getStatus() const { return status; } FILE: solutions/cpp/movieticketbookingsystem/Show.hpp type ShowStatus (line 8) | enum class ShowStatus { class Show (line 15) | class Show { FILE: solutions/cpp/movieticketbookingsystem/Theater.hpp class Theater (line 8) | class Theater { FILE: solutions/cpp/musicstreamingservice/Artist.hpp class Artist (line 8) | class Artist { FILE: solutions/cpp/musicstreamingservice/MusicStreamingDemo.cpp function main (line 4) | int main() { FILE: solutions/cpp/musicstreamingservice/MusicStreamingService.cpp function Playlist (line 29) | Playlist* MusicStreamingService::createPlaylist(std::string userId, std:... function User (line 138) | User* MusicStreamingService::findUser(const std::string& userId) const { function Artist (line 144) | Artist* MusicStreamingService::findArtist(const std::string& artistId) c... function Song (line 150) | Song* MusicStreamingService::findSong(const std::string& songId) const { function Playlist (line 156) | Playlist* MusicStreamingService::findPlaylist(const std::string& playlis... FILE: solutions/cpp/musicstreamingservice/MusicStreamingService.hpp class MusicStreamingService (line 11) | class MusicStreamingService { FILE: solutions/cpp/musicstreamingservice/Playlist.hpp class Playlist (line 8) | class Playlist { FILE: solutions/cpp/musicstreamingservice/Song.cpp function Genre (line 16) | Genre Song::getGenre() const { return genre; } FILE: solutions/cpp/musicstreamingservice/Song.hpp type Genre (line 7) | enum class Genre { class Song (line 16) | class Song { FILE: solutions/cpp/musicstreamingservice/User.cpp function UserType (line 19) | UserType User::getType() const { return type; } FILE: solutions/cpp/musicstreamingservice/User.hpp type UserType (line 8) | enum class UserType { class User (line 13) | class User { FILE: solutions/cpp/onlineauctionsystem/Auction.cpp function Item (line 11) | Item* Auction::getItem() const { return item; } function AuctionStatus (line 15) | AuctionStatus Auction::getStatus() const { return status; } FILE: solutions/cpp/onlineauctionsystem/Auction.hpp type Bid (line 10) | struct Bid { method Bid (line 15) | Bid(std::string bidderId, double amount) type AuctionStatus (line 19) | enum class AuctionStatus { class Auction (line 26) | class Auction { FILE: solutions/cpp/onlineauctionsystem/AuctionSystem.cpp function User (line 13) | User* AuctionSystem::registerUser(std::string username, std::string emai... function Item (line 20) | Item* AuctionSystem::createItem(std::string sellerId, std::string name, ... function Auction (line 32) | Auction* AuctionSystem::createAuction(std::string itemId, std::time_t st... function User (line 135) | User* AuctionSystem::findUser(const std::string& userId) const { function Item (line 141) | Item* AuctionSystem::findItem(const std::string& itemId) const { function Auction (line 147) | Auction* AuctionSystem::findAuction(const std::string& auctionId) const { FILE: solutions/cpp/onlineauctionsystem/AuctionSystem.hpp class AuctionSystem (line 10) | class AuctionSystem { FILE: solutions/cpp/onlineauctionsystem/AuctionSystemDemo.cpp function main (line 5) | int main() { FILE: solutions/cpp/onlineauctionsystem/Item.cpp function ItemCategory (line 13) | ItemCategory Item::getCategory() const { return category; } function ItemStatus (line 15) | ItemStatus Item::getStatus() const { return status; } FILE: solutions/cpp/onlineauctionsystem/Item.hpp type ItemCategory (line 6) | enum class ItemCategory { type ItemStatus (line 16) | enum class ItemStatus { class Item (line 23) | class Item { FILE: solutions/cpp/onlineauctionsystem/User.hpp class User (line 8) | class User { FILE: solutions/cpp/onlineshoppingservice/Cart.cpp function User (line 12) | User* Cart::getUser() const { return user; } FILE: solutions/cpp/onlineshoppingservice/Cart.hpp class Cart (line 8) | class Cart { FILE: solutions/cpp/onlineshoppingservice/CartItem.cpp function Product (line 8) | Product* CartItem::getProduct() const { return product; } FILE: solutions/cpp/onlineshoppingservice/CartItem.hpp class CartItem (line 6) | class CartItem { FILE: solutions/cpp/onlineshoppingservice/Order.cpp function User (line 25) | User* Order::getUser() const { return user; } function OrderStatus (line 29) | OrderStatus Order::getStatus() const { return status; } FILE: solutions/cpp/onlineshoppingservice/Order.hpp type OrderStatus (line 9) | enum class OrderStatus { class Order (line 17) | class Order { FILE: solutions/cpp/onlineshoppingservice/Product.hpp class Product (line 6) | class Product { FILE: solutions/cpp/onlineshoppingservice/ShoppingDemo.cpp function main (line 4) | int main() { FILE: solutions/cpp/onlineshoppingservice/ShoppingSystem.cpp function User (line 14) | User* ShoppingSystem::registerUser(const std::string& username, const st... function Product (line 39) | Product* ShoppingSystem::addProduct(const std::string& name, const std::... function Order (line 99) | Order* ShoppingSystem::placeOrder(const std::string& userId) { function User (line 170) | User* ShoppingSystem::findUser(const std::string& userId) const { function Product (line 176) | Product* ShoppingSystem::findProduct(const std::string& productId) const { function Order (line 182) | Order* ShoppingSystem::findOrder(const std::string& orderId) const { function Cart (line 188) | Cart* ShoppingSystem::getCart(const std::string& userId) { FILE: solutions/cpp/onlineshoppingservice/ShoppingSystem.hpp class ShoppingSystem (line 12) | class ShoppingSystem { FILE: solutions/cpp/onlineshoppingservice/User.hpp class User (line 8) | class User { FILE: solutions/cpp/onlinestockbrokeragesystem/BrokerageDemo.cpp function main (line 4) | int main() { FILE: solutions/cpp/onlinestockbrokeragesystem/BrokerageSystem.cpp function User (line 13) | User* BrokerageSystem::registerUser(const std::string& username, const s... function Stock (line 30) | Stock* BrokerageSystem::addStock(const std::string& symbol, const std::s... function Transaction (line 58) | Transaction* BrokerageSystem::buyStock(const std::string& userId, const ... function Transaction (line 84) | Transaction* BrokerageSystem::sellStock(const std::string& userId, const... function User (line 143) | User* BrokerageSystem::findUser(const std::string& userId) const { function Stock (line 149) | Stock* BrokerageSystem::findStock(const std::string& symbol) const { FILE: solutions/cpp/onlinestockbrokeragesystem/BrokerageSystem.hpp class BrokerageSystem (line 11) | class BrokerageSystem { FILE: solutions/cpp/onlinestockbrokeragesystem/Portfolio.hpp class Portfolio (line 8) | class Portfolio { FILE: solutions/cpp/onlinestockbrokeragesystem/Stock.hpp class Stock (line 6) | class Stock { FILE: solutions/cpp/onlinestockbrokeragesystem/Transaction.cpp function User (line 14) | User* Transaction::getUser() const { return user; } function Stock (line 15) | Stock* Transaction::getStock() const { return stock; } function TransactionType (line 16) | TransactionType Transaction::getType() const { return type; } FILE: solutions/cpp/onlinestockbrokeragesystem/Transaction.hpp type TransactionType (line 9) | enum class TransactionType { class Transaction (line 14) | class Transaction { FILE: solutions/cpp/onlinestockbrokeragesystem/User.cpp function Portfolio (line 18) | Portfolio* User::getPortfolio() const { return portfolio; } FILE: solutions/cpp/onlinestockbrokeragesystem/User.hpp class User (line 8) | class User { FILE: solutions/cpp/parkinglot/ParkingLot.cpp function Vehicle (line 53) | Vehicle* ParkingLot::removeVehicle(const std::string& licensePlate) { function ParkingSpot (line 66) | ParkingSpot* ParkingLot::findVehicle(const std::string& licensePlate) co... function ParkingSpot (line 85) | ParkingSpot* ParkingLot::findAvailableSpot(const Vehicle* vehicle) const { FILE: solutions/cpp/parkinglot/ParkingLot.hpp class ParkingLot (line 9) | class ParkingLot { FILE: solutions/cpp/parkinglot/ParkingLotDemo.cpp function main (line 4) | int main() { FILE: solutions/cpp/parkinglot/ParkingSpot.cpp function SpotType (line 8) | SpotType ParkingSpot::getType() const { return type; } function Vehicle (line 9) | Vehicle* ParkingSpot::getVehicle() const { return vehicle; } function Vehicle (line 37) | Vehicle* ParkingSpot::removeVehicle() { FILE: solutions/cpp/parkinglot/ParkingSpot.hpp type SpotType (line 6) | enum class SpotType { class ParkingSpot (line 12) | class ParkingSpot { FILE: solutions/cpp/parkinglot/Vehicle.cpp function VehicleType (line 8) | VehicleType Vehicle::getType() const { return type; } FILE: solutions/cpp/parkinglot/Vehicle.hpp type VehicleType (line 6) | enum class VehicleType { class Vehicle (line 13) | class Vehicle { FILE: solutions/cpp/pubsubsystem/Message.hpp class Message (line 7) | class Message { FILE: solutions/cpp/pubsubsystem/PubSubDemo.cpp function main (line 6) | int main() { FILE: solutions/cpp/pubsubsystem/PubSubSystem.cpp function Topic (line 12) | Topic* PubSubSystem::createTopic(const std::string& name, const std::str... function Subscriber (line 30) | Subscriber* PubSubSystem::addSubscriber(const std::string& name) { function Topic (line 102) | Topic* PubSubSystem::findTopic(const std::string& topicName) const { function Subscriber (line 108) | Subscriber* PubSubSystem::findSubscriber(const std::string& subscriberId... FILE: solutions/cpp/pubsubsystem/PubSubSystem.hpp class PubSubSystem (line 9) | class PubSubSystem { FILE: solutions/cpp/pubsubsystem/Subscriber.hpp class Subscriber (line 8) | class Subscriber { FILE: solutions/cpp/pubsubsystem/Topic.hpp class Topic (line 8) | class Topic { FILE: solutions/cpp/restaurantmanagementsystem/MenuItem.cpp function Category (line 14) | Category MenuItem::getCategory() const { return category; } FILE: solutions/cpp/restaurantmanagementsystem/MenuItem.hpp type Category (line 6) | enum class Category { class MenuItem (line 13) | class MenuItem { FILE: solutions/cpp/restaurantmanagementsystem/Order.cpp function Table (line 18) | Table* Order::getTable() const { return table; } function OrderStatus (line 22) | OrderStatus Order::getStatus() const { return status; } FILE: solutions/cpp/restaurantmanagementsystem/Order.hpp type OrderStatus (line 10) | enum class OrderStatus { class Order (line 18) | class Order { FILE: solutions/cpp/restaurantmanagementsystem/OrderItem.cpp function MenuItem (line 10) | MenuItem* OrderItem::getMenuItem() const { return menuItem; } FILE: solutions/cpp/restaurantmanagementsystem/OrderItem.hpp class OrderItem (line 6) | class OrderItem { FILE: solutions/cpp/restaurantmanagementsystem/RestaurantDemo.cpp function main (line 6) | int main() { FILE: solutions/cpp/restaurantmanagementsystem/RestaurantSystem.cpp function MenuItem (line 13) | MenuItem* RestaurantSystem::addMenuItem(const std::string& name, const s... function Table (line 37) | Table* RestaurantSystem::addTable(int capacity) { function Order (line 50) | Order* RestaurantSystem::createOrder(int tableNumber) { function MenuItem (line 119) | MenuItem* RestaurantSystem::findMenuItem(const std::string& itemId) const { function Table (line 125) | Table* RestaurantSystem::findTable(int tableNumber) const { function Order (line 131) | Order* RestaurantSystem::findOrder(const std::string& orderId) const { FILE: solutions/cpp/restaurantmanagementsystem/RestaurantSystem.hpp class RestaurantSystem (line 10) | class RestaurantSystem { FILE: solutions/cpp/restaurantmanagementsystem/Table.cpp function TableStatus (line 9) | TableStatus Table::getStatus() const { return status; } FILE: solutions/cpp/restaurantmanagementsystem/Table.hpp type TableStatus (line 4) | enum class TableStatus { class Table (line 10) | class Table { FILE: solutions/cpp/ridesharingservice/Location.hpp class Location (line 6) | class Location { FILE: solutions/cpp/ridesharingservice/Ride.cpp function User (line 19) | User* Ride::getRider() const { return rider; } function User (line 20) | User* Ride::getDriver() const { return driver; } function Location (line 21) | Location* Ride::getPickup() const { return pickup; } function Location (line 22) | Location* Ride::getDropoff() const { return dropoff; } function RideStatus (line 27) | RideStatus Ride::getStatus() const { return status; } FILE: solutions/cpp/ridesharingservice/Ride.hpp type RideStatus (line 9) | enum class RideStatus { class Ride (line 17) | class Ride { FILE: solutions/cpp/ridesharingservice/RideDemo.cpp function main (line 6) | int main() { FILE: solutions/cpp/ridesharingservice/RideService.cpp function User (line 12) | User* RideService::registerUser(const std::string& name, const std::stri... function Ride (line 30) | Ride* RideService::requestRide(const std::string& riderId, Location* pic... function User (line 98) | User* RideService::findUser(const std::string& userId) const { function Ride (line 104) | Ride* RideService::findRide(const std::string& rideId) const { function User (line 110) | User* RideService::findNearestDriver(const Location& pickup) const { FILE: solutions/cpp/ridesharingservice/RideService.hpp class RideService (line 9) | class RideService { FILE: solutions/cpp/ridesharingservice/User.cpp function UserType (line 17) | UserType User::getType() const { return type; } function Location (line 18) | Location* User::getCurrentLocation() const { return currentLocation; } FILE: solutions/cpp/ridesharingservice/User.hpp type UserType (line 7) | enum class UserType { class User (line 12) | class User { FILE: solutions/cpp/snakeandladdergame/Board.hpp class Board (line 6) | class Board { FILE: solutions/cpp/snakeandladdergame/Dice.hpp class Dice (line 4) | class Dice { FILE: solutions/cpp/snakeandladdergame/Game.cpp function Player (line 104) | Player* Game::getCurrentPlayer() const { FILE: solutions/cpp/snakeandladdergame/Game.hpp class Game (line 9) | class Game { FILE: solutions/cpp/snakeandladdergame/GameDemo.cpp function main (line 4) | int main() { FILE: solutions/cpp/snakeandladdergame/Player.hpp class Player (line 6) | class Player { FILE: solutions/cpp/socialnetworkingservice/Post.hpp class Post (line 8) | class Post { FILE: solutions/cpp/socialnetworkingservice/SocialNetwork.cpp function User (line 12) | User* SocialNetwork::registerUser(const std::string& username, const std... function Post (line 63) | Post* SocialNetwork::createPost(const std::string& userId, const std::st... function User (line 148) | User* SocialNetwork::findUser(const std::string& userId) const { function Post (line 154) | Post* SocialNetwork::findPost(const std::string& postId) const { FILE: solutions/cpp/socialnetworkingservice/SocialNetwork.hpp class SocialNetwork (line 9) | class SocialNetwork { FILE: solutions/cpp/socialnetworkingservice/SocialNetworkDemo.cpp function main (line 6) | int main() { FILE: solutions/cpp/socialnetworkingservice/User.hpp class User (line 8) | class User { FILE: solutions/cpp/splitwise/Expense.cpp function ExpenseType (line 22) | ExpenseType Expense::getType() const { return type; } FILE: solutions/cpp/splitwise/Expense.hpp type ExpenseType (line 9) | enum class ExpenseType { class Expense (line 15) | class Expense { FILE: solutions/cpp/splitwise/SplitwiseDemo.cpp function main (line 4) | int main() { FILE: solutions/cpp/splitwise/SplitwiseSystem.cpp function User (line 13) | User* SplitwiseSystem::registerUser(const std::string& name, const std::... function Expense (line 30) | Expense* SplitwiseSystem::addExpense(const std::string& description, dou... function User (line 130) | User* SplitwiseSystem::findUser(const std::string& userId) const { function Expense (line 136) | Expense* SplitwiseSystem::findExpense(const std::string& expenseId) const { FILE: solutions/cpp/splitwise/SplitwiseSystem.hpp class SplitwiseSystem (line 9) | class SplitwiseSystem { FILE: solutions/cpp/splitwise/User.hpp class User (line 7) | class User { FILE: solutions/cpp/stackoverflow/Comment.hpp class Comment (line 7) | class Comment { FILE: solutions/cpp/stackoverflow/Post.cpp function PostType (line 25) | PostType Post::getType() const { return type; } FILE: solutions/cpp/stackoverflow/Post.hpp type PostType (line 9) | enum class PostType { class Post (line 14) | class Post { FILE: solutions/cpp/stackoverflow/StackOverflow.cpp function User (line 12) | User* StackOverflow::registerUser(const std::string& username, const std... function Post (line 29) | Post* StackOverflow::addQuestion(const std::string& userId, const std::s... function Post (line 39) | Post* StackOverflow::addAnswer(const std::string& userId, const std::str... function Comment (line 52) | Comment* StackOverflow::addComment(const std::string& userId, const std:... function User (line 149) | User* StackOverflow::findUser(const std::string& userId) const { function Post (line 155) | Post* StackOverflow::findPost(const std::string& postId) const { FILE: solutions/cpp/stackoverflow/StackOverflow.hpp class StackOverflow (line 10) | class StackOverflow { FILE: solutions/cpp/stackoverflow/StackOverflowDemo.cpp function main (line 4) | int main() { FILE: solutions/cpp/stackoverflow/User.hpp class User (line 7) | class User { FILE: solutions/cpp/taskmanagementsystem/Task.cpp function TaskStatus (line 17) | TaskStatus Task::getStatus() const { return status; } function TaskPriority (line 18) | TaskPriority Task::getPriority() const { return priority; } FILE: solutions/cpp/taskmanagementsystem/Task.hpp type TaskStatus (line 8) | enum class TaskStatus { type TaskPriority (line 15) | enum class TaskPriority { class Task (line 22) | class Task { FILE: solutions/cpp/taskmanagementsystem/TaskManager.cpp function User (line 12) | User* TaskManager::registerUser(const std::string& username, const std::... function Task (line 35) | Task* TaskManager::createTask(const std::string& title, const std::strin... function User (line 156) | User* TaskManager::findUser(const std::string& userId) const { function Task (line 162) | Task* TaskManager::findTask(const std::string& taskId) const { FILE: solutions/cpp/taskmanagementsystem/TaskManager.hpp class TaskManager (line 9) | class TaskManager { FILE: solutions/cpp/taskmanagementsystem/TaskManagerDemo.cpp function main (line 4) | int main() { FILE: solutions/cpp/taskmanagementsystem/User.hpp class User (line 7) | class User { FILE: solutions/cpp/tictactoe/Board.hpp class Board (line 7) | class Board { FILE: solutions/cpp/tictactoe/Game.cpp function Player (line 92) | Player* Game::getCurrentPlayer() const { FILE: solutions/cpp/tictactoe/Game.hpp class Game (line 7) | class Game { FILE: solutions/cpp/tictactoe/Player.hpp class Player (line 6) | class Player { FILE: solutions/cpp/tictactoe/TicTacToeDemo.cpp function main (line 4) | int main() { FILE: solutions/cpp/trafficsignalsystem/Intersection.cpp function Signal (line 61) | Signal* Intersection::findSignal(const std::string& signalId) const { FILE: solutions/cpp/trafficsignalsystem/Intersection.hpp class Intersection (line 8) | class Intersection { FILE: solutions/cpp/trafficsignalsystem/Signal.cpp function SignalColor (line 12) | SignalColor Signal::getCurrentColor() const { return currentColor; } FILE: solutions/cpp/trafficsignalsystem/Signal.hpp type SignalColor (line 6) | enum class SignalColor { class Signal (line 12) | class Signal { FILE: solutions/cpp/trafficsignalsystem/TrafficSystem.cpp function Intersection (line 13) | Intersection* TrafficSystem::createIntersection() { function Signal (line 32) | Signal* TrafficSystem::addSignal(const std::string& intersectionId, function Intersection (line 75) | Intersection* TrafficSystem::findIntersection(const std::string& interse... FILE: solutions/cpp/trafficsignalsystem/TrafficSystem.hpp class TrafficSystem (line 8) | class TrafficSystem { FILE: solutions/cpp/trafficsignalsystem/TrafficSystemDemo.cpp function main (line 6) | int main() { FILE: solutions/cpp/vendingmachine/Product.hpp class Product (line 6) | class Product { FILE: solutions/cpp/vendingmachine/Transaction.hpp class Transaction (line 7) | class Transaction { FILE: solutions/cpp/vendingmachine/VendingMachine.cpp function Product (line 19) | Product* VendingMachine::addProduct(const std::string& name, double pric... function Transaction (line 52) | Transaction* VendingMachine::purchaseProduct(const std::string& productI... function Product (line 116) | Product* VendingMachine::findProduct(const std::string& productId) const { FILE: solutions/cpp/vendingmachine/VendingMachine.hpp class VendingMachine (line 9) | class VendingMachine { FILE: solutions/cpp/vendingmachine/VendingMachineDemo.cpp function main (line 4) | int main() { FILE: solutions/csharp/LLDRunner.cs class Program (line 37) | class Program method Main (line 39) | static void Main(string[] args) FILE: solutions/csharp/airlinemanagementsystem/Aircraft.cs class Aircraft (line 3) | public class Aircraft method Aircraft (line 9) | public Aircraft(string tailNumber, string model, int totalSeats) FILE: solutions/csharp/airlinemanagementsystem/AirlineManagementSystem.cs class AirlineManagementSystem (line 7) | public class AirlineManagementSystem method AirlineManagementSystem (line 15) | public AirlineManagementSystem() method AddFlight (line 24) | public void AddFlight(Flight flight) method AddAircraft (line 29) | public void AddAircraft(Aircraft aircraft) method SearchFlights (line 34) | public List SearchFlights(string source, string destination, D... method BookFlight (line 39) | public Booking BookFlight(Flight flight, Passenger passenger, Seat sea... method CancelBooking (line 44) | public void CancelBooking(string bookingNumber) method ProcessPayment (line 49) | public void ProcessPayment(Payment payment) FILE: solutions/csharp/airlinemanagementsystem/AirlineManagementSystemDemo.cs class AirlineManagementSystemDemo (line 6) | public class AirlineManagementSystemDemo method Run (line 8) | public static void Run() FILE: solutions/csharp/airlinemanagementsystem/Booking.cs class Booking (line 5) | public class Booking method Booking (line 14) | public Booking(string bookingNumber, Flight flight, Passenger passenge... method Cancel (line 24) | public void Cancel() FILE: solutions/csharp/airlinemanagementsystem/BookingManager.cs class BookingManager (line 8) | public class BookingManager method BookingManager (line 15) | private BookingManager() { } method CreateBooking (line 29) | public Booking CreateBooking(Flight flight, Passenger passenger, Seat ... method CancelBooking (line 40) | public void CancelBooking(string bookingNumber) method GenerateBookingNumber (line 51) | private string GenerateBookingNumber() FILE: solutions/csharp/airlinemanagementsystem/BookingStatus.cs type BookingStatus (line 3) | public enum BookingStatus FILE: solutions/csharp/airlinemanagementsystem/Flight.cs class Flight (line 6) | public class Flight method Flight (line 15) | public Flight(string flightNumber, string source, string destination, ... FILE: solutions/csharp/airlinemanagementsystem/FlightSearch.cs class FlightSearch (line 7) | public class FlightSearch method FlightSearch (line 11) | public FlightSearch(List flights) method SearchFlights (line 16) | public List SearchFlights(string source, string destination, D... FILE: solutions/csharp/airlinemanagementsystem/Passenger.cs class Passenger (line 3) | public class Passenger method Passenger (line 10) | public Passenger(string id, string name, string email, string phone) FILE: solutions/csharp/airlinemanagementsystem/Payment.cs class Payment (line 3) | public class Payment method Payment (line 10) | public Payment(string paymentId, string paymentMethod, double amount) method ProcessPayment (line 18) | public void ProcessPayment() FILE: solutions/csharp/airlinemanagementsystem/PaymentProcessor.cs class PaymentProcessor (line 3) | public class PaymentProcessor method PaymentProcessor (line 7) | private PaymentProcessor() { } method ProcessPayment (line 21) | public void ProcessPayment(Payment payment) FILE: solutions/csharp/airlinemanagementsystem/PaymentStatus.cs type PaymentStatus (line 3) | public enum PaymentStatus FILE: solutions/csharp/airlinemanagementsystem/Seat.cs class Seat (line 3) | public class Seat method Seat (line 9) | public Seat(string seatNumber, SeatType type) method Reserve (line 16) | public void Reserve() method Release (line 21) | public void Release() FILE: solutions/csharp/airlinemanagementsystem/SeatStatus.cs type SeatStatus (line 3) | public enum SeatStatus FILE: solutions/csharp/airlinemanagementsystem/SeatType.cs type SeatType (line 3) | public enum SeatType FILE: solutions/csharp/atm/ATM.cs class ATM (line 1) | class ATM method ATM (line 11) | private ATM() method GetInstance (line 25) | public static ATM GetInstance() method ChangeState (line 40) | public void ChangeState(IATMState newState) method SetCurrentCard (line 45) | public void SetCurrentCard(Card card) method InsertCard (line 50) | public void InsertCard(string cardNumber) method EnterPin (line 55) | public void EnterPin(string pin) method SelectOperation (line 60) | public void SelectOperation(OperationType op, int amount = 0) method CheckBalance (line 65) | public void CheckBalance() method WithdrawCash (line 71) | public void WithdrawCash(int amount) method DepositCash (line 91) | public void DepositCash(int amount) method GetCurrentCard (line 96) | public Card GetCurrentCard() => currentCard; method GetBankService (line 97) | public BankService GetBankService() => bankService; FILE: solutions/csharp/atm/ATMDemo.cs class ATMDemo (line 5) | public class ATMDemo method Main (line 7) | public static void Main(string[] args) FILE: solutions/csharp/atm/DispenserChain/CashDispenser.cs class CashDispenser (line 1) | class CashDispenser method CashDispenser (line 6) | public CashDispenser(IDispenseChain chain) method DispenseCash (line 11) | public void DispenseCash(int amount) method CanDispenseCash (line 19) | public bool CanDispenseCash(int amount) FILE: solutions/csharp/atm/DispenserChain/IDispenseChain.cs type IDispenseChain (line 1) | interface IDispenseChain method SetNextChain (line 3) | void SetNextChain(IDispenseChain nextChain); method Dispense (line 4) | void Dispense(int amount); method CanDispense (line 5) | bool CanDispense(int amount); FILE: solutions/csharp/atm/DispenserChain/NoteDispenser.cs class NoteDispenser (line 1) | abstract class NoteDispenser : IDispenseChain method NoteDispenser (line 8) | public NoteDispenser(int noteValue, int numNotes) method SetNextChain (line 14) | public void SetNextChain(IDispenseChain nextChain) method Dispense (line 19) | public void Dispense(int amount) method CanDispense (line 46) | public bool CanDispense(int amount) FILE: solutions/csharp/atm/DispenserChain/NoteDispenser100.cs class NoteDispenser100 (line 1) | class NoteDispenser100 : NoteDispenser method NoteDispenser100 (line 3) | public NoteDispenser100(int numNotes) : base(100, numNotes) { } FILE: solutions/csharp/atm/DispenserChain/NoteDispenser20.cs class NoteDispenser20 (line 1) | class NoteDispenser20 : NoteDispenser method NoteDispenser20 (line 3) | public NoteDispenser20(int numNotes) : base(20, numNotes) { } FILE: solutions/csharp/atm/DispenserChain/NoteDispenser50.cs class NoteDispenser50 (line 1) | class NoteDispenser50 : NoteDispenser method NoteDispenser50 (line 3) | public NoteDispenser50(int numNotes) : base(50, numNotes) { } FILE: solutions/csharp/atm/Enums/OperationType.cs type OperationType (line 1) | enum OperationType FILE: solutions/csharp/atm/Models/Account.cs class Account (line 1) | class Account method Account (line 8) | public Account(string accountNumber, double balance) method GetAccountNumber (line 15) | public string GetAccountNumber() => accountNumber; method GetBalance (line 16) | public double GetBalance() => balance; method GetCards (line 17) | public Dictionary GetCards() => cards; method Deposit (line 19) | public void Deposit(double amount) method Withdraw (line 27) | public bool Withdraw(double amount) FILE: solutions/csharp/atm/Models/Card.cs class Card (line 1) | class Card method Card (line 6) | public Card(string cardNumber, string pin) method GetCardNumber (line 12) | public string GetCardNumber() => cardNumber; method GetPin (line 13) | public string GetPin() => pin; FILE: solutions/csharp/atm/Service/BankService.cs class BankService (line 1) | class BankService method BankService (line 7) | public BankService() method CreateAccount (line 19) | public Account CreateAccount(string accountNumber, double initialBalance) method CreateCard (line 26) | public Card CreateCard(string cardNumber, string pin) method Authenticate (line 33) | public bool Authenticate(Card card, string pin) method AuthenticateCard (line 38) | public Card AuthenticateCard(string cardNumber) method GetBalance (line 43) | public double GetBalance(Card card) method WithdrawMoney (line 48) | public void WithdrawMoney(Card card, double amount) method DepositMoney (line 53) | public void DepositMoney(Card card, double amount) method LinkCardToAccount (line 58) | public void LinkCardToAccount(Card card, Account account) FILE: solutions/csharp/atm/State/AuthenticatedState.cs class AuthenticatedState (line 1) | class AuthenticatedState : IATMState method InsertCard (line 3) | public void InsertCard(ATM atm, string cardNumber) method EnterPin (line 8) | public void EnterPin(ATM atm, string pin) method SelectOperation (line 13) | public void SelectOperation(ATM atm, OperationType op, int amount = 0) method EjectCard (line 59) | public void EjectCard(ATM atm) FILE: solutions/csharp/atm/State/HasCardState.cs class HasCardState (line 1) | class HasCardState : IATMState method InsertCard (line 3) | public void InsertCard(ATM atm, string cardNumber) method EnterPin (line 8) | public void EnterPin(ATM atm, string pin) method SelectOperation (line 26) | public void SelectOperation(ATM atm, OperationType op, int amount = 0) method EjectCard (line 31) | public void EjectCard(ATM atm) FILE: solutions/csharp/atm/State/IATMState.cs type IATMState (line 1) | interface IATMState method InsertCard (line 3) | void InsertCard(ATM atm, string cardNumber); method EnterPin (line 4) | void EnterPin(ATM atm, string pin); method SelectOperation (line 5) | void SelectOperation(ATM atm, OperationType op, int amount = 0); method EjectCard (line 6) | void EjectCard(ATM atm); FILE: solutions/csharp/atm/State/IdleState.cs class IdleState (line 1) | class IdleState : IATMState method InsertCard (line 3) | public void InsertCard(ATM atm, string cardNumber) method EnterPin (line 19) | public void EnterPin(ATM atm, string pin) method SelectOperation (line 24) | public void SelectOperation(ATM atm, OperationType op, int amount = 0) method EjectCard (line 29) | public void EjectCard(ATM atm) FILE: solutions/csharp/carrentalsystem/Car.cs class Car (line 3) | public class Car method Car (line 12) | public Car(string make, string model, int year, string licensePlate, d... method SetAvailable (line 22) | public void SetAvailable(bool available) FILE: solutions/csharp/carrentalsystem/CarRentalSystemDemo.cs class CarRentalSystemDemo (line 6) | public class CarRentalSystemDemo method Run (line 8) | public static void Run() FILE: solutions/csharp/carrentalsystem/CreditCardPaymentProcessor.cs class CreditCardPaymentProcessor (line 3) | public class CreditCardPaymentProcessor : IPaymentProcessor method ProcessPayment (line 5) | public bool ProcessPayment(double amount) FILE: solutions/csharp/carrentalsystem/Customer.cs class Customer (line 3) | public class Customer method Customer (line 9) | public Customer(string name, string contactInfo, string driversLicense... FILE: solutions/csharp/carrentalsystem/IPaymentProcessor.cs type IPaymentProcessor (line 3) | public interface IPaymentProcessor method ProcessPayment (line 5) | bool ProcessPayment(double amount); FILE: solutions/csharp/carrentalsystem/PayPalPaymentProcessor.cs class PayPalPaymentProcessor (line 3) | public class PayPalPaymentProcessor : IPaymentProcessor method ProcessPayment (line 5) | public bool ProcessPayment(double amount) FILE: solutions/csharp/carrentalsystem/RentalSystem.cs class RentalSystem (line 8) | public class RentalSystem method RentalSystem (line 15) | private RentalSystem() method AddCar (line 34) | public void AddCar(Car car) method RemoveCar (line 39) | public void RemoveCar(string licensePlate) method SearchCars (line 44) | public List SearchCars(string make, string model, DateTime startD... method IsCarAvailable (line 53) | private bool IsCarAvailable(Car car, DateTime startDate, DateTime endD... method MakeReservation (line 60) | public Reservation MakeReservation(Customer customer, Car car, DateTim... method CancelReservation (line 73) | public void CancelReservation(string reservationId) method ProcessPayment (line 82) | public bool ProcessPayment(Reservation reservation) method GenerateReservationId (line 87) | private string GenerateReservationId() FILE: solutions/csharp/carrentalsystem/Reservation.cs class Reservation (line 5) | public class Reservation method Reservation (line 14) | public Reservation(string reservationId, Customer customer, Car car, D... method CalculateTotalPrice (line 24) | private double CalculateTotalPrice() FILE: solutions/csharp/chessgame/Bishop.cs class Bishop (line 3) | public class Bishop : Piece method Bishop (line 5) | public Bishop(Color color, int row, int col) : base(color, row, col) { } method CanMove (line 7) | public override bool CanMove(Board board, int destRow, int destCol) FILE: solutions/csharp/chessgame/Board.cs class Board (line 5) | public class Board method Board (line 9) | public Board() method InitializeBoard (line 15) | private void InitializeBoard() method GetPiece (line 46) | public Piece GetPiece(int row, int col) method SetPiece (line 51) | public void SetPiece(int row, int col, Piece piece) method IsValidMove (line 56) | public bool IsValidMove(Piece piece, int destRow, int destCol) method IsCheckmate (line 66) | public bool IsCheckmate(Color color) method IsStalemate (line 72) | public bool IsStalemate(Color color) FILE: solutions/csharp/chessgame/ChessGame.cs class ChessGame (line 5) | public class ChessGame method ChessGame (line 11) | public ChessGame() method Start (line 18) | public void Start() method IsGameOver (line 49) | private bool IsGameOver() method GetPlayerMove (line 55) | private Move GetPlayerMove(Player player) method DisplayResult (line 76) | private void DisplayResult() FILE: solutions/csharp/chessgame/ChessGameDemo.cs class ChessGameDemo (line 3) | public class ChessGameDemo method Run (line 5) | public static void Run() FILE: solutions/csharp/chessgame/Color.cs type Color (line 3) | public enum Color FILE: solutions/csharp/chessgame/InvalidMoveException.cs class InvalidMoveException (line 5) | public class InvalidMoveException : Exception method InvalidMoveException (line 7) | public InvalidMoveException(string message) : base(message) { } FILE: solutions/csharp/chessgame/King.cs class King (line 3) | public class King : Piece method King (line 5) | public King(Color color, int row, int col) : base(color, row, col) { } method CanMove (line 7) | public override bool CanMove(Board board, int destRow, int destCol) FILE: solutions/csharp/chessgame/Knight.cs class Knight (line 3) | public class Knight : Piece method Knight (line 5) | public Knight(Color color, int row, int col) : base(color, row, col) { } method CanMove (line 7) | public override bool CanMove(Board board, int destRow, int destCol) FILE: solutions/csharp/chessgame/Move.cs class Move (line 3) | public class Move method Move (line 9) | public Move(Piece piece, int destRow, int destCol) FILE: solutions/csharp/chessgame/Pawn.cs class Pawn (line 3) | public class Pawn : Piece method Pawn (line 5) | public Pawn(Color color, int row, int col) : base(color, row, col) { } method CanMove (line 7) | public override bool CanMove(Board board, int destRow, int destCol) FILE: solutions/csharp/chessgame/Piece.cs class Piece (line 3) | public abstract class Piece method Piece (line 9) | public Piece(Color color, int row, int col) method CanMove (line 16) | public abstract bool CanMove(Board board, int destRow, int destCol); FILE: solutions/csharp/chessgame/Player.cs class Player (line 3) | public class Player method Player (line 7) | public Player(Color color) method MakeMove (line 12) | public void MakeMove(Board board, Move move) FILE: solutions/csharp/chessgame/Queen.cs class Queen (line 3) | public class Queen : Piece method Queen (line 5) | public Queen(Color color, int row, int col) : base(color, row, col) { } method CanMove (line 7) | public override bool CanMove(Board board, int destRow, int destCol) FILE: solutions/csharp/chessgame/Rook.cs class Rook (line 3) | public class Rook : Piece method Rook (line 5) | public Rook(Color color, int row, int col) : base(color, row, col) { } method CanMove (line 7) | public override bool CanMove(Board board, int destRow, int destCol) FILE: solutions/csharp/coffeevendingmachine/CoffeeVendingMachine.cs class CoffeeVendingMachine (line 1) | class CoffeeVendingMachine method CoffeeVendingMachine (line 9) | private CoffeeVendingMachine() method GetInstance (line 15) | public static CoffeeVendingMachine GetInstance() method SelectCoffee (line 30) | public void SelectCoffee(CoffeeType type, List toppings) method InsertMoney (line 52) | public void InsertMoney(int amount) { state.InsertMoney(this, amount); } method DispenseCoffee (line 53) | public void DispenseCoffee() { state.DispenseCoffee(this); } method Cancel (line 54) | public void Cancel() { state.Cancel(this); } method SetState (line 57) | public void SetState(IVendingMachineState state) { this.state = state; } method GetState (line 58) | public IVendingMachineState GetState() { return state; } method SetSelectedCoffee (line 59) | public void SetSelectedCoffee(Coffee selectedCoffee) { this.selectedCo... method GetSelectedCoffee (line 60) | public Coffee GetSelectedCoffee() { return selectedCoffee; } method SetMoneyInserted (line 61) | public void SetMoneyInserted(int moneyInserted) { this.moneyInserted =... method GetMoneyInserted (line 62) | public int GetMoneyInserted() { return moneyInserted; } method Reset (line 64) | public void Reset() FILE: solutions/csharp/coffeevendingmachine/CoffeeVendingMachineDemo.cs class CoffeeVendingMachineDemo (line 6) | public class CoffeeVendingMachineDemo method Main (line 8) | public static void Main(string[] args) FILE: solutions/csharp/coffeevendingmachine/Decorator/CaramelSyrupDecorator.cs class CaramelSyrupDecorator (line 1) | class CaramelSyrupDecorator : CoffeeDecorator method CaramelSyrupDecorator (line 7) | public CaramelSyrupDecorator(Coffee coffee) : base(coffee) { } method GetCoffeeType (line 9) | public override string GetCoffeeType() method GetPrice (line 14) | public override int GetPrice() method GetRecipe (line 19) | public override Dictionary GetRecipe() method Prepare (line 32) | public override void Prepare() FILE: solutions/csharp/coffeevendingmachine/Decorator/CoffeeDecorator.cs class CoffeeDecorator (line 1) | abstract class CoffeeDecorator : Coffee method CoffeeDecorator (line 5) | public CoffeeDecorator(Coffee coffee) method GetPrice (line 10) | public override int GetPrice() method GetRecipe (line 15) | public override Dictionary GetRecipe() method AddCondiments (line 20) | public override void AddCondiments() method Prepare (line 25) | public override void Prepare() FILE: solutions/csharp/coffeevendingmachine/Decorator/ExtraSugarDecorator.cs class ExtraSugarDecorator (line 1) | class ExtraSugarDecorator : CoffeeDecorator method ExtraSugarDecorator (line 7) | public ExtraSugarDecorator(Coffee coffee) : base(coffee) { } method GetCoffeeType (line 9) | public override string GetCoffeeType() method GetPrice (line 14) | public override int GetPrice() method GetRecipe (line 19) | public override Dictionary GetRecipe() method Prepare (line 32) | public override void Prepare() FILE: solutions/csharp/coffeevendingmachine/Enums/CoffeeType.cs type CoffeeType (line 1) | enum CoffeeType FILE: solutions/csharp/coffeevendingmachine/Enums/Ingredient.cs type Ingredient (line 1) | enum Ingredient FILE: solutions/csharp/coffeevendingmachine/Enums/ToppingType.cs type ToppingType (line 1) | enum ToppingType FILE: solutions/csharp/coffeevendingmachine/Factory/CoffeeFactory.cs class CoffeeFactory (line 1) | class CoffeeFactory method CreateCoffee (line 3) | public static Coffee CreateCoffee(CoffeeType type) FILE: solutions/csharp/coffeevendingmachine/Inventory.cs class Inventory (line 1) | class Inventory method Inventory (line 8) | private Inventory() { } method GetInstance (line 10) | public static Inventory GetInstance() method AddStock (line 25) | public void AddStock(Ingredient ingredient, int quantity) method HasIngredients (line 33) | public bool HasIngredients(Dictionary recipe) method DeductIngredients (line 38) | public void DeductIngredients(Dictionary recipe) method PrintInventory (line 54) | public void PrintInventory() FILE: solutions/csharp/coffeevendingmachine/States/IVendingMachineState.cs type IVendingMachineState (line 1) | interface IVendingMachineState method SelectCoffee (line 3) | void SelectCoffee(CoffeeVendingMachine machine, Coffee coffee); method InsertMoney (line 4) | void InsertMoney(CoffeeVendingMachine machine, int amount); method DispenseCoffee (line 5) | void DispenseCoffee(CoffeeVendingMachine machine); method Cancel (line 6) | void Cancel(CoffeeVendingMachine machine); FILE: solutions/csharp/coffeevendingmachine/States/OutOfIngredientState.cs class OutOfIngredientState (line 1) | class OutOfIngredientState : IVendingMachineState method SelectCoffee (line 3) | public void SelectCoffee(CoffeeVendingMachine machine, Coffee coffee) method InsertMoney (line 8) | public void InsertMoney(CoffeeVendingMachine machine, int amount) method DispenseCoffee (line 13) | public void DispenseCoffee(CoffeeVendingMachine machine) method Cancel (line 18) | public void Cancel(CoffeeVendingMachine machine) FILE: solutions/csharp/coffeevendingmachine/States/PaidState.cs class PaidState (line 1) | class PaidState : IVendingMachineState method SelectCoffee (line 3) | public void SelectCoffee(CoffeeVendingMachine machine, Coffee coffee) method InsertMoney (line 8) | public void InsertMoney(CoffeeVendingMachine machine, int amount) method DispenseCoffee (line 14) | public void DispenseCoffee(CoffeeVendingMachine machine) method Cancel (line 43) | public void Cancel(CoffeeVendingMachine machine) FILE: solutions/csharp/coffeevendingmachine/States/ReadyState.cs class ReadyState (line 1) | class ReadyState : IVendingMachineState method SelectCoffee (line 3) | public void SelectCoffee(CoffeeVendingMachine machine, Coffee coffee) method InsertMoney (line 10) | public void InsertMoney(CoffeeVendingMachine machine, int amount) method DispenseCoffee (line 15) | public void DispenseCoffee(CoffeeVendingMachine machine) method Cancel (line 20) | public void Cancel(CoffeeVendingMachine machine) FILE: solutions/csharp/coffeevendingmachine/States/SelectingState.cs class SelectingState (line 1) | class SelectingState : IVendingMachineState method SelectCoffee (line 3) | public void SelectCoffee(CoffeeVendingMachine machine, Coffee coffee) method InsertMoney (line 8) | public void InsertMoney(CoffeeVendingMachine machine, int amount) method DispenseCoffee (line 18) | public void DispenseCoffee(CoffeeVendingMachine machine) method Cancel (line 23) | public void Cancel(CoffeeVendingMachine machine) FILE: solutions/csharp/coffeevendingmachine/TemplateMethod/Cappuccino.cs class Cappuccino (line 1) | class Cappuccino : Coffee method Cappuccino (line 3) | public Cappuccino() method AddCondiments (line 8) | public override void AddCondiments() method GetPrice (line 13) | public override int GetPrice() method GetRecipe (line 18) | public override Dictionary GetRecipe() FILE: solutions/csharp/coffeevendingmachine/TemplateMethod/Coffee.cs class Coffee (line 1) | abstract class Coffee method GetCoffeeType (line 5) | public virtual string GetCoffeeType() method Prepare (line 11) | public virtual void Prepare() method GrindBeans (line 22) | private void GrindBeans() { Console.WriteLine("- Grinding fresh coffee... method Brew (line 23) | private void Brew() { Console.WriteLine("- Brewing coffee with hot wat... method PourIntoCup (line 24) | private void PourIntoCup() { Console.WriteLine("- Pouring into a cup."... method AddCondiments (line 27) | public abstract void AddCondiments(); method GetPrice (line 29) | public abstract int GetPrice(); method GetRecipe (line 30) | public abstract Dictionary GetRecipe(); FILE: solutions/csharp/coffeevendingmachine/TemplateMethod/Espresso.cs class Espresso (line 1) | class Espresso : Coffee method Espresso (line 3) | public Espresso() method AddCondiments (line 8) | public override void AddCondiments() method GetPrice (line 13) | public override int GetPrice() method GetRecipe (line 18) | public override Dictionary GetRecipe() FILE: solutions/csharp/coffeevendingmachine/TemplateMethod/Latte.cs class Latte (line 1) | class Latte : Coffee method Latte (line 3) | public Latte() method AddCondiments (line 8) | public override void AddCondiments() method GetPrice (line 13) | public override int GetPrice() method GetRecipe (line 18) | public override Dictionary GetRecipe() FILE: solutions/csharp/concertticketbookingsystem/Booking.cs class Booking (line 6) | public class Booking method Booking (line 15) | public Booking(string id, User user, Concert concert, List seats) method CalculateTotalPrice (line 25) | private double CalculateTotalPrice() method ConfirmBooking (line 30) | public void ConfirmBooking() method CancelBooking (line 39) | public void CancelBooking() FILE: solutions/csharp/concertticketbookingsystem/BookingStatus.cs type BookingStatus (line 3) | public enum BookingStatus FILE: solutions/csharp/concertticketbookingsystem/Concert.cs class Concert (line 6) | public class Concert method Concert (line 14) | public Concert(string id, string artist, string venue, DateTime dateTi... FILE: solutions/csharp/concertticketbookingsystem/ConcertTicketBookingSystem.cs class ConcertTicketBookingSystem (line 8) | public class ConcertTicketBookingSystem method ConcertTicketBookingSystem (line 15) | private ConcertTicketBookingSystem() method AddConcert (line 33) | public void AddConcert(Concert concert) method GetConcert (line 38) | public Concert GetConcert(string concertId) method SearchConcerts (line 44) | public List SearchConcerts(string artist, string venue, DateT... method BookTickets (line 52) | public Booking BookTickets(User user, Concert concert, List seats) method CancelBooking (line 79) | public void CancelBooking(string bookingId) method ProcessPayment (line 85) | private void ProcessPayment(Booking booking) method GenerateBookingId (line 90) | private string GenerateBookingId() FILE: solutions/csharp/concertticketbookingsystem/ConcertTicketBookingSystemDemo.cs class ConcertTicketBookingSystemDemo (line 7) | public class ConcertTicketBookingSystemDemo method Run (line 9) | public static void Run() method GenerateSeats (line 50) | private static List GenerateSeats(int numberOfSeats) method SelectSeats (line 68) | private static List SelectSeats(Concert concert, int numberOfSeats) FILE: solutions/csharp/concertticketbookingsystem/Seat.cs class Seat (line 3) | public class Seat method Seat (line 11) | public Seat(string id, string seatNumber, SeatType seatType, double pr... method Book (line 20) | public void Book() method Release (line 32) | public void Release() FILE: solutions/csharp/concertticketbookingsystem/SeatNotAvailableException.cs class SeatNotAvailableException (line 5) | public class SeatNotAvailableException : Exception method SeatNotAvailableException (line 7) | public SeatNotAvailableException(string message) : base(message) FILE: solutions/csharp/concertticketbookingsystem/SeatStatus.cs type SeatStatus (line 3) | public enum SeatStatus FILE: solutions/csharp/concertticketbookingsystem/SeatType.cs type SeatType (line 3) | public enum SeatType FILE: solutions/csharp/concertticketbookingsystem/User.cs class User (line 3) | public class User method User (line 9) | public User(string id, string name, string email) FILE: solutions/csharp/courseregistrationsystem/Course.cs class Course (line 3) | public class Course method Course (line 11) | public Course(string code, string name, string instructor, int maxCapa... method GetCode (line 20) | public string GetCode() => code; method GetName (line 21) | public string GetName() => name; method GetInstructor (line 22) | public string GetInstructor() => instructor; method GetMaxCapacity (line 23) | public int GetMaxCapacity() => maxCapacity; method GetEnrolledStudents (line 24) | public int GetEnrolledStudents() => enrolledStudents; method SetEnrolledStudents (line 26) | public void SetEnrolledStudents(int enrolledStudents) => this.enrolled... FILE: solutions/csharp/courseregistrationsystem/CourseRegistrationDemo.cs class CourseRegistrationDemo (line 6) | public class CourseRegistrationDemo method Run (line 8) | public static void Run() FILE: solutions/csharp/courseregistrationsystem/CourseRegistrationSystem.cs class CourseRegistrationSystem (line 8) | public class CourseRegistrationSystem method CourseRegistrationSystem (line 15) | private CourseRegistrationSystem() method GetInstance (line 22) | public static CourseRegistrationSystem GetInstance() method AddCourse (line 31) | public void AddCourse(Course course) => courses[course.GetCode()] = co... method AddStudent (line 33) | public void AddStudent(Student student) => students[student.GetId()] =... method SearchCourses (line 35) | public List SearchCourses(string query) method RegisterCourse (line 42) | public bool RegisterCourse(Student student, Course course) method GetRegisteredCourses (line 56) | public List GetRegisteredCourses(Student student) => student.G... method NotifyObservers (line 58) | private void NotifyObservers(Course course) FILE: solutions/csharp/courseregistrationsystem/Registration.cs class Registration (line 5) | public class Registration method Registration (line 11) | public Registration(Student student, Course course, DateTime registrat... FILE: solutions/csharp/courseregistrationsystem/Student.cs class Student (line 5) | public class Student method Student (line 12) | public Student(int id, string name, string email, List registe... method GetId (line 20) | public int GetId() => id; method GetName (line 21) | public string GetName() => name; method GetEmail (line 22) | public string GetEmail() => email; method GetRegisteredCourses (line 23) | public List GetRegisteredCourses() => registeredCourses; FILE: solutions/csharp/cricinfo/CommentaryManager.cs class CommentaryManager (line 1) | class CommentaryManager method CommentaryManager (line 8) | private CommentaryManager() method GetInstance (line 15) | public static CommentaryManager GetInstance() method InitializeTemplates (line 30) | private void InitializeTemplates() method GenerateCommentary (line 105) | public string GenerateCommentary(Ball ball) method GetEventKey (line 119) | private string GetEventKey(Ball ball) FILE: solutions/csharp/cricinfo/CricinfoDemo.cs class CricinfoDemo (line 5) | public class CricinfoDemo method Main (line 7) | public static void Main() FILE: solutions/csharp/cricinfo/CricinfoService.cs class CricInfoService (line 1) | class CricInfoService method CricInfoService (line 8) | private CricInfoService() method GetInstance (line 14) | public static CricInfoService GetInstance() method CreateMatch (line 29) | public Match CreateMatch(Team team1, Team team2, IMatchFormatStrategy ... method StartMatch (line 38) | public void StartMatch(string matchId) method ProcessBallUpdate (line 48) | public void ProcessBallUpdate(string matchId, Ball ball) method StartNextInnings (line 54) | public void StartNextInnings(string matchId) method SubscribeToMatch (line 60) | public void SubscribeToMatch(string matchId, IMatchObserver observer) method EndMatch (line 66) | public void EndMatch(string matchId) method AddPlayer (line 76) | public Player AddPlayer(string playerId, string playerName, PlayerRole... FILE: solutions/csharp/cricinfo/Enums/ExtraType.cs type ExtraType (line 1) | enum ExtraType FILE: solutions/csharp/cricinfo/Enums/MatchStatus.cs type MatchStatus (line 1) | enum MatchStatus FILE: solutions/csharp/cricinfo/Enums/MatchType.cs type MatchType (line 1) | enum MatchType FILE: solutions/csharp/cricinfo/Enums/PlayerRole.cs type PlayerRole (line 1) | enum PlayerRole FILE: solutions/csharp/cricinfo/Enums/WicketType.cs type WicketType (line 1) | enum WicketType FILE: solutions/csharp/cricinfo/Models/Ball.cs class Ball (line 1) | class Ball method Ball (line 11) | public Ball(BallBuilder builder) method IsWicket (line 22) | public bool IsWicket() => wicket != null; method IsBoundary (line 23) | public bool IsBoundary() => runsScored == 4 || runsScored == 6; method GetBallNumber (line 25) | public int GetBallNumber() => ballNumber; method GetBowledBy (line 26) | public Player GetBowledBy() => bowledBy; method GetFacedBy (line 27) | public Player GetFacedBy() => facedBy; method GetRunsScored (line 28) | public int GetRunsScored() => runsScored; method GetWicket (line 29) | public Wicket GetWicket() => wicket; method GetExtraType (line 30) | public ExtraType? GetExtraType() => extraType; method GetCommentary (line 31) | public string GetCommentary() => commentary; class BallBuilder (line 34) | class BallBuilder method WithBallNumber (line 44) | public BallBuilder WithBallNumber(int number) method WithBowledBy (line 50) | public BallBuilder WithBowledBy(Player bowler) method WithFacedBy (line 56) | public BallBuilder WithFacedBy(Player batsman) method WithRuns (line 62) | public BallBuilder WithRuns(int runs) method WithWicket (line 68) | public BallBuilder WithWicket(Wicket w) method WithExtraType (line 74) | public BallBuilder WithExtraType(ExtraType extra) method WithCommentary (line 80) | public BallBuilder WithCommentary(string comm) method Build (line 86) | public Ball Build() FILE: solutions/csharp/cricinfo/Models/Innings.cs class Innings (line 1) | class Innings method Innings (line 10) | public Innings(Team batting, Team bowling) method AddBall (line 29) | public void AddBall(Ball ball) method PrintPlayerStats (line 55) | public void PrintPlayerStats() method GetOvers (line 69) | public double GetOvers() method GetBattingTeam (line 79) | public Team GetBattingTeam() => battingTeam; method GetBowlingTeam (line 80) | public Team GetBowlingTeam() => bowlingTeam; method GetScore (line 81) | public int GetScore() => score; method GetWickets (line 82) | public int GetWickets() => wickets; method GetBalls (line 83) | public List GetBalls() => balls; FILE: solutions/csharp/cricinfo/Models/Match.cs class Match (line 1) | class Match method Match (line 14) | public Match(string matchId, Team t1, Team t2, IMatchFormatStrategy fo... method ProcessBall (line 26) | public void ProcessBall(Ball ball) method StartNextInnings (line 31) | public void StartNextInnings() method CreateNewInnings (line 36) | public void CreateNewInnings() method AddObserver (line 48) | public void AddObserver(IMatchObserver observer) method RemoveObserver (line 53) | public void RemoveObserver(IMatchObserver observer) method NotifyObservers (line 58) | public void NotifyObservers(Ball ball) method GetCurrentInnings (line 66) | public Innings GetCurrentInnings() method GetId (line 71) | public string GetId() => id; method GetTeam1 (line 72) | public Team GetTeam1() => team1; method GetTeam2 (line 73) | public Team GetTeam2() => team2; method GetFormatStrategy (line 74) | public IMatchFormatStrategy GetFormatStrategy() => formatStrategy; method GetInnings (line 75) | public List GetInnings() => innings; method GetCurrentStatus (line 76) | public MatchStatus GetCurrentStatus() => currentStatus; method GetWinner (line 77) | public Team GetWinner() => winner; method GetResultMessage (line 78) | public string GetResultMessage() => resultMessage; method SetState (line 80) | public void SetState(IMatchState state) { currentState = state; } method SetCurrentStatus (line 81) | public void SetCurrentStatus(MatchStatus status) { currentStatus = sta... method SetWinner (line 82) | public void SetWinner(Team w) { winner = w; } method SetResultMessage (line 83) | public void SetResultMessage(string message) { resultMessage = message; } FILE: solutions/csharp/cricinfo/Models/Player.cs class Player (line 1) | class Player method Player (line 8) | public Player(string playerId, string playerName, PlayerRole playerRole) method GetId (line 16) | public string GetId() => id; method GetName (line 17) | public string GetName() => name; method GetRole (line 18) | public PlayerRole GetRole() => role; method GetStats (line 19) | public PlayerStats GetStats() => stats; FILE: solutions/csharp/cricinfo/Models/PlayerStats.cs class PlayerStats (line 1) | class PlayerStats method PlayerStats (line 7) | public PlayerStats() method UpdateRuns (line 14) | public void UpdateRuns(int runScored) method IncrementBallsPlayed (line 19) | public void IncrementBallsPlayed() method IncrementWickets (line 24) | public void IncrementWickets() method GetRuns (line 29) | public int GetRuns() => runs; method GetBallsPlayed (line 30) | public int GetBallsPlayed() => ballsPlayed; method GetWickets (line 31) | public int GetWickets() => wickets; method ToString (line 33) | public override string ToString() FILE: solutions/csharp/cricinfo/Models/Team.cs class Team (line 1) | class Team method Team (line 7) | public Team(string teamId, string teamName, List teamPlayers) method GetId (line 14) | public string GetId() => id; method GetName (line 15) | public string GetName() => name; method GetPlayers (line 16) | public List GetPlayers() => players; FILE: solutions/csharp/cricinfo/Models/Wicket.cs class Wicket (line 1) | class Wicket method Wicket (line 8) | public Wicket(WicketBuilder builder) method GetWicketType (line 16) | public WicketType GetWicketType() => wicketType; method GetPlayerOut (line 17) | public Player GetPlayerOut() => playerOut; method GetCaughtBy (line 18) | public Player GetCaughtBy() => caughtBy; method GetRunoutBy (line 19) | public Player GetRunoutBy() => runoutBy; class WicketBuilder (line 22) | class WicketBuilder method WicketBuilder (line 29) | public WicketBuilder(WicketType type, Player player) method WithCaughtBy (line 35) | public WicketBuilder WithCaughtBy(Player player) method WithRunoutBy (line 41) | public WicketBuilder WithRunoutBy(Player player) method Build (line 47) | public Wicket Build() FILE: solutions/csharp/cricinfo/Observers/CommentaryDisplay.cs class CommentaryDisplay (line 1) | class CommentaryDisplay : IMatchObserver method Update (line 3) | public void Update(Match match, Ball lastBall) FILE: solutions/csharp/cricinfo/Observers/IMatchObserver.cs type IMatchObserver (line 1) | interface IMatchObserver method Update (line 3) | void Update(Match match, Ball lastBall); FILE: solutions/csharp/cricinfo/Observers/ScorecardDisplay.cs class ScorecardDisplay (line 1) | class ScorecardDisplay : IMatchObserver method Update (line 3) | public void Update(Match match, Ball lastBall) FILE: solutions/csharp/cricinfo/Observers/UserNotifier.cs class UserNotifier (line 1) | class UserNotifier : IMatchObserver method Update (line 3) | public void Update(Match match, Ball lastBall) FILE: solutions/csharp/cricinfo/Repositories/MatchRepository.cs class MatchRepository (line 1) | class MatchRepository method Save (line 5) | public void Save(Match match) method FindById (line 10) | public Match FindById(string id) FILE: solutions/csharp/cricinfo/Repositories/PlayerRepository.cs class PlayerRepository (line 1) | class PlayerRepository method Save (line 5) | public void Save(Player player) method FindById (line 10) | public Player FindById(string id) FILE: solutions/csharp/cricinfo/States/FinishedState.cs class FinishedState (line 1) | class FinishedState : IMatchState method ProcessBall (line 3) | public void ProcessBall(Match match, Ball ball) method StartNextInnings (line 8) | public void StartNextInnings(Match match) FILE: solutions/csharp/cricinfo/States/IMatchState.cs type IMatchState (line 1) | interface IMatchState method ProcessBall (line 3) | void ProcessBall(Match match, Ball ball); method StartNextInnings (line 4) | void StartNextInnings(Match match); FILE: solutions/csharp/cricinfo/States/InBreakState.cs class InBreakState (line 1) | class InBreakState : IMatchState method ProcessBall (line 3) | public void ProcessBall(Match match, Ball ball) method StartNextInnings (line 8) | public void StartNextInnings(Match match) FILE: solutions/csharp/cricinfo/States/LiveState.cs class LiveState (line 1) | class LiveState : IMatchState method ProcessBall (line 3) | public void ProcessBall(Match match, Ball ball) method StartNextInnings (line 11) | public void StartNextInnings(Match match) method CheckForMatchEnd (line 16) | private void CheckForMatchEnd(Match match) method DeclareWinner (line 64) | private void DeclareWinner(Match match, Team winningTeam, string message) method IsInningsOver (line 76) | private bool IsInningsOver(Match match) FILE: solutions/csharp/cricinfo/States/ScheduledState.cs class ScheduledState (line 1) | class ScheduledState : IMatchState method ProcessBall (line 3) | public void ProcessBall(Match match, Ball ball) method StartNextInnings (line 8) | public void StartNextInnings(Match match) FILE: solutions/csharp/cricinfo/Strategy/IMatchFormatStrategy.cs type IMatchFormatStrategy (line 1) | interface IMatchFormatStrategy method GetTotalInnings (line 3) | int GetTotalInnings(); method GetTotalOvers (line 4) | int GetTotalOvers(); method GetFormatName (line 5) | string GetFormatName(); FILE: solutions/csharp/cricinfo/Strategy/ODIFormatStrategy.cs class ODIFormatStrategy (line 1) | class ODIFormatStrategy : IMatchFormatStrategy method GetTotalInnings (line 3) | public int GetTotalInnings() => 2; method GetTotalOvers (line 4) | public int GetTotalOvers() => 50; method GetFormatName (line 5) | public string GetFormatName() => "ODI"; FILE: solutions/csharp/cricinfo/Strategy/T20FormatStrategy.cs class T20FormatStrategy (line 1) | class T20FormatStrategy : IMatchFormatStrategy method GetTotalInnings (line 3) | public int GetTotalInnings() => 2; method GetTotalOvers (line 4) | public int GetTotalOvers() => 20; method GetFormatName (line 5) | public string GetFormatName() => "T20"; FILE: solutions/csharp/digitalwalletservice/Account.cs class Account (line 7) | public class Account method Account (line 16) | public Account(string id, User user, string accountNumber, Currency cu... method Deposit (line 26) | public void Deposit(decimal amount) method Withdraw (line 31) | public void Withdraw(decimal amount) method AddTransaction (line 43) | public void AddTransaction(Transaction transaction) method GetId (line 48) | public string GetId() method GetUser (line 53) | public User GetUser() method GetCurrency (line 58) | public Currency GetCurrency() method GetBalance (line 63) | public decimal GetBalance() method GetTransactions (line 68) | public List GetTransactions() FILE: solutions/csharp/digitalwalletservice/BankAccount.cs class BankAccount (line 6) | public class BankAccount : PaymentMethod method BankAccount (line 11) | public BankAccount(string id, User user, string accountNumber, string ... method ProcessPayment (line 18) | public override bool ProcessPayment(decimal amount, Currency currency) FILE: solutions/csharp/digitalwalletservice/CreditCard.cs class CreditCard (line 6) | public class CreditCard : PaymentMethod method CreditCard (line 12) | public CreditCard(string id, User user, string cardNumber, string expi... method ProcessPayment (line 20) | public override bool ProcessPayment(decimal amount, Currency currency) FILE: solutions/csharp/digitalwalletservice/Currency.cs type Currency (line 3) | public enum Currency FILE: solutions/csharp/digitalwalletservice/CurrencyConverter.cs class CurrencyConverter (line 7) | public class CurrencyConverter method Convert (line 17) | public static decimal Convert(decimal amount, Currency sourceCurrency,... FILE: solutions/csharp/digitalwalletservice/DigitalWallet.cs class DigitalWallet (line 8) | public class DigitalWallet method DigitalWallet (line 15) | private DigitalWallet() method GetInstance (line 22) | public static DigitalWallet GetInstance() method CreateUser (line 31) | public void CreateUser(User user) method GetUser (line 36) | public User GetUser(string userId) method CreateAccount (line 41) | public void CreateAccount(Account account) method GetAccount (line 47) | public Account GetAccount(string accountId) method AddPaymentMethod (line 52) | public void AddPaymentMethod(PaymentMethod paymentMethod) method GetPaymentMethod (line 57) | public PaymentMethod GetPaymentMethod(string paymentMethodId) method TransferFunds (line 62) | public void TransferFunds(Account sourceAccount, Account destinationAc... method GetTransactionHistory (line 82) | public List GetTransactionHistory(Account account) method GenerateTransactionId (line 87) | private string GenerateTransactionId() FILE: solutions/csharp/digitalwalletservice/DigitalWalletDemo.cs class DigitalWalletDemo (line 7) | public class DigitalWalletDemo method Run (line 9) | public static void Run() FILE: solutions/csharp/digitalwalletservice/InsufficientFundsException.cs class InsufficientFundsException (line 5) | public class InsufficientFundsException : Exception method InsufficientFundsException (line 7) | public InsufficientFundsException(string message) : base(message) { } FILE: solutions/csharp/digitalwalletservice/PaymentMethod.cs class PaymentMethod (line 6) | public abstract class PaymentMethod method PaymentMethod (line 11) | protected PaymentMethod(string id, User user) method ProcessPayment (line 17) | public abstract bool ProcessPayment(decimal amount, Currency currency); method GetId (line 19) | public string GetId() method GetUser (line 24) | public User GetUser() FILE: solutions/csharp/digitalwalletservice/Transaction.cs class Transaction (line 6) | public class Transaction method Transaction (line 15) | public Transaction(string id, Account sourceAccount, Account destinati... method GetId (line 25) | public string GetId() method GetSourceAccount (line 30) | public Account GetSourceAccount() method GetDestinationAccount (line 35) | public Account GetDestinationAccount() method GetAmount (line 40) | public decimal GetAmount() method GetCurrency (line 45) | public Currency GetCurrency() method GetTimestamp (line 50) | public DateTime GetTimestamp() FILE: solutions/csharp/digitalwalletservice/User.cs class User (line 6) | public class User method User (line 14) | public User(string id, string name, string email, string password) method AddAccount (line 23) | public void AddAccount(Account account) method RemoveAccount (line 28) | public void RemoveAccount(Account account) method GetId (line 33) | public string GetId() FILE: solutions/csharp/elevatorsystem/ElevatorSystem.cs class ElevatorSystem (line 1) | class ElevatorSystem method ElevatorSystem (line 10) | private ElevatorSystem(int numElevators) method GetInstance (line 28) | public static ElevatorSystem GetInstance(int numElevators) method Start (line 43) | public void Start() method RequestElevator (line 54) | public void RequestElevator(int floor, Direction direction) method SelectFloor (line 73) | public void SelectFloor(int elevatorId, int destinationFloor) method Shutdown (line 88) | public void Shutdown() FILE: solutions/csharp/elevatorsystem/ElevatorSystemDemo.cs class ElevatorSystemDemo (line 7) | public class ElevatorSystemDemo method Main (line 9) | public static void Main(string[] args) FILE: solutions/csharp/elevatorsystem/Enums/Direction.cs type Direction (line 1) | enum Direction FILE: solutions/csharp/elevatorsystem/Enums/RequestSource.cs type RequestSource (line 1) | enum RequestSource FILE: solutions/csharp/elevatorsystem/Models/Elevator.cs class Elevator (line 1) | class Elevator method Elevator (line 15) | public Elevator(int id) method AddObserver (line 25) | public void AddObserver(IElevatorObserver observer) method NotifyObservers (line 31) | public void NotifyObservers() method SetState (line 40) | public void SetState(IElevatorState state) method Move (line 46) | public void Move() method AddRequest (line 52) | public void AddRequest(Request request) method GetId (line 62) | public int GetId() => id; method GetCurrentFloor (line 64) | public int GetCurrentFloor() method SetCurrentFloor (line 72) | public void SetCurrentFloor(int floor) method GetDirection (line 81) | public Direction GetDirection() => state.GetDirection(); method GetUpRequests (line 82) | public SortedSet GetUpRequests() => upRequests; method GetDownRequests (line 83) | public SortedSet GetDownRequests() => downRequests; method IsRunning (line 84) | public bool IsRunning() => isRunning; method StopElevator (line 85) | public void StopElevator() => isRunning = false; method Run (line 87) | public void Run() FILE: solutions/csharp/elevatorsystem/Models/Request.cs class Request (line 1) | class Request method Request (line 7) | public Request(int targetFloor, Direction direction, RequestSource sou... method GetTargetFloor (line 14) | public int GetTargetFloor() => targetFloor; method GetDirection (line 15) | public Direction GetDirection() => direction; method GetSource (line 16) | public RequestSource GetSource() => source; method ToString (line 18) | public override string ToString() FILE: solutions/csharp/elevatorsystem/Observer/Display.cs class Display (line 1) | class Display : IElevatorObserver method Update (line 3) | public void Update(Elevator elevator) FILE: solutions/csharp/elevatorsystem/Observer/IElevatorObserver.cs type IElevatorObserver (line 1) | interface IElevatorObserver method Update (line 3) | void Update(Elevator elevator); FILE: solutions/csharp/elevatorsystem/States/IElevatorState.cs type IElevatorState (line 1) | interface IElevatorState method Move (line 3) | void Move(Elevator elevator); method AddRequest (line 4) | void AddRequest(Elevator elevator, Request request); method GetDirection (line 5) | Direction GetDirection(); FILE: solutions/csharp/elevatorsystem/States/IdleState.cs class IdleState (line 1) | class IdleState : IElevatorState method Move (line 3) | public void Move(Elevator elevator) method AddRequest (line 16) | public void AddRequest(Elevator elevator, Request request) method GetDirection (line 29) | public Direction GetDirection() => Direction.IDLE; FILE: solutions/csharp/elevatorsystem/States/MovingDownState.cs class MovingDownState (line 1) | class MovingDownState : IElevatorState method Move (line 3) | public void Move(Elevator elevator) method AddRequest (line 26) | public void AddRequest(Elevator elevator, Request request) method GetDirection (line 53) | public Direction GetDirection() => Direction.DOWN; FILE: solutions/csharp/elevatorsystem/States/MovingUpState.cs class MovingUpState (line 1) | class MovingUpState : IElevatorState method Move (line 3) | public void Move(Elevator elevator) method AddRequest (line 26) | public void AddRequest(Elevator elevator, Request request) method GetDirection (line 53) | public Direction GetDirection() => Direction.UP; FILE: solutions/csharp/elevatorsystem/Strategy/IElevatorSelectionStrategy.cs type IElevatorSelectionStrategy (line 1) | interface IElevatorSelectionStrategy method SelectElevator (line 3) | Elevator SelectElevator(List elevators, Request request); FILE: solutions/csharp/elevatorsystem/Strategy/NearestElevatorStrategy.cs class NearestElevatorStrategy (line 1) | class NearestElevatorStrategy : IElevatorSelectionStrategy method SelectElevator (line 3) | public Elevator SelectElevator(List elevators, Request request) method IsSuitable (line 23) | private bool IsSuitable(Elevator elevator, Request request) FILE: solutions/csharp/fooddeliveryservice/Enums/OrderStatus.cs type OrderStatus (line 1) | enum OrderStatus FILE: solutions/csharp/fooddeliveryservice/FoodDeliveryService.cs class FoodDeliveryService (line 3) | class FoodDeliveryService method FoodDeliveryService (line 13) | private FoodDeliveryService() { } method GetInstance (line 15) | public static FoodDeliveryService GetInstance() method SetAssignmentStrategy (line 28) | public void SetAssignmentStrategy(IDeliveryAssignmentStrategy assignme... method RegisterCustomer (line 33) | public Customer RegisterCustomer(string name, string phone, Address ad... method RegisterRestaurant (line 40) | public Restaurant RegisterRestaurant(string name, Address address) method RegisterDeliveryAgent (line 47) | public DeliveryAgent RegisterDeliveryAgent(string name, string phone, ... method PlaceOrder (line 54) | public Order PlaceOrder(string customerId, string restaurantId, List SearchRestaurants(List GetItems() FILE: solutions/csharp/fooddeliveryservice/Models/MenuItem.cs class MenuItem (line 1) | class MenuItem method MenuItem (line 8) | public MenuItem(string id, string name, double price) method GetId (line 16) | public string GetId() { return id; } method SetAvailable (line 17) | public void SetAvailable(bool available) { this.available = available; } method GetName (line 18) | public string GetName() { return name; } method GetPrice (line 19) | public double GetPrice() { return price; } method GetMenuItem (line 21) | public string GetMenuItem() FILE: solutions/csharp/fooddeliveryservice/Models/Order.cs class Order (line 1) | class Order method Order (line 11) | public Order(Customer customer, Restaurant restaurant, List... method AddObserver (line 22) | public void AddObserver(IOrderObserver observer) method NotifyObservers (line 27) | private void NotifyObservers() method SetStatus (line 35) | public void SetStatus(OrderStatus newStatus) method Cancel (line 44) | public bool Cancel() method AssignDeliveryAgent (line 54) | public void AssignDeliveryAgent(DeliveryAgent agent) method GetId (line 61) | public string GetId() { return id; } method GetStatus (line 62) | public OrderStatus GetStatus() { return status; } method GetCustomer (line 63) | public Customer GetCustomer() { return customer; } method GetRestaurant (line 64) | public Restaurant GetRestaurant() { return restaurant; } method GetDeliveryAgent (line 65) | public DeliveryAgent GetDeliveryAgent() { return deliveryAgent; } FILE: solutions/csharp/fooddeliveryservice/Models/OrderItem.cs class OrderItem (line 1) | class OrderItem method OrderItem (line 6) | public OrderItem(MenuItem item, int quantity) method GetItem (line 12) | public MenuItem GetItem() { return item; } method GetQuantity (line 13) | public int GetQuantity() { return quantity; } FILE: solutions/csharp/fooddeliveryservice/Models/Restaurant.cs class Restaurant (line 1) | class Restaurant : IOrderObserver method Restaurant (line 8) | public Restaurant(string name, Address address) method AddToMenu (line 16) | public void AddToMenu(MenuItem item) method GetId (line 21) | public string GetId() { return id; } method GetName (line 22) | public string GetName() { return name; } method GetAddress (line 23) | public Address GetAddress() { return address; } method GetMenu (line 24) | public Menu GetMenu() { return menu; } method OnUpdate (line 26) | public void OnUpdate(Order order) FILE: solutions/csharp/fooddeliveryservice/Models/User.cs class User (line 1) | abstract class User : IOrderObserver method User (line 7) | public User(string name, string phone) method GetId (line 14) | public string GetId() { return id; } method GetName (line 15) | public string GetName() { return name; } method OnUpdate (line 17) | public abstract void OnUpdate(Order order); FILE: solutions/csharp/fooddeliveryservice/Observer/IOrderObserver.cs type IOrderObserver (line 1) | interface IOrderObserver method OnUpdate (line 3) | void OnUpdate(Order order); FILE: solutions/csharp/fooddeliveryservice/Strategies/assignment/IDeliveryAssignmentStrategy.cs type IDeliveryAssignmentStrategy (line 1) | interface IDeliveryAssignmentStrategy method FindAgent (line 3) | DeliveryAgent FindAgent(Order order, List agents); FILE: solutions/csharp/fooddeliveryservice/Strategies/assignment/NearestAvailableAgentStrategy.cs class NearestAvailableAgentStrategy (line 1) | class NearestAvailableAgentStrategy : IDeliveryAssignmentStrategy method FindAgent (line 3) | public DeliveryAgent FindAgent(Order order, List availa... method CalculateTotalDistance (line 14) | private double CalculateTotalDistance(DeliveryAgent agent, Address res... FILE: solutions/csharp/fooddeliveryservice/Strategies/search/IRestaurantSearchStrategy.cs type IRestaurantSearchStrategy (line 1) | interface IRestaurantSearchStrategy method Filter (line 3) | List Filter(List allRestaurants); FILE: solutions/csharp/fooddeliveryservice/Strategies/search/SearchByCityStrategy.cs class SearchByCityStrategy (line 1) | class SearchByCityStrategy : IRestaurantSearchStrategy method SearchByCityStrategy (line 5) | public SearchByCityStrategy(string city) method Filter (line 10) | public List Filter(List allRestaurants) FILE: solutions/csharp/fooddeliveryservice/Strategies/search/SearchByMenuKeywordStrategy.cs class SearchByMenuKeywordStrategy (line 1) | class SearchByMenuKeywordStrategy : IRestaurantSearchStrategy method SearchByMenuKeywordStrategy (line 5) | public SearchByMenuKeywordStrategy(string keyword) method Filter (line 10) | public List Filter(List allRestaurants) FILE: solutions/csharp/fooddeliveryservice/Strategies/search/SearchByProximityStrategy.cs class SearchByProximityStrategy (line 1) | class SearchByProximityStrategy : IRestaurantSearchStrategy method SearchByProximityStrategy (line 6) | public SearchByProximityStrategy(Address userLocation, double maxDista... method Filter (line 12) | public List Filter(List allRestaurants) FILE: solutions/csharp/hotelmanagementsystem/CashPayment.cs class CashPayment (line 3) | public class CashPayment : Payment method ProcessPayment (line 5) | public bool ProcessPayment(double amount) FILE: solutions/csharp/hotelmanagementsystem/CreditCardPayment.cs class CreditCardPayment (line 3) | public class CreditCardPayment : Payment method ProcessPayment (line 5) | public bool ProcessPayment(double amount) FILE: solutions/csharp/hotelmanagementsystem/Guest.cs class Guest (line 3) | public class Guest method Guest (line 10) | public Guest(string id, string name, string email, string phoneNumber) FILE: solutions/csharp/hotelmanagementsystem/HotelManagementSystem.cs class HotelManagementSystem (line 8) | public class HotelManagementSystem method HotelManagementSystem (line 15) | private HotelManagementSystem() method AddGuest (line 34) | public void AddGuest(Guest guest) method GetGuest (line 39) | public Guest GetGuest(string guestId) method AddRoom (line 45) | public void AddRoom(Room room) method GetRoom (line 50) | public Room GetRoom(string roomId) method BookRoom (line 56) | public Reservation BookRoom(Guest guest, Room room, DateTime checkInDa... method CancelReservation (line 72) | public void CancelReservation(string reservationId) method CheckIn (line 84) | public void CheckIn(string reservationId) method CheckOut (line 99) | public void CheckOut(string reservationId, Payment payment) method GenerateReservationId (line 124) | private string GenerateReservationId() FILE: solutions/csharp/hotelmanagementsystem/HotelManagementSystemDemo.cs class HotelManagementSystemDemo (line 5) | public class HotelManagementSystemDemo method Run (line 7) | public static void Run() FILE: solutions/csharp/hotelmanagementsystem/Payment.cs type Payment (line 3) | public interface Payment method ProcessPayment (line 5) | bool ProcessPayment(double amount); FILE: solutions/csharp/hotelmanagementsystem/Reservation.cs class Reservation (line 5) | public class Reservation method Reservation (line 14) | public Reservation(string id, Guest guest, Room room, DateTime checkIn... method Cancel (line 24) | public void Cancel() FILE: solutions/csharp/hotelmanagementsystem/ReservationStatus.cs type ReservationStatus (line 3) | public enum ReservationStatus FILE: solutions/csharp/hotelmanagementsystem/Room.cs class Room (line 3) | public class Room method Room (line 10) | public Room(string id, RoomType type, double price) method Book (line 18) | public void Book() method CheckIn (line 30) | public void CheckIn() method CheckOut (line 42) | public void CheckOut() FILE: solutions/csharp/hotelmanagementsystem/RoomStatus.cs type RoomStatus (line 3) | public enum RoomStatus FILE: solutions/csharp/hotelmanagementsystem/RoomType.cs type RoomType (line 3) | public enum RoomType FILE: solutions/csharp/librarymanagementsystem/Enum/ItemType.cs type ItemType (line 1) | enum ItemType FILE: solutions/csharp/librarymanagementsystem/Factory/ItemFactory.cs class ItemFactory (line 1) | class ItemFactory method CreateItem (line 3) | public static LibraryItem CreateItem(ItemType type, string id, string ... FILE: solutions/csharp/librarymanagementsystem/LibraryManagementSystem.cs class LibraryManagementSystem (line 1) | class LibraryManagementSystem method LibraryManagementSystem (line 8) | private LibraryManagementSystem() { } method GetInstance (line 9) | public static LibraryManagementSystem GetInstance() { return instance; } method AddItem (line 11) | public List AddItem(ItemType type, string id, string title, ... method AddMember (line 29) | public Member AddMember(string id, string name) method Checkout (line 36) | public void Checkout(string memberId, string copyId) method ReturnItem (line 48) | public void ReturnItem(string copyId) method PlaceHold (line 60) | public void PlaceHold(string memberId, string itemId) method Search (line 69) | public List Search(string query, ISearchStrategy strategy) method PrintCatalog (line 74) | public void PrintCatalog() FILE: solutions/csharp/librarymanagementsystem/LibraryManagementSystemDemo.cs class LibraryManagementDemo (line 5) | public class LibraryManagementDemo method Main (line 7) | public static void Main(string[] args) FILE: solutions/csharp/librarymanagementsystem/Models/Book.cs class Book (line 1) | class Book : LibraryItem method Book (line 5) | public Book(string id, string title, string author) : base(id, title) method GetAuthorOrPublisher (line 10) | public override string GetAuthorOrPublisher() { return author; } FILE: solutions/csharp/librarymanagementsystem/Models/BookCopy.cs class BookCopy (line 1) | class BookCopy method BookCopy (line 7) | public BookCopy(string id, LibraryItem item) method Checkout (line 15) | public void Checkout(Member member) { currentState.Checkout(this, memb... method ReturnItem (line 16) | public void ReturnItem() { currentState.ReturnItem(this); } method PlaceHold (line 17) | public void PlaceHold(Member member) { currentState.PlaceHold(this, me... method SetState (line 19) | public void SetState(IItemState state) { this.currentState = state; } method GetId (line 20) | public string GetId() { return id; } method GetItem (line 21) | public LibraryItem GetItem() { return item; } method IsAvailable (line 22) | public bool IsAvailable() { return currentState is AvailableState; } FILE: solutions/csharp/librarymanagementsystem/Models/LibraryItem.cs class LibraryItem (line 1) | abstract class LibraryItem method LibraryItem (line 8) | public LibraryItem(string id, string title) method AddCopy (line 14) | public void AddCopy(BookCopy copy) { copies.Add(copy); } method AddObserver (line 15) | public void AddObserver(Member member) { observers.Add(member); } method RemoveObserver (line 16) | public void RemoveObserver(Member member) { observers.Remove(member); } method NotifyObservers (line 18) | public void NotifyObservers() method GetAvailableCopy (line 28) | public BookCopy GetAvailableCopy() method GetId (line 33) | public string GetId() { return id; } method GetTitle (line 34) | public string GetTitle() { return title; } method GetCopies (line 35) | public List GetCopies() { return copies; } method GetAuthorOrPublisher (line 37) | public abstract string GetAuthorOrPublisher(); method GetAvailableCopyCount (line 39) | public long GetAvailableCopyCount() method HasObservers (line 44) | public bool HasObservers() { return observers.Count > 0; } method IsObserver (line 45) | public bool IsObserver(Member member) { return observers.Contains(memb... FILE: solutions/csharp/librarymanagementsystem/Models/Loan.cs class Loan (line 1) | class Loan method Loan (line 7) | public Loan(BookCopy copy, Member member) method GetCopy (line 14) | public BookCopy GetCopy() { return copy; } method GetMember (line 15) | public Member GetMember() { return member; } FILE: solutions/csharp/librarymanagementsystem/Models/Magazine.cs class Magazine (line 1) | class Magazine : LibraryItem method Magazine (line 5) | public Magazine(string id, string title, string publisher) : base(id, ... method GetAuthorOrPublisher (line 10) | public override string GetAuthorOrPublisher() { return publisher; } FILE: solutions/csharp/librarymanagementsystem/Models/Member.cs class Member (line 1) | class Member method Member (line 7) | public Member(string id, string name) method Update (line 13) | public void Update(LibraryItem item) method AddLoan (line 18) | public void AddLoan(Loan loan) { loans.Add(loan); } method RemoveLoan (line 19) | public void RemoveLoan(Loan loan) { loans.Remove(loan); } method GetId (line 20) | public string GetId() { return id; } method GetName (line 21) | public string GetName() { return name; } method GetLoans (line 22) | public List GetLoans() { return loans; } FILE: solutions/csharp/librarymanagementsystem/Models/TransactionService.cs class TransactionService (line 1) | class TransactionService method TransactionService (line 6) | private TransactionService() { } method GetInstance (line 7) | public static TransactionService GetInstance() { return instance; } method CreateLoan (line 9) | public void CreateLoan(BookCopy copy, Member member) method EndLoan (line 21) | public void EndLoan(BookCopy copy) FILE: solutions/csharp/librarymanagementsystem/States/AvailableState.cs class AvailableState (line 1) | class AvailableState : IItemState method Checkout (line 3) | public void Checkout(BookCopy copy, Member member) method ReturnItem (line 10) | public void ReturnItem(BookCopy copy) method PlaceHold (line 15) | public void PlaceHold(BookCopy copy, Member member) FILE: solutions/csharp/librarymanagementsystem/States/CheckedOutState.cs class CheckedOutState (line 1) | class CheckedOutState : IItemState method Checkout (line 3) | public void Checkout(BookCopy copy, Member member) method ReturnItem (line 8) | public void ReturnItem(BookCopy copy) method PlaceHold (line 24) | public void PlaceHold(BookCopy copy, Member member) FILE: solutions/csharp/librarymanagementsystem/States/IItemState.cs type IItemState (line 1) | interface IItemState method Checkout (line 3) | void Checkout(BookCopy copy, Member member); method ReturnItem (line 4) | void ReturnItem(BookCopy copy); method PlaceHold (line 5) | void PlaceHold(BookCopy copy, Member member); FILE: solutions/csharp/librarymanagementsystem/States/OnHoldState.cs class OnHoldState (line 1) | class OnHoldState : IItemState method Checkout (line 3) | public void Checkout(BookCopy copy, Member member) method ReturnItem (line 18) | public void ReturnItem(BookCopy copy) method PlaceHold (line 23) | public void PlaceHold(BookCopy copy, Member member) FILE: solutions/csharp/librarymanagementsystem/Strategy/ISearchStrategy.cs type ISearchStrategy (line 1) | interface ISearchStrategy method Search (line 3) | List Search(string query, List items); FILE: solutions/csharp/librarymanagementsystem/Strategy/SearchByAuthorStrategy.cs class SearchByAuthorStrategy (line 1) | class SearchByAuthorStrategy : ISearchStrategy method Search (line 3) | public List Search(string query, List items) FILE: solutions/csharp/librarymanagementsystem/Strategy/SearchByTitleStrategy.cs class SearchByTitleStrategy (line 1) | class SearchByTitleStrategy : ISearchStrategy method Search (line 3) | public List Search(string query, List items) FILE: solutions/csharp/linkedIn/Enums/ConnectionStatus.cs type ConnectionStatus (line 1) | enum ConnectionStatus FILE: solutions/csharp/linkedIn/Enums/NotificationType.cs type NotificationType (line 1) | enum NotificationType FILE: solutions/csharp/linkedIn/LinkedInDemo.cs class LinkedInDemo (line 6) | public class LinkedInDemo method Main (line 8) | public static void Main(string[] args) FILE: solutions/csharp/linkedIn/LinkedInSystem.cs class LinkedInSystem (line 1) | class LinkedInSystem method LinkedInSystem (line 11) | private LinkedInSystem() method GetInstance (line 18) | public static LinkedInSystem GetInstance() method RegisterMember (line 33) | public void RegisterMember(Member member) method GetMember (line 39) | public Member GetMember(string name) method SendConnectionRequest (line 44) | public string SendConnectionRequest(Member from, Member to) method AcceptConnectionRequest (line 49) | public void AcceptConnectionRequest(string requestId) method CreatePost (line 54) | public void CreatePost(string memberId, string content) method GetLatestPostByMember (line 62) | public Post GetLatestPostByMember(string memberId) method ViewNewsFeed (line 68) | public void ViewNewsFeed(string memberId) method SearchMemberByName (line 75) | public List SearchMemberByName(string name) FILE: solutions/csharp/linkedIn/Models/Comment.cs class Comment (line 1) | class Comment method Comment (line 7) | public Comment(Member author, string text) method GetAuthor (line 14) | public Member GetAuthor() { return author; } method GetText (line 15) | public string GetText() { return text; } FILE: solutions/csharp/linkedIn/Models/Connection.cs class Connection (line 1) | class Connection method Connection (line 9) | public Connection(Member fromMember, Member toMember) method GetFromMember (line 17) | public Member GetFromMember() { return fromMember; } method GetToMember (line 18) | public Member GetToMember() { return toMember; } method GetStatus (line 19) | public ConnectionStatus GetStatus() { return status; } method SetStatus (line 21) | public void SetStatus(ConnectionStatus status) FILE: solutions/csharp/linkedIn/Models/Education.cs class Education (line 1) | class Education method Education (line 8) | public Education(string school, string degree, int startYear, int endY... method ToString (line 16) | public override string ToString() FILE: solutions/csharp/linkedIn/Models/Experience.cs class Experience (line 1) | class Experience method Experience (line 8) | public Experience(string title, string company, string startDate, stri... method ToString (line 16) | public override string ToString() FILE: solutions/csharp/linkedIn/Models/Like.cs class Like (line 1) | class Like method Like (line 6) | public Like(Member member) method GetMember (line 12) | public Member GetMember() { return member; } FILE: solutions/csharp/linkedIn/Models/Member.cs class Member (line 1) | class Member : INotificationObserver method Member (line 10) | public Member(string id, string name, string email, Profile profile) method GetId (line 18) | public string GetId() { return id; } method GetName (line 19) | public string GetName() { return name; } method GetEmail (line 20) | public string GetEmail() { return email; } method GetConnections (line 21) | public HashSet GetConnections() { return connections; } method GetProfile (line 22) | public Profile GetProfile() { return profile; } method AddConnection (line 24) | public void AddConnection(Member member) method DisplayProfile (line 29) | public void DisplayProfile() method ViewNotifications (line 36) | public void ViewNotifications() method Update (line 54) | public void Update(Notification notification) class MemberBuilder (line 61) | class MemberBuilder method MemberBuilder (line 68) | public MemberBuilder(string name, string email) method WithSummary (line 75) | public MemberBuilder WithSummary(string summary) method AddExperience (line 81) | public MemberBuilder AddExperience(Experience experience) method AddEducation (line 87) | public MemberBuilder AddEducation(Education education) method Build (line 93) | public Member Build() FILE: solutions/csharp/linkedIn/Models/NewsFeed.cs class NewsFeed (line 1) | class NewsFeed method NewsFeed (line 5) | public NewsFeed(List posts) method Display (line 10) | public void Display(IFeedSortingStrategy strategy) FILE: solutions/csharp/linkedIn/Models/Notification.cs class Notification (line 1) | class Notification method Notification (line 10) | public Notification(string memberId, NotificationType type, string con... method GetContent (line 19) | public string GetContent() { return content; } method MarkAsRead (line 20) | public void MarkAsRead() { isRead = true; } method IsRead (line 21) | public bool IsRead() { return isRead; } FILE: solutions/csharp/linkedIn/Models/Post.cs class Post (line 1) | class Post : Subject method Post (line 10) | public Post(Member author, string content) method AddLike (line 19) | public void AddLike(Member member) method AddComment (line 27) | public void AddComment(Member member, string text) method GetId (line 35) | public string GetId() { return id; } method GetAuthor (line 36) | public Member GetAuthor() { return author; } method GetContent (line 37) | public string GetContent() { return content; } method GetCreatedAt (line 38) | public DateTime GetCreatedAt() { return createdAt; } method GetLikes (line 39) | public List GetLikes() { return likes; } method GetComments (line 40) | public List GetComments() { return comments; } FILE: solutions/csharp/linkedIn/Models/Profile.cs class Profile (line 1) | class Profile method SetSummary (line 7) | public void SetSummary(string summary) { this.summary = summary; } method AddExperience (line 8) | public void AddExperience(Experience experience) { experiences.Add(exp... method AddEducation (line 9) | public void AddEducation(Education education) { educations.Add(educati... method Display (line 11) | public void Display() FILE: solutions/csharp/linkedIn/Observer/INotificationObserver.cs type INotificationObserver (line 1) | interface INotificationObserver method Update (line 3) | void Update(Notification notification); FILE: solutions/csharp/linkedIn/Observer/Subject.cs class Subject (line 1) | abstract class Subject method AddObserver (line 5) | public void AddObserver(INotificationObserver observer) method RemoveObserver (line 10) | public void RemoveObserver(INotificationObserver observer) method NotifyObservers (line 15) | public void NotifyObservers(Notification notification) FILE: solutions/csharp/linkedIn/Services/ConnectionService.cs class ConnectionService (line 1) | class ConnectionService method ConnectionService (line 7) | public ConnectionService(NotificationService notificationService) method SendRequest (line 12) | public string SendRequest(Member from, Member to) method AcceptRequest (line 34) | public void AcceptRequest(string requestId) FILE: solutions/csharp/linkedIn/Services/NewsFeedService.cs class NewsFeedService (line 1) | class NewsFeedService method AddPost (line 6) | public void AddPost(Member member, Post post) method GetMemberPosts (line 18) | public List GetMemberPosts(Member member) method DisplayFeedForMember (line 26) | public void DisplayFeedForMember(Member member, IFeedSortingStrategy f... FILE: solutions/csharp/linkedIn/Services/NotificationService.cs class NotificationService (line 1) | class NotificationService method SendNotification (line 3) | public void SendNotification(Member member, Notification notification) FILE: solutions/csharp/linkedIn/Services/SearchService.cs class SearchService (line 1) | class SearchService method SearchService (line 5) | public SearchService(ICollection members) method SearchByName (line 10) | public List SearchByName(string name) FILE: solutions/csharp/linkedIn/Strategy/ChronologicalSortStrategy.cs class ChronologicalSortStrategy (line 1) | class ChronologicalSortStrategy : IFeedSortingStrategy method Sort (line 3) | public List Sort(List posts) FILE: solutions/csharp/linkedIn/Strategy/IFeedSortingStrategy.cs type IFeedSortingStrategy (line 1) | interface IFeedSortingStrategy method Sort (line 3) | List Sort(List posts); FILE: solutions/csharp/loggingframework/Appenders/ConsoleAppender.cs class ConsoleAppender (line 1) | class ConsoleAppender : ILogAppender method ConsoleAppender (line 5) | public ConsoleAppender() method Append (line 10) | public void Append(LogMessage logMessage) method Close (line 15) | public void Close() { } method SetFormatter (line 17) | public void SetFormatter(ILogFormatter formatter) method GetFormatter (line 22) | public ILogFormatter GetFormatter() FILE: solutions/csharp/loggingframework/Appenders/FileAppender.cs class FileAppender (line 1) | class FileAppender : ILogAppender method FileAppender (line 7) | public FileAppender(string filePath) method Append (line 21) | public void Append(LogMessage logMessage) method Close (line 40) | public void Close() method SetFormatter (line 55) | public void SetFormatter(ILogFormatter formatter) method GetFormatter (line 60) | public ILogFormatter GetFormatter() FILE: solutions/csharp/loggingframework/Appenders/ILogAppender.cs type ILogAppender (line 1) | interface ILogAppender method Append (line 3) | void Append(LogMessage logMessage); method Close (line 4) | void Close(); method GetFormatter (line 5) | ILogFormatter GetFormatter(); method SetFormatter (line 6) | void SetFormatter(ILogFormatter formatter); FILE: solutions/csharp/loggingframework/AsyncLogProcessor.cs class AsyncLogProcessor (line 3) | class AsyncLogProcessor method AsyncLogProcessor (line 10) | public AsyncLogProcessor() method WorkerLoop (line 20) | private void WorkerLoop() method Process (line 40) | public void Process(LogMessage logMessage, List appenders) method Stop (line 58) | public void Stop() FILE: solutions/csharp/loggingframework/Enum/LogLevel.cs type LogLevel (line 1) | enum LogLevel class LogLevelExtensions (line 10) | static class LogLevelExtensions method IsGreaterOrEqual (line 12) | public static bool IsGreaterOrEqual(this LogLevel level, LogLevel other) FILE: solutions/csharp/loggingframework/Formatters/ILogFormatter.cs type ILogFormatter (line 1) | interface ILogFormatter method Format (line 3) | string Format(LogMessage logMessage); FILE: solutions/csharp/loggingframework/Formatters/SimpleTextFormatter.cs class SimpleTextFormatter (line 1) | class SimpleTextFormatter : ILogFormatter method Format (line 3) | public string Format(LogMessage logMessage) FILE: solutions/csharp/loggingframework/LogManager.cs class LogManager (line 3) | class LogManager method LogManager (line 11) | private LogManager() method GetInstance (line 18) | public static LogManager GetInstance() method GetLogger (line 31) | public Logger GetLogger(string name) method CreateLogger (line 36) | private Logger CreateLogger(string name) method GetRootLogger (line 48) | public Logger GetRootLogger() method GetProcessor (line 53) | public AsyncLogProcessor GetProcessor() method Shutdown (line 58) | public void Shutdown() FILE: solutions/csharp/loggingframework/Logger.cs class Logger (line 1) | class Logger method Logger (line 9) | public Logger(string name, Logger parent) method AddAppender (line 16) | public void AddAppender(ILogAppender appender) method GetAppenders (line 21) | public List GetAppenders() method SetLevel (line 26) | public void SetLevel(LogLevel minLevel) method SetAdditivity (line 31) | public void SetAdditivity(bool additivity) method GetEffectiveLevel (line 36) | public LogLevel GetEffectiveLevel() method Log (line 49) | public void Log(LogLevel messageLevel, string message) method CallAppenders (line 58) | private void CallAppenders(LogMessage logMessage) method Debug (line 70) | public void Debug(string message) method Info (line 75) | public void Info(string message) method Warn (line 80) | public void Warn(string message) method Error (line 85) | public void Error(string message) method Fatal (line 90) | public void Fatal(string message) FILE: solutions/csharp/loggingframework/LoggingFrameworkDemo.cs class LoggingFrameworkDemo (line 8) | public class LoggingFrameworkDemo method Main (line 10) | public static void Main(string[] args) FILE: solutions/csharp/loggingframework/Models/LogMessage.cs class LogMessage (line 1) | class LogMessage method LogMessage (line 9) | public LogMessage(LogLevel level, string loggerName, string message) method GetTimestamp (line 18) | public DateTime GetTimestamp() { return timestamp; } method GetLevel (line 19) | public LogLevel GetLevel() { return level; } method GetLoggerName (line 20) | public string GetLoggerName() { return loggerName; } method GetThreadName (line 21) | public string GetThreadName() { return threadName; } method GetMessage (line 22) | public string GetMessage() { return message; } FILE: solutions/csharp/lrucache/DoublyLinkedList.cs class DoublyLinkedList (line 1) | class DoublyLinkedList method DoublyLinkedList (line 6) | public DoublyLinkedList() method AddFirst (line 14) | public void AddFirst(Node node) method Remove (line 22) | public void Remove(Node node) method MoveToFront (line 28) | public void MoveToFront(Node node) method RemoveLast (line 34) | public Node RemoveLast() FILE: solutions/csharp/lrucache/LRUCache.cs class LRUCache (line 1) | class LRUCache method LRUCache (line 8) | public LRUCache(int capacity) method Get (line 15) | public V Get(K key) method Put (line 26) | public void Put(K key, V value) method Remove (line 50) | public void Remove(K key) FILE: solutions/csharp/lrucache/LRUCacheDemo.cs class LRUCacheDemo (line 4) | public class LRUCacheDemo method Main (line 6) | public static void Main() FILE: solutions/csharp/lrucache/Node.cs class Node (line 1) | class Node method Node (line 8) | public Node(K key, V value) FILE: solutions/csharp/movieticketbookingsystem/BookingManager.cs class BookingManager (line 1) | class BookingManager method BookingManager (line 5) | public BookingManager(SeatLockManager seatLockManager) method CreateBooking (line 10) | public Booking CreateBooking(User user, Show show, List seats, I... FILE: solutions/csharp/movieticketbookingsystem/Enums/PaymentStatus.cs type PaymentStatus (line 1) | enum PaymentStatus FILE: solutions/csharp/movieticketbookingsystem/Enums/SeatStatus.cs type SeatStatus (line 1) | enum SeatStatus FILE: solutions/csharp/movieticketbookingsystem/Enums/SeatType.cs type SeatType (line 1) | enum SeatType class SeatTypeExtensions (line 8) | static class SeatTypeExtensions method GetPrice (line 10) | public static double GetPrice(this SeatType seatType) FILE: solutions/csharp/movieticketbookingsystem/Models/Booking.cs class Booking (line 1) | class Booking method Booking (line 10) | public Booking(string id, User user, Show show, List seats, doub... method ConfirmBooking (line 20) | public void ConfirmBooking() method GetId (line 28) | public string GetId() { return id; } method GetUser (line 29) | public User GetUser() { return user; } method GetShow (line 30) | public Show GetShow() { return show; } method GetSeats (line 31) | public List GetSeats() { return seats; } method GetTotalAmount (line 32) | public double GetTotalAmount() { return totalAmount; } method GetPayment (line 33) | public Payment GetPayment() { return payment; } class BookingBuilder (line 36) | class BookingBuilder method SetId (line 45) | public BookingBuilder SetId(string id) method SetUser (line 51) | public BookingBuilder SetUser(User user) method SetShow (line 57) | public BookingBuilder SetShow(Show show) method SetSeats (line 63) | public BookingBuilder SetSeats(List seats) method SetTotalAmount (line 69) | public BookingBuilder SetTotalAmount(double totalAmount) method SetPayment (line 75) | public BookingBuilder SetPayment(Payment payment) method Build (line 81) | public Booking Build() FILE: solutions/csharp/movieticketbookingsystem/Models/Cinema.cs class Cinema (line 1) | class Cinema method Cinema (line 8) | public Cinema(string id, string name, City city, List screens) method GetId (line 16) | public string GetId() { return id; } method GetName (line 17) | public string GetName() { return name; } method GetCity (line 18) | public City GetCity() { return city; } method GetScreens (line 19) | public List GetScreens() { return screens; } FILE: solutions/csharp/movieticketbookingsystem/Models/City.cs class City (line 1) | class City method City (line 6) | public City(string id, string name) method GetId (line 12) | public string GetId() { return id; } method GetName (line 13) | public string GetName() { return name; } FILE: solutions/csharp/movieticketbookingsystem/Models/Movie.cs class Movie (line 1) | class Movie : MovieSubject method Movie (line 7) | public Movie(string id, string title, int durationInMinutes) method GetId (line 14) | public string GetId() { return id; } method GetTitle (line 15) | public string GetTitle() { return title; } FILE: solutions/csharp/movieticketbookingsystem/Models/Payment.cs class Payment (line 1) | class Payment method Payment (line 8) | public Payment(double amount, PaymentStatus status, string transactionId) method GetStatus (line 16) | public PaymentStatus GetStatus() { return status; } FILE: solutions/csharp/movieticketbookingsystem/Models/Screen.cs class Screen (line 1) | class Screen method Screen (line 6) | public Screen(string id) method AddSeat (line 12) | public void AddSeat(Seat seat) method GetId (line 17) | public string GetId() { return id; } method GetSeats (line 18) | public List GetSeats() { return seats; } FILE: solutions/csharp/movieticketbookingsystem/Models/Seat.cs class Seat (line 1) | class Seat method Seat (line 9) | public Seat(string id, int row, int col, SeatType type) method GetId (line 18) | public string GetId() { return id; } method GetRow (line 19) | public int GetRow() { return row; } method GetCol (line 20) | public int GetCol() { return col; } method GetSeatType (line 21) | public SeatType GetSeatType() { return type; } method GetStatus (line 22) | public SeatStatus GetStatus() { return status; } method SetStatus (line 23) | public void SetStatus(SeatStatus status) { this.status = status; } FILE: solutions/csharp/movieticketbookingsystem/Models/Show.cs class Show (line 1) | class Show method Show (line 9) | public Show(string id, Movie movie, Screen screen, DateTime startTime,... method GetId (line 18) | public string GetId() { return id; } method GetMovie (line 19) | public Movie GetMovie() { return movie; } method GetScreen (line 20) | public Screen GetScreen() { return screen; } method GetStartTime (line 21) | public DateTime GetStartTime() { return startTime; } method GetPricingStrategy (line 22) | public IPricingStrategy GetPricingStrategy() { return pricingStrategy; } FILE: solutions/csharp/movieticketbookingsystem/Models/User.cs class User (line 1) | class User method User (line 7) | public User(string name, string email) method GetId (line 14) | public string GetId() { return id; } method GetName (line 15) | public string GetName() { return name; } FILE: solutions/csharp/movieticketbookingsystem/MovieBookingDemo.cs class MovieBookingDemo (line 7) | public class MovieBookingDemo method Main (line 9) | public static void Main(string[] args) FILE: solutions/csharp/movieticketbookingsystem/MovieBookingService.cs class MovieBookingService (line 1) | class MovieBookingService method MovieBookingService (line 15) | private MovieBookingService() method GetInstance (line 27) | public static MovieBookingService GetInstance() method GetBookingManager (line 42) | public BookingManager GetBookingManager() method AddCity (line 47) | public City AddCity(string id, string name) method AddCinema (line 54) | public Cinema AddCinema(string id, string name, string cityId, List de... method FindShows (line 91) | public List FindShows(string movieTitle, string cityName) method FindCinemaForShow (line 108) | private Cinema FindCinemaForShow(Show show) method Shutdown (line 113) | public void Shutdown() FILE: solutions/csharp/movieticketbookingsystem/Observer/IMovieObserver.cs type IMovieObserver (line 1) | interface IMovieObserver method Update (line 3) | void Update(Movie movie); FILE: solutions/csharp/movieticketbookingsystem/Observer/MovieSubject.cs class MovieSubject (line 1) | abstract class MovieSubject method AddObserver (line 5) | public void AddObserver(IMovieObserver observer) method RemoveObserver (line 10) | public void RemoveObserver(IMovieObserver observer) method NotifyObservers (line 15) | public void NotifyObservers() FILE: solutions/csharp/movieticketbookingsystem/Observer/UserObserver.cs class UserObserver (line 1) | class UserObserver : IMovieObserver method UserObserver (line 5) | public UserObserver(User user) method Update (line 10) | public void Update(Movie movie) FILE: solutions/csharp/movieticketbookingsystem/SeatLockManager.cs class SeatLockManager (line 1) | class SeatLockManager method LockSeats (line 7) | public void LockSeats(Show show, List seats, string userId) method UnlockSeats (line 44) | public void UnlockSeats(Show show, List seats, string userId) method Shutdown (line 75) | public void Shutdown() FILE: solutions/csharp/movieticketbookingsystem/Strategies/Payment/CreditCardPaymentStrategy.cs class CreditCardPaymentStrategy (line 1) | class CreditCardPaymentStrategy : IPaymentStrategy method CreditCardPaymentStrategy (line 6) | public CreditCardPaymentStrategy(string cardNumber, string cvv) method Pay (line 12) | public Payment Pay(double amount) FILE: solutions/csharp/movieticketbookingsystem/Strategies/Payment/IPaymentStrategy.cs type IPaymentStrategy (line 1) | interface IPaymentStrategy method Pay (line 3) | Payment Pay(double amount); FILE: solutions/csharp/movieticketbookingsystem/Strategies/Pricing/IPricingStrategy.cs type IPricingStrategy (line 1) | interface IPricingStrategy method CalculatePrice (line 3) | double CalculatePrice(List seats); FILE: solutions/csharp/movieticketbookingsystem/Strategies/Pricing/WeekdayPricingStrategy.cs class WeekdayPricingStrategy (line 1) | class WeekdayPricingStrategy : IPricingStrategy method CalculatePrice (line 3) | public double CalculatePrice(List seats) FILE: solutions/csharp/movieticketbookingsystem/Strategies/Pricing/WeekendPricingStrategy.cs class WeekendPricingStrategy (line 1) | class WeekendPricingStrategy : IPricingStrategy method CalculatePrice (line 5) | public double CalculatePrice(List seats) FILE: solutions/csharp/musicstreamingservice/Commands/ICommand.cs type ICommand (line 1) | interface ICommand method Execute (line 3) | void Execute(); FILE: solutions/csharp/musicstreamingservice/Commands/NextTrackCommand.cs class NextTrackCommand (line 1) | class NextTrackCommand : ICommand method NextTrackCommand (line 5) | public NextTrackCommand(Player player) method Execute (line 10) | public void Execute() FILE: solutions/csharp/musicstreamingservice/Commands/PauseCommand.cs class PauseCommand (line 1) | class PauseCommand : ICommand method PauseCommand (line 5) | public PauseCommand(Player player) method Execute (line 10) | public void Execute() FILE: solutions/csharp/musicstreamingservice/Commands/PlayCommand.cs class PlayCommand (line 1) | class PlayCommand : ICommand method PlayCommand (line 5) | public PlayCommand(Player player) method Execute (line 10) | public void Execute() FILE: solutions/csharp/musicstreamingservice/Enums/PlayerStatus.cs type PlayerStatus (line 1) | enum PlayerStatus FILE: solutions/csharp/musicstreamingservice/Enums/SubscriptionTier.cs type SubscriptionTier (line 1) | enum SubscriptionTier FILE: solutions/csharp/musicstreamingservice/Models/Album.cs class Album (line 1) | class Album : IPlayable method Album (line 6) | public Album(string title) method AddTrack (line 11) | public void AddTrack(Song song) method GetTracks (line 16) | public List GetTracks() method GetTitle (line 21) | public string GetTitle() => title; FILE: solutions/csharp/musicstreamingservice/Models/Artist.cs class Artist (line 1) | class Artist : Subject method Artist (line 7) | public Artist(string id, string name) method ReleaseAlbum (line 13) | public void ReleaseAlbum(Album album) method GetId (line 20) | public string GetId() => id; method GetName (line 21) | public string GetName() => name; FILE: solutions/csharp/musicstreamingservice/Models/IPlayable.cs type IPlayable (line 1) | interface IPlayable method GetTracks (line 3) | List GetTracks(); FILE: solutions/csharp/musicstreamingservice/Models/Player.cs class Player (line 1) | class Player method Player (line 10) | public Player() method Load (line 16) | public void Load(IPlayable playable, User user) method PlayCurrentSongInQueue (line 25) | public void PlayCurrentSongInQueue() method ClickPlay (line 34) | public void ClickPlay() => state.Play(this); method ClickPause (line 35) | public void ClickPause() => state.Pause(this); method ClickNext (line 37) | public void ClickNext() method ChangeState (line 51) | public void ChangeState(PlayerState state) => this.state = state; method SetStatus (line 52) | public void SetStatus(PlayerStatus status) => this.status = status; method SetCurrentSong (line 53) | public void SetCurrentSong(Song song) => this.currentSong = song; method HasQueue (line 54) | public bool HasQueue() => queue.Count > 0; FILE: solutions/csharp/musicstreamingservice/Models/Playlist.cs class Playlist (line 1) | class Playlist : IPlayable method Playlist (line 6) | public Playlist(string name) method AddTrack (line 11) | public void AddTrack(Song song) method GetTracks (line 16) | public List GetTracks() FILE: solutions/csharp/musicstreamingservice/Models/Song.cs class Song (line 1) | class Song : IPlayable method Song (line 8) | public Song(string id, string title, Artist artist, int durationInSeco... method GetTracks (line 16) | public List GetTracks() method ToString (line 21) | public override string ToString() method GetId (line 26) | public string GetId() => id; method GetTitle (line 27) | public string GetTitle() => title; method GetArtist (line 28) | public Artist GetArtist() => artist; FILE: solutions/csharp/musicstreamingservice/Models/User.cs class User (line 1) | class User : IArtistObserver method User (line 8) | public User(string id, string name, PlaybackStrategy strategy) method FollowArtist (line 15) | public void FollowArtist(Artist artist) method Update (line 21) | public void Update(Artist artist, Album newAlbum) method GetPlaybackStrategy (line 27) | public PlaybackStrategy GetPlaybackStrategy() => playbackStrategy; method GetId (line 28) | public string GetId() => id; method GetName (line 29) | public string GetName() => name; class UserBuilder (line 32) | class UserBuilder method UserBuilder (line 38) | public UserBuilder(string name) method WithSubscription (line 44) | public UserBuilder WithSubscription(SubscriptionTier tier, int songsPl... method Build (line 50) | public User Build() FILE: solutions/csharp/musicstreamingservice/MusicStreamingDemo.cs class MusicStreamingDemo (line 6) | public class MusicStreamingDemo method Main (line 8) | public static void Main(string[] args) FILE: solutions/csharp/musicstreamingservice/MusicStreamingSystem.cs class MusicStreamingSystem (line 1) | class MusicStreamingSystem method MusicStreamingSystem (line 12) | private MusicStreamingSystem() method GetInstance (line 19) | public static MusicStreamingSystem GetInstance() method RegisterUser (line 34) | public void RegisterUser(User user) method AddSong (line 39) | public Song AddSong(string id, string title, string artistId, int dura... method AddArtist (line 46) | public void AddArtist(Artist artist) method SearchSongsByTitle (line 51) | public List SearchSongsByTitle(string title) method GetSongRecommendations (line 56) | public List GetSongRecommendations() method GetPlayer (line 61) | public Player GetPlayer() => player; FILE: solutions/csharp/musicstreamingservice/Observer/IArtistObserver.cs type IArtistObserver (line 1) | interface IArtistObserver method Update (line 3) | void Update(Artist artist, Album newAlbum); FILE: solutions/csharp/musicstreamingservice/Observer/Subject.cs class Subject (line 1) | abstract class Subject method AddObserver (line 5) | public void AddObserver(IArtistObserver observer) method RemoveObserver (line 10) | public void RemoveObserver(IArtistObserver observer) method NotifyObservers (line 15) | public void NotifyObservers(Artist artist, Album album) FILE: solutions/csharp/musicstreamingservice/Services/RecommendationService.cs class RecommendationService (line 1) | class RecommendationService method RecommendationService (line 5) | public RecommendationService(RecommendationStrategy strategy) method SetStrategy (line 10) | public void SetStrategy(RecommendationStrategy strategy) method GenerateRecommendations (line 15) | public List GenerateRecommendations(List allSongs) FILE: solutions/csharp/musicstreamingservice/Services/SearchService.cs class SearchService (line 1) | class SearchService method SearchSongsByTitle (line 3) | public List SearchSongsByTitle(List songs, string query) method SearchArtistsByName (line 8) | public List SearchArtistsByName(List artists, string q... FILE: solutions/csharp/musicstreamingservice/States/PausedState.cs class PausedState (line 1) | class PausedState : PlayerState method Play (line 3) | public override void Play(Player player) method Pause (line 10) | public override void Pause(Player player) method Stop (line 15) | public override void Stop(Player player) FILE: solutions/csharp/musicstreamingservice/States/PlayerState.cs class PlayerState (line 1) | abstract class PlayerState method Play (line 3) | public abstract void Play(Player player); method Pause (line 4) | public abstract void Pause(Player player); method Stop (line 5) | public abstract void Stop(Player player); FILE: solutions/csharp/musicstreamingservice/States/PlayingState.cs class PlayingState (line 1) | class PlayingState : PlayerState method Play (line 3) | public override void Play(Player player) method Pause (line 8) | public override void Pause(Player player) method Stop (line 15) | public override void Stop(Player player) FILE: solutions/csharp/musicstreamingservice/States/StoppedState.cs class StoppedState (line 1) | class StoppedState : PlayerState method Play (line 3) | public override void Play(Player player) method Pause (line 18) | public override void Pause(Player player) method Stop (line 23) | public override void Stop(Player player) FILE: solutions/csharp/musicstreamingservice/Strategies/Playback/FreePlaybackStrategy.cs class FreePlaybackStrategy (line 1) | class FreePlaybackStrategy : PlaybackStrategy method FreePlaybackStrategy (line 6) | public FreePlaybackStrategy(int initialSongsPlayed) method Play (line 11) | public override void Play(Song song, Player player) FILE: solutions/csharp/musicstreamingservice/Strategies/Playback/PlaybackStrategy.cs class PlaybackStrategy (line 1) | abstract class PlaybackStrategy method Play (line 3) | public abstract void Play(Song song, Player player); method GetStrategy (line 5) | public static PlaybackStrategy GetStrategy(SubscriptionTier tier, int ... FILE: solutions/csharp/musicstreamingservice/Strategies/Playback/PremiumPlaybackStrategy.cs class PremiumPlaybackStrategy (line 1) | class PremiumPlaybackStrategy : PlaybackStrategy method Play (line 3) | public override void Play(Song song, Player player) FILE: solutions/csharp/musicstreamingservice/Strategies/Recommendation/GenreBasedRecommendationStrategy.cs class GenreBasedRecommendationStrategy (line 1) | class GenreBasedRecommendationStrategy : RecommendationStrategy method Recommend (line 3) | public override List Recommend(List allSongs) FILE: solutions/csharp/musicstreamingservice/Strategies/Recommendation/RecommendationStrategy.cs class RecommendationStrategy (line 1) | abstract class RecommendationStrategy method Recommend (line 3) | public abstract List Recommend(List allSongs); FILE: solutions/csharp/onlineauctionsystem/AuctionService.cs class AuctionService (line 3) | class AuctionService method AuctionService (line 12) | private AuctionService() method GetInstance (line 20) | public static AuctionService GetInstance() method CreateUser (line 35) | public User CreateUser(string name) method GetUser (line 42) | public User GetUser(string userId) method CreateAuction (line 48) | public Auction CreateAuction(string itemName, string description, deci... method ViewActiveAuctions (line 71) | public List ViewActiveAuctions() method PlaceBid (line 76) | public void PlaceBid(string auctionId, string bidderId, decimal amount) method EndAuction (line 82) | public void EndAuction(string auctionId) method GetAuction (line 88) | public Auction GetAuction(string auctionId) method Shutdown (line 97) | public void Shutdown() FILE: solutions/csharp/onlineauctionsystem/AuctionSystemDemo.cs class AuctionSystemDemo (line 7) | public class AuctionSystemDemo method Main (line 9) | public static void Main(string[] args) FILE: solutions/csharp/onlineauctionsystem/Enum/AuctionState.cs type AuctionState (line 1) | enum AuctionState FILE: solutions/csharp/onlineauctionsystem/Models/Auction.cs class Auction (line 1) | class Auction method Auction (line 14) | public Auction(string itemName, string description, decimal startingPr... method PlaceBid (line 26) | public void PlaceBid(User bidder, decimal amount) method EndAuction (line 63) | public void EndAuction() method GetHighestBid (line 90) | public Bid GetHighestBid() method IsActive (line 99) | public bool IsActive() method AddObserver (line 104) | private void AddObserver(IAuctionObserver observer) method NotifyAllObservers (line 109) | private void NotifyAllObservers(string message) method NotifyObserver (line 117) | private void NotifyObserver(IAuctionObserver observer, string message) method GetId (line 122) | public string GetId() { return id; } method GetItemName (line 123) | public string GetItemName() { return itemName; } method GetBidHistory (line 124) | public List GetBidHistory() { return new List(bids); } method GetState (line 125) | public AuctionState GetState() { return state; } method GetWinningBid (line 126) | public Bid GetWinningBid() { return winningBid; } FILE: solutions/csharp/onlineauctionsystem/Models/Bid.cs class Bid (line 1) | class Bid : IComparable method Bid (line 7) | public Bid(User bidder, decimal amount) method GetBidder (line 14) | public User GetBidder() method GetAmount (line 19) | public decimal GetAmount() method GetTimestamp (line 24) | public DateTime GetTimestamp() method CompareTo (line 29) | public int CompareTo(Bid other) method ToString (line 39) | public override string ToString() FILE: solutions/csharp/onlineauctionsystem/Models/User.cs class User (line 1) | class User : IAuctionObserver method User (line 6) | public User(string name) method GetId (line 12) | public string GetId() method GetName (line 17) | public string GetName() method OnUpdate (line 22) | public void OnUpdate(Auction auction, string message) method Equals (line 30) | public override bool Equals(object obj) method GetHashCode (line 38) | public override int GetHashCode() FILE: solutions/csharp/onlineauctionsystem/Observer/IAuctionObserver.cs type IAuctionObserver (line 1) | interface IAuctionObserver method OnUpdate (line 3) | void OnUpdate(Auction auction, string message); FILE: solutions/csharp/onlineshoppingservice/Decorators/GiftWrapDecorator.cs class GiftWrapDecorator (line 1) | class GiftWrapDecorator : ProductDecorator method GiftWrapDecorator (line 5) | public GiftWrapDecorator(Product product) : base(product) { } method GetPrice (line 7) | public override double GetPrice() method GetDescription (line 12) | public override string GetDescription() FILE: solutions/csharp/onlineshoppingservice/Decorators/ProductDecorator.cs class ProductDecorator (line 1) | abstract class ProductDecorator : Product method ProductDecorator (line 5) | public ProductDecorator(Product product) method GetId (line 10) | public override string GetId() { return decoratedProduct.GetId(); } method GetName (line 11) | public override string GetName() { return decoratedProduct.GetName(); } method GetPrice (line 12) | public override double GetPrice() { return decoratedProduct.GetPrice(); } method GetDescription (line 13) | public override string GetDescription() { return decoratedProduct.GetD... method GetCategory (line 14) | public override ProductCategory GetCategory() { return decoratedProduc... FILE: solutions/csharp/onlineshoppingservice/Enums/OrderStatus.cs type OrderStatus (line 1) | enum OrderStatus FILE: solutions/csharp/onlineshoppingservice/Enums/ProductCategory.cs type ProductCategory (line 1) | enum ProductCategory FILE: solutions/csharp/onlineshoppingservice/Exceptions/OutOfStockException.cs class OutOfStockException (line 1) | class OutOfStockException : Exception method OutOfStockException (line 3) | public OutOfStockException(string message) : base(message) { } FILE: solutions/csharp/onlineshoppingservice/Models/Account.cs class Account (line 1) | class Account method Account (line 7) | public Account(string username, string password) method GetCart (line 14) | public ShoppingCart GetCart() { return cart; } FILE: solutions/csharp/onlineshoppingservice/Models/Address.cs class Address (line 1) | class Address method Address (line 8) | public Address(string street, string city, string state, string zipCode) method ToString (line 16) | public override string ToString() FILE: solutions/csharp/onlineshoppingservice/Models/CartItem.cs class CartItem (line 1) | class CartItem method CartItem (line 6) | public CartItem(Product product, int quantity) method GetProduct (line 12) | public Product GetProduct() { return product; } method GetQuantity (line 13) | public int GetQuantity() { return quantity; } method IncrementQuantity (line 14) | public void IncrementQuantity(int amount) { quantity += amount; } method GetPrice (line 15) | public double GetPrice() { return product.GetPrice() * quantity; } FILE: solutions/csharp/onlineshoppingservice/Models/Customer.cs class Customer (line 1) | class Customer : IOrderObserver method Customer (line 9) | public Customer(string name, string email, string password, Address sh... method Update (line 18) | public void Update(Order order) method GetId (line 23) | public string GetId() { return id; } method GetName (line 24) | public string GetName() { return name; } method GetAccount (line 25) | public Account GetAccount() { return account; } method GetShippingAddress (line 26) | public Address GetShippingAddress() { return shippingAddress; } method SetShippingAddress (line 27) | public void SetShippingAddress(Address address) { shippingAddress = ad... FILE: solutions/csharp/onlineshoppingservice/Models/Order.cs class Order (line 1) | class Order : Subject method Order (line 12) | public Order(Customer customer, List items, Address shi... method ShipOrder (line 25) | public void ShipOrder() { currentState.Ship(this); } method DeliverOrder (line 26) | public void DeliverOrder() { currentState.Deliver(this); } method CancelOrder (line 27) | public void CancelOrder() { currentState.Cancel(this); } method GetId (line 29) | public string GetId() { return id; } method GetStatus (line 30) | public OrderStatus GetStatus() { return status; } method SetState (line 31) | public void SetState(IOrderState state) { currentState = state; } method SetStatus (line 32) | public void SetStatus(OrderStatus status) method GetItems (line 37) | public List GetItems() { return items; } FILE: solutions/csharp/onlineshoppingservice/Models/OrderLineItem.cs class OrderLineItem (line 1) | class OrderLineItem method OrderLineItem (line 8) | public OrderLineItem(string productId, string productName, int quantit... method GetProductId (line 16) | public string GetProductId() { return productId; } method GetQuantity (line 17) | public int GetQuantity() { return quantity; } FILE: solutions/csharp/onlineshoppingservice/Models/Product.cs class Product (line 1) | abstract class Product method GetId (line 9) | public abstract string GetId(); method GetName (line 10) | public abstract string GetName(); method GetDescription (line 11) | public abstract string GetDescription(); method GetPrice (line 12) | public abstract double GetPrice(); method GetCategory (line 13) | public abstract ProductCategory GetCategory(); class BaseProduct (line 16) | class BaseProduct : Product method BaseProduct (line 18) | public BaseProduct(string id, string name, string description, double ... method GetId (line 27) | public override string GetId() { return id; } method GetName (line 28) | public override string GetName() { return name; } method GetDescription (line 29) | public override string GetDescription() { return description; } method GetPrice (line 30) | public override double GetPrice() { return price; } method GetCategory (line 31) | public override ProductCategory GetCategory() { return category; } class ProductBuilder (line 34) | class ProductBuilder method ProductBuilder (line 41) | public ProductBuilder(string name, double price) method WithDescription (line 47) | public ProductBuilder WithDescription(string description) method WithCategory (line 53) | public ProductBuilder WithCategory(ProductCategory category) method Build (line 59) | public Product Build() FILE: solutions/csharp/onlineshoppingservice/Models/ShoppingCart.cs class ShoppingCart (line 1) | class ShoppingCart method AddItem (line 5) | public void AddItem(Product product, int quantity) method RemoveItem (line 17) | public void RemoveItem(string productId) method GetItems (line 22) | public Dictionary GetItems() method CalculateTotal (line 27) | public double CalculateTotal() method ClearCart (line 32) | public void ClearCart() FILE: solutions/csharp/onlineshoppingservice/Observer/IOrderObserver.cs type IOrderObserver (line 1) | interface IOrderObserver method Update (line 3) | void Update(Order order); FILE: solutions/csharp/onlineshoppingservice/Observer/Subject.cs class Subject (line 1) | abstract class Subject method AddObserver (line 5) | public void AddObserver(IOrderObserver observer) method RemoveObserver (line 10) | public void RemoveObserver(IOrderObserver observer) method NotifyObservers (line 15) | public void NotifyObservers(Order order) FILE: solutions/csharp/onlineshoppingservice/OnlineShoppingDemo.cs class OnlineShoppingDemo (line 6) | public class OnlineShoppingDemo method Main (line 8) | public static void Main() FILE: solutions/csharp/onlineshoppingservice/OnlineShoppingSystem.cs class OnlineShoppingSystem (line 1) | class OnlineShoppingSystem method OnlineShoppingSystem (line 15) | private OnlineShoppingSystem() method GetInstance (line 23) | public static OnlineShoppingSystem GetInstance() method AddProduct (line 38) | public void AddProduct(Product product, int initialStock) method RegisterCustomer (line 44) | public Customer RegisterCustomer(string name, string email, string pas... method AddToCart (line 51) | public void AddToCart(string customerId, string productId, int quantity) method GetCustomerCart (line 58) | public ShoppingCart GetCustomerCart(string customerId) method SearchProducts (line 64) | public List SearchProducts(string name) method PlaceOrder (line 69) | public Order PlaceOrder(string customerId, IPaymentStrategy paymentStr... FILE: solutions/csharp/onlineshoppingservice/Services/InventoryService.cs class InventoryService (line 1) | class InventoryService method AddStock (line 6) | public void AddStock(Product product, int quantity) method UpdateStockForOrder (line 18) | public void UpdateStockForOrder(List items) FILE: solutions/csharp/onlineshoppingservice/Services/OrderService.cs class OrderService (line 1) | class OrderService method OrderService (line 5) | public OrderService(InventoryService inventoryService) method CreateOrder (line 10) | public Order CreateOrder(Customer customer, ShoppingCart cart) FILE: solutions/csharp/onlineshoppingservice/Services/PaymentService.cs class PaymentService (line 1) | class PaymentService method ProcessPayment (line 3) | public bool ProcessPayment(IPaymentStrategy strategy, double amount) FILE: solutions/csharp/onlineshoppingservice/Services/SearchService.cs class SearchService (line 1) | class SearchService method SearchService (line 5) | public SearchService(ICollection productCatalog) method SearchByName (line 10) | public List SearchByName(string name) method SearchByCategory (line 17) | public List SearchByCategory(ProductCategory category) FILE: solutions/csharp/onlineshoppingservice/States/CancelledState.cs class CancelledState (line 1) | class CancelledState : IOrderState method Ship (line 3) | public void Ship(Order order) method Deliver (line 8) | public void Deliver(Order order) method Cancel (line 13) | public void Cancel(Order order) FILE: solutions/csharp/onlineshoppingservice/States/DeliveredState.cs class DeliveredState (line 1) | class DeliveredState : IOrderState method Ship (line 3) | public void Ship(Order order) method Deliver (line 8) | public void Deliver(Order order) method Cancel (line 13) | public void Cancel(Order order) FILE: solutions/csharp/onlineshoppingservice/States/IOrderState.cs type IOrderState (line 1) | interface IOrderState method Ship (line 3) | void Ship(Order order); method Deliver (line 4) | void Deliver(Order order); method Cancel (line 5) | void Cancel(Order order); FILE: solutions/csharp/onlineshoppingservice/States/PlacedState.cs class PlacedState (line 1) | class PlacedState : IOrderState method Ship (line 3) | public void Ship(Order order) method Deliver (line 10) | public void Deliver(Order order) method Cancel (line 15) | public void Cancel(Order order) FILE: solutions/csharp/onlineshoppingservice/States/ShippedState.cs class ShippedState (line 1) | class ShippedState : IOrderState method Ship (line 3) | public void Ship(Order order) method Deliver (line 8) | public void Deliver(Order order) method Cancel (line 15) | public void Cancel(Order order) FILE: solutions/csharp/onlineshoppingservice/Strategy/CreditCardPaymentStrategy.cs class CreditCardPaymentStrategy (line 1) | class CreditCardPaymentStrategy : IPaymentStrategy method CreditCardPaymentStrategy (line 5) | public CreditCardPaymentStrategy(string cardNumber) method Pay (line 10) | public bool Pay(double amount) FILE: solutions/csharp/onlineshoppingservice/Strategy/IPaymentStrategy.cs type IPaymentStrategy (line 1) | interface IPaymentStrategy method Pay (line 3) | bool Pay(double amount); FILE: solutions/csharp/onlineshoppingservice/Strategy/UPIPaymentStrategy.cs class UPIPaymentStrategy (line 1) | class UPIPaymentStrategy : IPaymentStrategy method UPIPaymentStrategy (line 5) | public UPIPaymentStrategy(string upiId) method Pay (line 10) | public bool Pay(double amount) FILE: solutions/csharp/onlinestockbrokeragesystem/Commands/BuyStockCommand.cs class BuyStockCommand (line 1) | class BuyStockCommand : IOrderCommand method BuyStockCommand (line 7) | public BuyStockCommand(Account account, Order order) method Execute (line 14) | public void Execute() FILE: solutions/csharp/onlinestockbrokeragesystem/Commands/IOrderCommand.cs type IOrderCommand (line 1) | interface IOrderCommand method Execute (line 3) | void Execute(); FILE: solutions/csharp/onlinestockbrokeragesystem/Commands/SellStockCommand.cs class SellStockCommand (line 1) | class SellStockCommand : IOrderCommand method SellStockCommand (line 7) | public SellStockCommand(Account account, Order order) method Execute (line 14) | public void Execute() FILE: solutions/csharp/onlinestockbrokeragesystem/Enums/OrderStatus.cs type OrderStatus (line 1) | enum OrderStatus FILE: solutions/csharp/onlinestockbrokeragesystem/Enums/OrderType.cs type OrderType (line 1) | enum OrderType FILE: solutions/csharp/onlinestockbrokeragesystem/Enums/TransactionType.cs type TransactionType (line 1) | enum TransactionType FILE: solutions/csharp/onlinestockbrokeragesystem/Exceptions/InsufficientFundsException.cs class InsufficientFundsException (line 1) | class InsufficientFundsException : Exception method InsufficientFundsException (line 3) | public InsufficientFundsException(string message) : base(message) { } FILE: solutions/csharp/onlinestockbrokeragesystem/Exceptions/InsufficientStockException.cs class InsufficientStockException (line 1) | class InsufficientStockException : Exception method InsufficientStockException (line 3) | public InsufficientStockException(string message) : base(message) { } FILE: solutions/csharp/onlinestockbrokeragesystem/Models/Account.cs class Account (line 1) | class Account method Account (line 7) | public Account(double initialCash) method Debit (line 13) | public void Debit(double amount) method Credit (line 25) | public void Credit(double amount) method AddStock (line 33) | public void AddStock(string symbol, int quantity) method RemoveStock (line 45) | public void RemoveStock(string symbol, int quantity) method GetBalance (line 58) | public double GetBalance() { return balance; } method GetPortfolio (line 59) | public Dictionary GetPortfolio() { return new Dictionary<... method GetStockQuantity (line 60) | public int GetStockQuantity(string symbol) { return portfolio.Contains... FILE: solutions/csharp/onlinestockbrokeragesystem/Models/Order.cs class Order (line 1) | class Order method Order (line 14) | public Order(string orderId, User user, Stock stock, OrderType type, i... method Cancel (line 29) | public void Cancel() method GetOrderId (line 35) | public string GetOrderId() { return orderId; } method GetUser (line 36) | public User GetUser() { return user; } method GetStock (line 37) | public Stock GetStock() { return stock; } method GetOrderType (line 38) | public OrderType GetOrderType() { return type; } method GetQuantity (line 39) | public int GetQuantity() { return quantity; } method GetPrice (line 40) | public double GetPrice() { return price; } method GetStatus (line 41) | public OrderStatus GetStatus() { return status; } method GetExecutionStrategy (line 42) | public IExecutionStrategy GetExecutionStrategy() { return executionStr... method SetState (line 45) | public void SetState(IOrderState state) method SetStatus (line 50) | public void SetStatus(OrderStatus status) method NotifyOwner (line 56) | private void NotifyOwner() FILE: solutions/csharp/onlinestockbrokeragesystem/Models/OrderBuilder.cs class OrderBuilder (line 1) | class OrderBuilder method ForUser (line 10) | public OrderBuilder ForUser(User user) method WithStock (line 16) | public OrderBuilder WithStock(Stock stock) method Buy (line 22) | public OrderBuilder Buy(int quantity) method Sell (line 29) | public OrderBuilder Sell(int quantity) method AtMarketPrice (line 36) | public OrderBuilder AtMarketPrice() method WithLimit (line 43) | public OrderBuilder WithLimit(double limitPrice) method Build (line 50) | public Order Build() FILE: solutions/csharp/onlinestockbrokeragesystem/Models/Stock.cs class Stock (line 1) | class Stock method Stock (line 7) | public Stock(string symbol, double initialPrice) method GetSymbol (line 13) | public string GetSymbol() { return symbol; } method GetPrice (line 14) | public double GetPrice() { return price; } method SetPrice (line 16) | public void SetPrice(double newPrice) method AddObserver (line 25) | public void AddObserver(IStockObserver observer) method RemoveObserver (line 30) | public void RemoveObserver(IStockObserver observer) method NotifyObservers (line 35) | private void NotifyObservers() FILE: solutions/csharp/onlinestockbrokeragesystem/Models/User.cs class User (line 1) | class User : IStockObserver method User (line 7) | public User(string name, double initialCash) method GetUserId (line 14) | public string GetUserId() { return userId; } method GetName (line 15) | public string GetName() { return name; } method GetAccount (line 16) | public Account GetAccount() { return account; } method Update (line 18) | public void Update(Stock stock) method OrderStatusUpdate (line 23) | public void OrderStatusUpdate(Order order) FILE: solutions/csharp/onlinestockbrokeragesystem/Observer/IStockObserver.cs type IStockObserver (line 1) | interface IStockObserver method Update (line 3) | void Update(Stock stock); FILE: solutions/csharp/onlinestockbrokeragesystem/States/CancelledState.cs class CancelledState (line 1) | class CancelledState : IOrderState method Handle (line 3) | public void Handle(Order order) method Cancel (line 8) | public void Cancel(Order order) FILE: solutions/csharp/onlinestockbrokeragesystem/States/FilledState.cs class FilledState (line 1) | class FilledState : IOrderState method Handle (line 3) | public void Handle(Order order) method Cancel (line 8) | public void Cancel(Order order) FILE: solutions/csharp/onlinestockbrokeragesystem/States/IOrderState.cs type IOrderState (line 1) | interface IOrderState method Handle (line 3) | void Handle(Order order); method Cancel (line 4) | void Cancel(Order order); FILE: solutions/csharp/onlinestockbrokeragesystem/States/OpenState.cs class OpenState (line 1) | class OpenState : IOrderState method Handle (line 3) | public void Handle(Order order) method Cancel (line 8) | public void Cancel(Order order) FILE: solutions/csharp/onlinestockbrokeragesystem/StockBrokerageSystem.cs class StockBrokerageSystem (line 1) | class StockBrokerageSystem method StockBrokerageSystem (line 8) | private StockBrokerageSystem() method GetInstance (line 14) | public static StockBrokerageSystem GetInstance() method RegisterUser (line 29) | public User RegisterUser(string name, double initialAmount) method AddStock (line 36) | public Stock AddStock(string symbol, double initialPrice) method PlaceBuyOrder (line 43) | public void PlaceBuyOrder(Order order) method PlaceSellOrder (line 50) | public void PlaceSellOrder(Order order) method CancelOrder (line 57) | public void CancelOrder(Order order) FILE: solutions/csharp/onlinestockbrokeragesystem/StockBrokerageSystemDemo.cs class StockBrokerageSystemDemo (line 7) | public class StockBrokerageSystemDemo method Main (line 9) | public static void Main(string[] args) method PrintAccountStatus (line 88) | private static void PrintAccountStatus(User user) FILE: solutions/csharp/onlinestockbrokeragesystem/StockExchange.cs class StockExchange (line 1) | class StockExchange method StockExchange (line 9) | private StockExchange() method GetInstance (line 15) | public static StockExchange GetInstance() method PlaceBuyOrder (line 30) | public void PlaceBuyOrder(Order order) method PlaceSellOrder (line 40) | public void PlaceSellOrder(Order order) method MatchOrders (line 50) | private void MatchOrders(Stock stock) method ExecuteTrade (line 81) | private void ExecuteTrade(Order buyOrder, Order sellOrder, double trad... method UpdateOrderStatus (line 108) | private void UpdateOrderStatus(Order order, int quantityTraded) method FindBestBuy (line 122) | private Order FindBestBuy(List buys) method FindBestSell (line 130) | private Order FindBestSell(List sells) FILE: solutions/csharp/onlinestockbrokeragesystem/Strategy/IExecutionStrategy.cs type IExecutionStrategy (line 1) | interface IExecutionStrategy method CanExecute (line 3) | bool CanExecute(Order order, double marketPrice); FILE: solutions/csharp/onlinestockbrokeragesystem/Strategy/LimitOrderStrategy.cs class LimitOrderStrategy (line 1) | class LimitOrderStrategy : IExecutionStrategy method LimitOrderStrategy (line 5) | public LimitOrderStrategy(TransactionType type) method CanExecute (line 10) | public bool CanExecute(Order order, double marketPrice) FILE: solutions/csharp/onlinestockbrokeragesystem/Strategy/MarketOrderStrategy.cs class MarketOrderStrategy (line 1) | class MarketOrderStrategy : IExecutionStrategy method CanExecute (line 3) | public bool CanExecute(Order order, double marketPrice) FILE: solutions/csharp/parkinglot/Enums/VehicleSize.cs type VehicleSize (line 1) | enum VehicleSize FILE: solutions/csharp/parkinglot/Models/ParkingFloor.cs class ParkingFloor (line 1) | class ParkingFloor method ParkingFloor (line 7) | public ParkingFloor(int floorNumber) method AddSpot (line 13) | public void AddSpot(ParkingSpot spot) method FindAvailableSpot (line 18) | public ParkingSpot FindAvailableSpot(Vehicle vehicle) method DisplayAvailability (line 31) | public void DisplayAvailability() FILE: solutions/csharp/parkinglot/Models/ParkingSpot.cs class ParkingSpot (line 1) | class ParkingSpot method ParkingSpot (line 9) | public ParkingSpot(string spotId, VehicleSize spotSize) method GetSpotId (line 17) | public string GetSpotId() method GetSpotSize (line 22) | public VehicleSize GetSpotSize() method IsAvailable (line 27) | public bool IsAvailable() method IsOccupiedSpot (line 35) | public bool IsOccupiedSpot() method ParkVehicle (line 40) | public void ParkVehicle(Vehicle vehicle) method UnparkVehicle (line 49) | public void UnparkVehicle() method CanFitVehicle (line 58) | public bool CanFitVehicle(Vehicle vehicle) FILE: solutions/csharp/parkinglot/Models/ParkingTicket.cs class ParkingTicket (line 1) | class ParkingTicket method ParkingTicket (line 9) | public ParkingTicket(Vehicle vehicle, ParkingSpot spot) method GetTicketId (line 18) | public string GetTicketId() { return ticketId; } method GetVehicle (line 19) | public Vehicle GetVehicle() { return vehicle; } method GetSpot (line 20) | public ParkingSpot GetSpot() { return spot; } method GetEntryTimestamp (line 21) | public long GetEntryTimestamp() { return entryTimestamp; } method GetExitTimestamp (line 22) | public long GetExitTimestamp() { return exitTimestamp; } method SetExitTimestamp (line 24) | public void SetExitTimestamp() FILE: solutions/csharp/parkinglot/Models/Vehicle.cs class Vehicle (line 1) | abstract class Vehicle method Vehicle (line 6) | public Vehicle(string licenseNumber, VehicleSize size) method GetLicenseNumber (line 12) | public string GetLicenseNumber() method GetSize (line 17) | public VehicleSize GetSize() class Bike (line 23) | class Bike : Vehicle method Bike (line 25) | public Bike(string licenseNumber) : base(licenseNumber, VehicleSize.SM... class Car (line 30) | class Car : Vehicle method Car (line 32) | public Car(string licenseNumber) : base(licenseNumber, VehicleSize.MED... class Truck (line 37) | class Truck : Vehicle method Truck (line 39) | public Truck(string licenseNumber) : base(licenseNumber, VehicleSize.L... FILE: solutions/csharp/parkinglot/ParkingLot.cs class ParkingLot (line 3) | class ParkingLot method ParkingLot (line 13) | private ParkingLot() method GetInstance (line 21) | public static ParkingLot GetInstance() method AddFloor (line 36) | public void AddFloor(ParkingFloor floor) method SetFeeStrategy (line 41) | public void SetFeeStrategy(IFeeStrategy feeStrategy) method SetParkingStrategy (line 46) | public void SetParkingStrategy(IParkingStrategy parkingStrategy) method ParkVehicle (line 51) | public ParkingTicket ParkVehicle(Vehicle vehicle) method UnparkVehicle (line 72) | public double? UnparkVehicle(string licenseNumber) FILE: solutions/csharp/parkinglot/ParkingLotDemo.cs class ParkingLotDemo (line 6) | public class ParkingLotDemo method Main (line 8) | public static void Main() FILE: solutions/csharp/parkinglot/Strategies/Fee/FlatRateFeeStrategy.cs class FlatRateFeeStrategy (line 1) | class FlatRateFeeStrategy : IFeeStrategy method CalculateFee (line 5) | public double CalculateFee(ParkingTicket parkingTicket) FILE: solutions/csharp/parkinglot/Strategies/Fee/IFeeStrategy.cs type IFeeStrategy (line 1) | interface IFeeStrategy method CalculateFee (line 3) | double CalculateFee(ParkingTicket parkingTicket); FILE: solutions/csharp/parkinglot/Strategies/Fee/VehicleBasedFeeStrategy.cs class VehicleBasedFeeStrategy (line 1) | class VehicleBasedFeeStrategy : IFeeStrategy method CalculateFee (line 10) | public double CalculateFee(ParkingTicket parkingTicket) FILE: solutions/csharp/parkinglot/Strategies/Parking/BestFitStrategy.cs class BestFitStrategy (line 1) | class BestFitStrategy : IParkingStrategy method FindSpot (line 3) | public ParkingSpot FindSpot(List floors, Vehicle vehicle) FILE: solutions/csharp/parkinglot/Strategies/Parking/FarthestFirstStrategy.cs class FarthestFirstStrategy (line 1) | class FarthestFirstStrategy : IParkingStrategy method FindSpot (line 3) | public ParkingSpot FindSpot(List floors, Vehicle vehicle) FILE: solutions/csharp/parkinglot/Strategies/Parking/IParkingStrategy.cs type IParkingStrategy (line 1) | interface IParkingStrategy method FindSpot (line 3) | ParkingSpot FindSpot(List floors, Vehicle vehicle); FILE: solutions/csharp/parkinglot/Strategies/Parking/NearestFirstStrategy.cs class NearestFirstStrategy (line 1) | class NearestFirstStrategy : IParkingStrategy method FindSpot (line 3) | public ParkingSpot FindSpot(List floors, Vehicle vehicle) FILE: solutions/csharp/pubsubsystem/Models/Message.cs class Message (line 1) | class Message method Message (line 6) | public Message(string payload) method GetPayload (line 12) | public string GetPayload() method ToString (line 17) | public override string ToString() FILE: solutions/csharp/pubsubsystem/Models/Topic.cs class Topic (line 1) | class Topic method Topic (line 7) | public Topic(string name) method GetName (line 13) | public string GetName() method AddSubscriber (line 18) | public void AddSubscriber(ISubscriber subscriber) method RemoveSubscriber (line 26) | public void RemoveSubscriber(ISubscriber subscriber) method Broadcast (line 34) | public void Broadcast(Message message) FILE: solutions/csharp/pubsubsystem/PubSubDemo.cs class PubSubDemo (line 6) | public class PubSubDemo method Main (line 8) | public static void Main(string[] args) FILE: solutions/csharp/pubsubsystem/PubSubService.cs class PubSubService (line 3) | class PubSubService method PubSubService (line 10) | private PubSubService() method GetInstance (line 15) | public static PubSubService GetInstance() method CreateTopic (line 30) | public void CreateTopic(string topicName) method Subscribe (line 36) | public void Subscribe(string topicName, ISubscriber subscriber) method Unsubscribe (line 46) | public void Unsubscribe(string topicName, ISubscriber subscriber) method Publish (line 55) | public void Publish(string topicName, Message message) method Shutdown (line 65) | public void Shutdown() FILE: solutions/csharp/pubsubsystem/Subscribers/AlertSubscriber.cs class AlertSubscriber (line 1) | class AlertSubscriber : ISubscriber method AlertSubscriber (line 5) | public AlertSubscriber(string id) method GetId (line 10) | public string GetId() method OnMessage (line 15) | public void OnMessage(Message message) FILE: solutions/csharp/pubsubsystem/Subscribers/ISubscriber.cs type ISubscriber (line 1) | interface ISubscriber method GetId (line 3) | string GetId(); method OnMessage (line 4) | void OnMessage(Message message); FILE: solutions/csharp/pubsubsystem/Subscribers/NewsSubscriber.cs class NewsSubscriber (line 1) | class NewsSubscriber : ISubscriber method NewsSubscriber (line 5) | public NewsSubscriber(string id) method GetId (line 10) | public string GetId() method OnMessage (line 15) | public void OnMessage(Message message) FILE: solutions/csharp/restaurantmanagementsystem/Commands/ICommand.cs type ICommand (line 1) | interface ICommand method Execute (line 3) | void Execute(); FILE: solutions/csharp/restaurantmanagementsystem/Commands/PrepareOrderCommand.cs class PrepareOrderCommand (line 1) | class PrepareOrderCommand : ICommand method PrepareOrderCommand (line 6) | public PrepareOrderCommand(Order order, Chef chef) method Execute (line 12) | public void Execute() FILE: solutions/csharp/restaurantmanagementsystem/Commands/ServeOrderCommand.cs class ServeOrderCommand (line 1) | class ServeOrderCommand : ICommand method ServeOrderCommand (line 6) | public ServeOrderCommand(Order order, Waiter waiter) method Execute (line 12) | public void Execute() FILE: solutions/csharp/restaurantmanagementsystem/Decorators/BillDecorator.cs class BillDecorator (line 1) | abstract class BillDecorator : IBillComponent method BillDecorator (line 5) | public BillDecorator(IBillComponent component) method CalculateTotal (line 10) | public virtual double CalculateTotal() method GetDescription (line 15) | public virtual string GetDescription() FILE: solutions/csharp/restaurantmanagementsystem/Decorators/ServiceChargeDecorator.cs class ServiceChargeDecorator (line 1) | class ServiceChargeDecorator : BillDecorator method ServiceChargeDecorator (line 5) | public ServiceChargeDecorator(IBillComponent component, double charge)... method CalculateTotal (line 10) | public override double CalculateTotal() method GetDescription (line 15) | public override string GetDescription() FILE: solutions/csharp/restaurantmanagementsystem/Decorators/TaxDecorator.cs class TaxDecorator (line 1) | class TaxDecorator : BillDecorator method TaxDecorator (line 5) | public TaxDecorator(IBillComponent component, double taxRate) : base(c... method CalculateTotal (line 10) | public override double CalculateTotal() method GetDescription (line 15) | public override string GetDescription() FILE: solutions/csharp/restaurantmanagementsystem/Enum/TableStatus.cs type TableStatus (line 1) | enum TableStatus FILE: solutions/csharp/restaurantmanagementsystem/Models/BaseBill.cs class BaseBill (line 1) | class BaseBill : IBillComponent method BaseBill (line 5) | public BaseBill(Order order) method CalculateTotal (line 10) | public double CalculateTotal() => order.GetTotalPrice(); method GetDescription (line 11) | public string GetDescription() => "Order Items"; FILE: solutions/csharp/restaurantmanagementsystem/Models/Bill.cs class Bill (line 1) | class Bill method Bill (line 5) | public Bill(IBillComponent component) method PrintBill (line 10) | public void PrintBill() FILE: solutions/csharp/restaurantmanagementsystem/Models/Chef.cs class Chef (line 1) | class Chef : Staff method Chef (line 3) | public Chef(string id, string name) : base(id, name) { } method PrepareOrder (line 5) | public void PrepareOrder(Order order) FILE: solutions/csharp/restaurantmanagementsystem/Models/IBillComponent.cs type IBillComponent (line 1) | interface IBillComponent method CalculateTotal (line 3) | double CalculateTotal(); method GetDescription (line 4) | string GetDescription(); FILE: solutions/csharp/restaurantmanagementsystem/Models/Menu.cs class Menu (line 1) | class Menu method AddItem (line 5) | public void AddItem(MenuItem item) method GetItem (line 10) | public MenuItem GetItem(string id) FILE: solutions/csharp/restaurantmanagementsystem/Models/MenuItem.cs class MenuItem (line 1) | class MenuItem method MenuItem (line 7) | public MenuItem(string id, string name, double price) method GetId (line 14) | public string GetId() => id; method GetName (line 15) | public string GetName() => name; method GetPrice (line 16) | public double GetPrice() => price; FILE: solutions/csharp/restaurantmanagementsystem/Models/Order.cs class Order (line 1) | class Order method Order (line 7) | public Order(int orderId, int tableId) method AddItem (line 13) | public void AddItem(OrderItem item) method GetTotalPrice (line 18) | public double GetTotalPrice() method GetOrderId (line 23) | public int GetOrderId() => orderId; method GetTableId (line 24) | public int GetTableId() => tableId; method GetOrderItems (line 25) | public List GetOrderItems() => items; FILE: solutions/csharp/restaurantmanagementsystem/Models/OrderItem.cs class OrderItem (line 1) | class OrderItem method OrderItem (line 8) | public OrderItem(MenuItem menuItem, Order order) method ChangeState (line 15) | public void ChangeState(IOrderItemState newState) method NextState (line 21) | public void NextState() method SetState (line 26) | public void SetState(IOrderItemState state) method AddObserver (line 31) | public void AddObserver(IOrderObserver observer) method NotifyObservers (line 36) | public void NotifyObservers() method GetMenuItem (line 44) | public MenuItem GetMenuItem() => menuItem; method GetOrder (line 45) | public Order GetOrder() => order; FILE: solutions/csharp/restaurantmanagementsystem/Models/Restaurant.cs class Restaurant (line 1) | class Restaurant method Restaurant (line 10) | private Restaurant() { } method GetInstance (line 12) | public static Restaurant GetInstance() method AddWaiter (line 27) | public void AddWaiter(Waiter waiter) => waiters[waiter.GetId()] = waiter; method GetWaiter (line 28) | public Waiter GetWaiter(string id) => waiters.TryGetValue(id, out Wait... method AddChef (line 30) | public void AddChef(Chef chef) => chefs[chef.GetId()] = chef; method GetChef (line 31) | public Chef GetChef(string id) => chefs.TryGetValue(id, out Chef chef)... method GetChefs (line 33) | public List GetChefs() => chefs.Values.ToList(); method GetWaiters (line 34) | public List GetWaiters() => waiters.Values.ToList(); method AddTable (line 36) | public void AddTable(Table table) => tables[table.GetId()] = table; method GetMenu (line 37) | public Menu GetMenu() => menu; FILE: solutions/csharp/restaurantmanagementsystem/Models/Staff.cs class Staff (line 1) | abstract class Staff method Staff (line 6) | public Staff(string id, string name) method GetId (line 12) | public string GetId() => id; method GetName (line 13) | public string GetName() => name; FILE: solutions/csharp/restaurantmanagementsystem/Models/Table.cs class Table (line 1) | class Table method Table (line 7) | public Table(int id, int capacity) method GetId (line 14) | public int GetId() => id; method GetCapacity (line 15) | public int GetCapacity() => capacity; method GetStatus (line 16) | public TableStatus GetStatus() => status; method SetStatus (line 17) | public void SetStatus(TableStatus status) => this.status = status; FILE: solutions/csharp/restaurantmanagementsystem/Models/Waiter.cs class Waiter (line 1) | class Waiter : Staff, IOrderObserver method Waiter (line 3) | public Waiter(string id, string name) : base(id, name) { } method ServeOrder (line 5) | public void ServeOrder(Order order) method Update (line 14) | public void Update(OrderItem item) FILE: solutions/csharp/restaurantmanagementsystem/Observer/IOrderObserver.cs type IOrderObserver (line 1) | interface IOrderObserver method Update (line 3) | void Update(OrderItem item); FILE: solutions/csharp/restaurantmanagementsystem/RestaurantManagementSystemDemo.cs class RestaurantManagementSystemDemo (line 6) | public class RestaurantManagementSystemDemo method Main (line 8) | public static void Main(string[] args) FILE: solutions/csharp/restaurantmanagementsystem/RestaurantManagementSystemFacade.cs class RestaurantManagementSystemFacade (line 1) | class RestaurantManagementSystemFacade method RestaurantManagementSystemFacade (line 9) | private RestaurantManagementSystemFacade() { } method GetInstance (line 11) | public static RestaurantManagementSystemFacade GetInstance() method AddTable (line 26) | public Table AddTable(int id, int capacity) method AddWaiter (line 33) | public Waiter AddWaiter(string id, string name) method AddChef (line 40) | public Chef AddChef(string id, string name) method AddMenuItem (line 47) | public MenuItem AddMenuItem(string id, string name, double price) method TakeOrder (line 54) | public Order TakeOrder(int tableId, string waiterId, List menu... method MarkItemsAsReady (line 85) | public void MarkItemsAsReady(int orderId) method ServeOrder (line 97) | public void ServeOrder(string waiterId, int orderId) method GenerateBill (line 106) | public Bill GenerateBill(int orderId) FILE: solutions/csharp/restaurantmanagementsystem/States/IOrderItemState.cs type IOrderItemState (line 1) | interface IOrderItemState method Next (line 3) | void Next(OrderItem item); method Prev (line 4) | void Prev(OrderItem item); method GetStatus (line 5) | string GetStatus(); FILE: solutions/csharp/restaurantmanagementsystem/States/OrderedState.cs class OrderedState (line 1) | class OrderedState : IOrderItemState method Next (line 3) | public void Next(OrderItem item) method Prev (line 8) | public void Prev(OrderItem item) method GetStatus (line 13) | public string GetStatus() => "ORDERED"; FILE: solutions/csharp/restaurantmanagementsystem/States/PreparingState.cs class PreparingState (line 1) | class PreparingState : IOrderItemState method Next (line 3) | public void Next(OrderItem item) method Prev (line 8) | public void Prev(OrderItem item) method GetStatus (line 13) | public string GetStatus() => "PREPARING"; FILE: solutions/csharp/restaurantmanagementsystem/States/ReadyForPickupState.cs class ReadyForPickupState (line 1) | class ReadyForPickupState : IOrderItemState method Next (line 3) | public void Next(OrderItem item) method Prev (line 8) | public void Prev(OrderItem item) method GetStatus (line 13) | public string GetStatus() => "READY_FOR_PICKUP"; FILE: solutions/csharp/restaurantmanagementsystem/States/ServedState.cs class ServedState (line 1) | class ServedState : IOrderItemState method Next (line 3) | public void Next(OrderItem item) method Prev (line 8) | public void Prev(OrderItem item) method GetStatus (line 13) | public string GetStatus() => "SERVED"; FILE: solutions/csharp/ridesharingservice/Enums/DriverStatus.cs type DriverStatus (line 1) | enum DriverStatus FILE: solutions/csharp/ridesharingservice/Enums/RideType.cs type RideType (line 1) | enum RideType FILE: solutions/csharp/ridesharingservice/Enums/TripStatus.cs type TripStatus (line 1) | enum TripStatus FILE: solutions/csharp/ridesharingservice/Models/Driver.cs class Driver (line 1) | class Driver : User method Driver (line 7) | public Driver(string name, string contact, Vehicle v, Location loc) method SetStatus (line 18) | public void SetStatus(DriverStatus s) method SetCurrentLocation (line 26) | public void SetCurrentLocation(Location loc) method OnUpdate (line 31) | public override void OnUpdate(Trip trip) FILE: solutions/csharp/ridesharingservice/Models/Location.cs class Location (line 1) | class Location method Location (line 6) | public Location(double lat, double lng) method DistanceTo (line 12) | public double DistanceTo(Location other) method ToString (line 22) | public override string ToString() FILE: solutions/csharp/ridesharingservice/Models/Rider.cs class Rider (line 1) | class Rider : User method Rider (line 3) | public Rider(string name, string contact) : base(name, contact) { } method OnUpdate (line 5) | public override void OnUpdate(Trip trip) FILE: solutions/csharp/ridesharingservice/Models/Trip.cs class Trip (line 1) | class Trip method Trip (line 15) | public Trip(TripBuilder builder) method AddObserver (line 27) | public void AddObserver(ITripObserver observer) method NotifyObservers (line 32) | private void NotifyObservers() method AssignDriver (line 40) | public void AssignDriver(Driver d) method StartTrip (line 47) | public void StartTrip() method EndTrip (line 53) | public void EndTrip() method SetState (line 69) | public void SetState(ITripState state) method SetStatus (line 74) | public void SetStatus(TripStatus s) method SetDriver (line 79) | public void SetDriver(Driver d) method ToString (line 84) | public override string ToString() class TripBuilder (line 90) | class TripBuilder method TripBuilder (line 98) | public TripBuilder() method WithRider (line 103) | public TripBuilder WithRider(Rider r) method WithPickupLocation (line 109) | public TripBuilder WithPickupLocation(Location loc) method WithDropoffLocation (line 115) | public TripBuilder WithDropoffLocation(Location loc) method WithFare (line 121) | public TripBuilder WithFare(double f) method Build (line 127) | public Trip Build() FILE: solutions/csharp/ridesharingservice/Models/User.cs class User (line 1) | abstract class User : ITripObserver method User (line 10) | public User(string n, string c) method AddTripToHistory (line 18) | public void AddTripToHistory(Trip trip) method OnUpdate (line 28) | public abstract void OnUpdate(Trip trip); FILE: solutions/csharp/ridesharingservice/Models/Vehicle.cs class Vehicle (line 1) | class Vehicle method Vehicle (line 7) | public Vehicle(string license, string m, RideType t) FILE: solutions/csharp/ridesharingservice/Observer/ITripObserver.cs type ITripObserver (line 1) | interface ITripObserver method OnUpdate (line 3) | void OnUpdate(Trip trip); FILE: solutions/csharp/ridesharingservice/RideSharingService.cs class RideSharingService (line 1) | class RideSharingService method RideSharingService (line 12) | private RideSharingService() { } method SetPricingStrategy (line 32) | public void SetPricingStrategy(IPricingStrategy strategy) method SetDriverMatchingStrategy (line 37) | public void SetDriverMatchingStrategy(IDriverMatchingStrategy strategy) method RegisterRider (line 42) | public Rider RegisterRider(string name, string contact) method RegisterDriver (line 49) | public Driver RegisterDriver(string name, string contact, Vehicle vehi... method RequestRide (line 56) | public Trip RequestRide(string riderId, Location pickup, Location drop... method AcceptRide (line 101) | public void AcceptRide(string driverId, string tripId) method StartTrip (line 114) | public void StartTrip(string tripId) method EndTrip (line 124) | public void EndTrip(string tripId) FILE: solutions/csharp/ridesharingservice/RideSharingServiceDemo.cs class RideSharingServiceDemo (line 5) | public class RideSharingServiceDemo method Main (line 7) | public static void Main() FILE: solutions/csharp/ridesharingservice/States/AssignedState.cs class AssignedState (line 1) | class AssignedState : ITripState method Request (line 3) | public void Request(Trip trip) method Assign (line 8) | public void Assign(Trip trip, Driver driver) method Start (line 13) | public void Start(Trip trip) method End (line 19) | public void End(Trip trip) FILE: solutions/csharp/ridesharingservice/States/CompletedState.cs class CompletedState (line 1) | class CompletedState : ITripState method Request (line 3) | public void Request(Trip trip) method Assign (line 8) | public void Assign(Trip trip, Driver driver) method Start (line 13) | public void Start(Trip trip) method End (line 18) | public void End(Trip trip) FILE: solutions/csharp/ridesharingservice/States/ITripState.cs type ITripState (line 1) | interface ITripState method Request (line 3) | void Request(Trip trip); method Assign (line 4) | void Assign(Trip trip, Driver driver); method Start (line 5) | void Start(Trip trip); method End (line 6) | void End(Trip trip); FILE: solutions/csharp/ridesharingservice/States/InProgressState.cs class InProgressState (line 1) | class InProgressState : ITripState method Request (line 3) | public void Request(Trip trip) method Assign (line 8) | public void Assign(Trip trip, Driver driver) method Start (line 13) | public void Start(Trip trip) method End (line 18) | public void End(Trip trip) FILE: solutions/csharp/ridesharingservice/States/RequestedState.cs class RequestedState (line 1) | class RequestedState : ITripState method Request (line 3) | public void Request(Trip trip) method Assign (line 8) | public void Assign(Trip trip, Driver driver) method Start (line 15) | public void Start(Trip trip) method End (line 20) | public void End(Trip trip) FILE: solutions/csharp/ridesharingservice/Strategies/Matching/IDriverMatchingStrategy.cs type IDriverMatchingStrategy (line 1) | interface IDriverMatchingStrategy method FindDrivers (line 3) | List FindDrivers(List allDrivers, Location pickupLocat... FILE: solutions/csharp/ridesharingservice/Strategies/Matching/NearestDriverMatchingStrategy.cs class NearestDriverMatchingStrategy (line 1) | class NearestDriverMatchingStrategy : IDriverMatchingStrategy method FindDrivers (line 5) | public List FindDrivers(List allDrivers, Location pick... FILE: solutions/csharp/ridesharingservice/Strategies/Pricing/FlatRatePricingStrategy.cs class FlatRatePricingStrategy (line 1) | class FlatRatePricingStrategy : IPricingStrategy method CalculateFare (line 6) | public double CalculateFare(Location pickup, Location dropoff, RideTyp... FILE: solutions/csharp/ridesharingservice/Strategies/Pricing/IPricingStrategy.cs type IPricingStrategy (line 1) | interface IPricingStrategy method CalculateFare (line 3) | double CalculateFare(Location pickup, Location dropoff, RideType rideT... FILE: solutions/csharp/ridesharingservice/Strategies/Pricing/VehicleBasedPricingStrategy.cs class VehicleBasedPricingStrategy (line 1) | class VehicleBasedPricingStrategy : IPricingStrategy method CalculateFare (line 11) | public double CalculateFare(Location pickup, Location dropoff, RideTyp... FILE: solutions/csharp/snakeandladdergame/Enums/GameStatus.cs type GameStatus (line 1) | enum GameStatus FILE: solutions/csharp/snakeandladdergame/Game.cs class Game (line 1) | class Game method Game (line 9) | public Game(Board board, Queue players, Dice dice) method Play (line 18) | public void Play() method TakeTurn (line 47) | private void TakeTurn(Player player) class GameBuilder (line 96) | class GameBuilder method SetBoard (line 102) | public GameBuilder SetBoard(int boardSize, List boardEnti... method SetPlayers (line 108) | public GameBuilder SetPlayers(List playerNames) method SetDice (line 118) | public GameBuilder SetDice(Dice dice) method Build (line 124) | public Game Build() FILE: solutions/csharp/snakeandladdergame/Models/Board.cs class Board (line 1) | class Board method Board (line 6) | public Board(int size, List entities) method GetSize (line 17) | public int GetSize() method GetFinalPosition (line 22) | public int GetFinalPosition(int position) FILE: solutions/csharp/snakeandladdergame/Models/BoardEntity.cs class BoardEntity (line 1) | abstract class BoardEntity method BoardEntity (line 6) | public BoardEntity(int start, int end) method GetStart (line 12) | public int GetStart() method GetEnd (line 17) | public int GetEnd() FILE: solutions/csharp/snakeandladdergame/Models/Dice.cs class Dice (line 1) | class Dice method Dice (line 7) | public Dice(int minValue, int maxValue) method Roll (line 13) | public int Roll() FILE: solutions/csharp/snakeandladdergame/Models/Ladder.cs class Ladder (line 1) | class Ladder : BoardEntity method Ladder (line 3) | public Ladder(int start, int end) : base(start, end) FILE: solutions/csharp/snakeandladdergame/Models/Player.cs class Player (line 1) | class Player method Player (line 6) | public Player(string name) method GetName (line 12) | public string GetName() method GetPosition (line 17) | public int GetPosition() method SetPosition (line 22) | public void SetPosition(int position) FILE: solutions/csharp/snakeandladdergame/Models/Snake.cs class Snake (line 1) | class Snake : BoardEntity method Snake (line 3) | public Snake(int start, int end) : base(start, end) FILE: solutions/csharp/snakeandladdergame/SnakeAndLadderDemo.cs class SnakeAndLadderDemo (line 4) | public class SnakeAndLadderDemo method Main (line 6) | public static void Main() FILE: solutions/csharp/socialnetworkingservice/Models/Comment.cs class Comment (line 1) | class Comment : CommentableEntity method Comment (line 3) | public Comment(User author, string content) : base(author, content) { } method GetReplies (line 5) | public List GetReplies() FILE: solutions/csharp/socialnetworkingservice/Models/CommentableEntity.cs class CommentableEntity (line 1) | abstract class CommentableEntity method CommentableEntity (line 10) | public CommentableEntity(User author, string content) method AddLike (line 18) | public void AddLike(User user) method AddComment (line 23) | public void AddComment(Comment comment) method GetId (line 28) | public string GetId() { return id; } method GetAuthor (line 29) | public User GetAuthor() { return author; } method GetContent (line 30) | public string GetContent() { return content; } method GetTimestamp (line 31) | public DateTime GetTimestamp() { return timestamp; } method GetComments (line 32) | public List GetComments() { return comments; } method GetLikes (line 33) | public HashSet GetLikes() { return likes; } FILE: solutions/csharp/socialnetworkingservice/Models/Post.cs class Post (line 1) | class Post : CommentableEntity method Post (line 3) | public Post(User author, string content) : base(author, content) { } FILE: solutions/csharp/socialnetworkingservice/Models/User.cs class User (line 1) | class User method User (line 9) | public User(string name, string email) method AddFriend (line 16) | public void AddFriend(User friend) method AddPost (line 21) | public void AddPost(Post post) method GetId (line 26) | public string GetId() { return id; } method GetName (line 27) | public string GetName() { return name; } method GetFriends (line 28) | public HashSet GetFriends() { return friends; } method GetPosts (line 29) | public List GetPosts() { return posts; } FILE: solutions/csharp/socialnetworkingservice/Observer/IPostObserver.cs type IPostObserver (line 1) | interface IPostObserver method OnPostCreated (line 3) | void OnPostCreated(Post post); method OnLike (line 4) | void OnLike(Post post, User user); method OnComment (line 5) | void OnComment(Post post, Comment comment); FILE: solutions/csharp/socialnetworkingservice/Observer/UserNotifier.cs class UserNotifier (line 1) | class UserNotifier : IPostObserver method OnPostCreated (line 3) | public void OnPostCreated(Post post) method OnLike (line 12) | public void OnLike(Post post, User user) method OnComment (line 18) | public void OnComment(Post post, Comment comment) FILE: solutions/csharp/socialnetworkingservice/Repositories/PostRepository.cs class PostRepository (line 1) | class PostRepository method PostRepository (line 6) | private PostRepository() { } method GetInstance (line 8) | public static PostRepository GetInstance() method Save (line 13) | public void Save(Post post) method FindById (line 18) | public Post FindById(string id) FILE: solutions/csharp/socialnetworkingservice/Repositories/UserRepository.cs class UserRepository (line 1) | class UserRepository method UserRepository (line 6) | private UserRepository() { } method GetInstance (line 8) | public static UserRepository GetInstance() method Save (line 13) | public void Save(User user) method FindById (line 18) | public User FindById(string id) FILE: solutions/csharp/socialnetworkingservice/Services/NewsFeedService.cs class NewsFeedService (line 1) | class NewsFeedService method NewsFeedService (line 5) | public NewsFeedService() method SetStrategy (line 10) | public void SetStrategy(INewsFeedGenerationStrategy strategy) method GetNewsFeed (line 15) | public List GetNewsFeed(User user) FILE: solutions/csharp/socialnetworkingservice/Services/PostService.cs class PostService (line 1) | class PostService method AddObserver (line 6) | public void AddObserver(IPostObserver observer) method CreatePost (line 11) | public Post CreatePost(User author, string content) method LikePost (line 23) | public void LikePost(User user, string postId) method AddComment (line 33) | public void AddComment(User author, string commentableId, string content) FILE: solutions/csharp/socialnetworkingservice/Services/UserService.cs class UserService (line 1) | class UserService method CreateUser (line 5) | public User CreateUser(string name, string email) method AddFriend (line 12) | public void AddFriend(string userId1, string userId2) method GetUserById (line 21) | public User GetUserById(string userId) FILE: solutions/csharp/socialnetworkingservice/SocialNetworkFacade.cs class SocialNetworkFacade (line 1) | class SocialNetworkFacade method SocialNetworkFacade (line 7) | public SocialNetworkFacade() method CreateUser (line 16) | public User CreateUser(string name, string email) method AddFriend (line 21) | public void AddFriend(string userId1, string userId2) method CreatePost (line 26) | public Post CreatePost(string authorId, string content) method AddComment (line 32) | public void AddComment(string userId, string postId, string content) method LikePost (line 38) | public void LikePost(string userId, string postId) method GetNewsFeed (line 44) | public List GetNewsFeed(string userId) FILE: solutions/csharp/socialnetworkingservice/SocialNetworkingDemo.cs class SocialNetworkDemo (line 5) | public class SocialNetworkDemo method PrintFeed (line 7) | private static void PrintFeed(List feed) method Main (line 23) | public static void Main(string[] args) FILE: solutions/csharp/socialnetworkingservice/Strategy/ChronologicalStrategy.cs class ChronologicalStrategy (line 1) | class ChronologicalStrategy : INewsFeedGenerationStrategy method GenerateFeed (line 3) | public List GenerateFeed(User user) FILE: solutions/csharp/socialnetworkingservice/Strategy/INewsFeedGenerationStrategy.cs type INewsFeedGenerationStrategy (line 1) | interface INewsFeedGenerationStrategy method GenerateFeed (line 3) | List GenerateFeed(User user); FILE: solutions/csharp/splitwise/Models/BalanceSheet.cs class BalanceSheet (line 1) | class BalanceSheet method BalanceSheet (line 7) | public BalanceSheet(User owner) method GetBalances (line 12) | public Dictionary GetBalances() => balances; method AdjustBalance (line 14) | public void AdjustBalance(User otherUser, double amount) method ShowBalances (line 34) | public void ShowBalances() FILE: solutions/csharp/splitwise/Models/Expense.cs class Expense (line 1) | class Expense method Expense (line 10) | public Expense(ExpenseBuilder builder) method GetId (line 23) | public string GetId() => id; method GetDescription (line 24) | public string GetDescription() => description; method GetAmount (line 25) | public double GetAmount() => amount; method GetPaidBy (line 26) | public User GetPaidBy() => paidBy; method GetSplits (line 27) | public List GetSplits() => splits; class ExpenseBuilder (line 30) | class ExpenseBuilder method SetId (line 40) | public ExpenseBuilder SetId(string id) method SetDescription (line 46) | public ExpenseBuilder SetDescription(string description) method SetAmount (line 52) | public ExpenseBuilder SetAmount(double amount) method SetPaidBy (line 58) | public ExpenseBuilder SetPaidBy(User paidBy) method SetParticipants (line 64) | public ExpenseBuilder SetParticipants(List participants) method SetSplitStrategy (line 70) | public ExpenseBuilder SetSplitStrategy(SplitStrategy splitStrategy) method SetSplitValues (line 76) | public ExpenseBuilder SetSplitValues(List splitValues) method Build (line 82) | public Expense Build() FILE: solutions/csharp/splitwise/Models/Group.cs class Group (line 1) | class Group method Group (line 7) | public Group(string name, List members) method GetId (line 14) | public string GetId() => id; method GetName (line 15) | public string GetName() => name; method GetMembers (line 16) | public List GetMembers() => new List(members); FILE: solutions/csharp/splitwise/Models/Split.cs class Split (line 1) | class Split method Split (line 6) | public Split(User user, double amount) method GetUser (line 12) | public User GetUser() => user; method GetAmount (line 13) | public double GetAmount() => amount; FILE: solutions/csharp/splitwise/Models/Transaction.cs class Transaction (line 1) | class Transaction method Transaction (line 7) | public Transaction(User from, User to, double amount) method ToString (line 14) | public override string ToString() FILE: solutions/csharp/splitwise/Models/User.cs class User (line 1) | class User method User (line 8) | public User(string name, string email) method GetId (line 16) | public string GetId() => id; method GetName (line 17) | public string GetName() => name; method GetBalanceSheet (line 18) | public BalanceSheet GetBalanceSheet() => balanceSheet; FILE: solutions/csharp/splitwise/SplitwiseDemo.cs class SplitwiseDemo (line 6) | public class SplitwiseDemo method Main (line 8) | public static void Main(string[] args) FILE: solutions/csharp/splitwise/SplitwiseService.cs class SplitwiseService (line 1) | class SplitwiseService method SplitwiseService (line 8) | private SplitwiseService() { } method GetInstance (line 10) | public static SplitwiseService GetInstance() method AddUser (line 25) | public User AddUser(string name, string email) method AddGroup (line 32) | public Group AddGroup(string name, List members) method GetUser (line 39) | public User GetUser(string id) method GetGroup (line 44) | public Group GetGroup(string id) method CreateExpense (line 49) | public void CreateExpense(ExpenseBuilder builder) method SettleUp (line 72) | public void SettleUp(string payerId, string payeeId, double amount) method ShowBalanceSheet (line 86) | public void ShowBalanceSheet(string userId) method SimplifyGroupDebts (line 92) | public List SimplifyGroupDebts(string groupId) FILE: solutions/csharp/splitwise/Strategy/EqualSplitStrategy.cs class EqualSplitStrategy (line 1) | class EqualSplitStrategy : SplitStrategy method CalculateSplits (line 3) | public override List CalculateSplits(double totalAmount, User p... FILE: solutions/csharp/splitwise/Strategy/ExactSplitStrategy.cs class ExactSplitStrategy (line 1) | class ExactSplitStrategy : SplitStrategy method CalculateSplits (line 3) | public override List CalculateSplits(double totalAmount, User p... FILE: solutions/csharp/splitwise/Strategy/PercentageSplitStrategy.cs class PercentageSplitStrategy (line 1) | class PercentageSplitStrategy : SplitStrategy method CalculateSplits (line 3) | public override List CalculateSplits(double totalAmount, User p... FILE: solutions/csharp/splitwise/Strategy/SplitStrategy.cs class SplitStrategy (line 1) | abstract class SplitStrategy method CalculateSplits (line 3) | public abstract List CalculateSplits(double totalAmount, User p... FILE: solutions/csharp/stackoverflow/Enums/EventType.cs type EventType (line 1) | enum EventType FILE: solutions/csharp/stackoverflow/Enums/VoteType.cs type VoteType (line 1) | enum VoteType FILE: solutions/csharp/stackoverflow/Models/Answer.cs class Answer (line 1) | class Answer : Post method Answer (line 5) | public Answer(string body, User author) method SetAccepted (line 10) | public void SetAccepted(bool accepted) method IsAcceptedAnswer (line 15) | public bool IsAcceptedAnswer() { return isAccepted; } FILE: solutions/csharp/stackoverflow/Models/Comment.cs class Comment (line 1) | class Comment : Content method Comment (line 3) | public Comment(string body, User author) FILE: solutions/csharp/stackoverflow/Models/Content.cs class Content (line 1) | abstract class Content method Content (line 8) | public Content(string id, string body, User author) method GetId (line 16) | public string GetId() { return id; } method GetBody (line 17) | public string GetBody() { return body; } method GetAuthor (line 18) | public User GetAuthor() { return author; } FILE: solutions/csharp/stackoverflow/Models/Post.cs class Post (line 3) | abstract class Post : Content method Post (line 11) | public Post(string id, string body, User author) : base(id, body, author) method AddObserver (line 15) | public void AddObserver(IPostObserver observer) method NotifyObservers (line 20) | protected void NotifyObservers(Event eventObj) method Vote (line 28) | public void Vote(User user, VoteType voteType) FILE: solutions/csharp/stackoverflow/Models/Question.cs class Question (line 1) | class Question : Post method Question (line 8) | public Question(string title, string body, User author, HashSet t... method AddAnswer (line 15) | public void AddAnswer(Answer answer) method AcceptAnswer (line 20) | public void AcceptAnswer(Answer answer) method GetTitle (line 33) | public string GetTitle() { return title; } method GetTags (line 34) | public HashSet GetTags() { return tags; } method GetAnswers (line 35) | public List GetAnswers() { return answers; } FILE: solutions/csharp/stackoverflow/Models/Tag.cs class Tag (line 1) | class Tag : IComparable method Tag (line 5) | public Tag(string name) method GetName (line 10) | public string GetName() { return name; } method CompareTo (line 12) | public int CompareTo(Tag other) method Equals (line 17) | public override bool Equals(object obj) method GetHashCode (line 26) | public override int GetHashCode() FILE: solutions/csharp/stackoverflow/Models/User.cs class User (line 1) | class User method User (line 8) | public User(string name) method UpdateReputation (line 15) | public void UpdateReputation(int change) method GetId (line 23) | public string GetId() { return id; } method GetName (line 24) | public string GetName() { return name; } method GetReputation (line 25) | public int GetReputation() FILE: solutions/csharp/stackoverflow/Observer/Event.cs class Event (line 1) | class Event method Event (line 7) | public Event(EventType type, User actor, Post targetPost) method GetEventType (line 14) | public EventType GetEventType() { return type; } method GetActor (line 15) | public User GetActor() { return actor; } method GetTargetPost (line 16) | public Post GetTargetPost() { return targetPost; } FILE: solutions/csharp/stackoverflow/Observer/IPostObserver.cs type IPostObserver (line 1) | interface IPostObserver method OnPostEvent (line 3) | void OnPostEvent(Event eventObj); FILE: solutions/csharp/stackoverflow/Observer/ReputationManager.cs class ReputationManager (line 1) | class ReputationManager : IPostObserver method OnPostEvent (line 9) | public void OnPostEvent(Event eventObj) FILE: solutions/csharp/stackoverflow/StackOverflowDemo.cs class StackOverflowDemo (line 6) | public class StackOverflowDemo method Main (line 8) | public static void Main(string[] args) method PrintReputations (line 57) | private static void PrintReputations(params User[] users) FILE: solutions/csharp/stackoverflow/StackOverflowService.cs class StackOverflowService (line 3) | class StackOverflowService method CreateUser (line 10) | public User CreateUser(string name) method PostQuestion (line 17) | public Question PostQuestion(string userId, string title, string body,... method PostAnswer (line 26) | public Answer PostAnswer(string userId, string questionId, string body) method VoteOnPost (line 37) | public void VoteOnPost(string userId, string postId, VoteType voteType) method AcceptAnswer (line 44) | public void AcceptAnswer(string questionId, string answerId) method SearchQuestions (line 51) | public List SearchQuestions(List strategies) method GetUser (line 63) | public User GetUser(string userId) method FindPostById (line 68) | private Post FindPostById(string postId) FILE: solutions/csharp/stackoverflow/Strategy/ISearchStrategy.cs type ISearchStrategy (line 1) | interface ISearchStrategy method Filter (line 3) | List Filter(List questions); FILE: solutions/csharp/stackoverflow/Strategy/KeywordSearchStrategy.cs class KeywordSearchStrategy (line 1) | class KeywordSearchStrategy : ISearchStrategy method KeywordSearchStrategy (line 5) | public KeywordSearchStrategy(string keyword) method Filter (line 10) | public List Filter(List questions) FILE: solutions/csharp/stackoverflow/Strategy/TagSearchStrategy.cs class TagSearchStrategy (line 1) | class TagSearchStrategy : ISearchStrategy method TagSearchStrategy (line 5) | public TagSearchStrategy(Tag tag) method Filter (line 10) | public List Filter(List questions) FILE: solutions/csharp/stackoverflow/Strategy/UserSearchStrategy.cs class UserSearchStrategy (line 1) | class UserSearchStrategy : ISearchStrategy method UserSearchStrategy (line 5) | public UserSearchStrategy(User user) method Filter (line 10) | public List Filter(List questions) FILE: solutions/csharp/taskmanagementsystem/Enums/TaskPriority.cs type TaskPriority (line 1) | enum TaskPriority FILE: solutions/csharp/taskmanagementsystem/Enums/TaskStatus.cs type TaskStatus (line 1) | enum TaskStatus FILE: solutions/csharp/taskmanagementsystem/Models/ActivityLog.cs class ActivityLog (line 1) | class ActivityLog method ActivityLog (line 6) | public ActivityLog(string description) method ToString (line 12) | public override string ToString() FILE: solutions/csharp/taskmanagementsystem/Models/Comment.cs class Comment (line 1) | class Comment method Comment (line 8) | public Comment(string content, User author) method GetAuthor (line 16) | public User GetAuthor() => author; FILE: solutions/csharp/taskmanagementsystem/Models/Tag.cs class Tag (line 1) | class Tag method Tag (line 5) | public Tag(string name) method GetName (line 10) | public string GetName() => name; FILE: solutions/csharp/taskmanagementsystem/Models/Task.cs class Task (line 1) | class Task method Task (line 18) | public Task(TaskBuilder builder) method SetAssignee (line 36) | public void SetAssignee(User user) method UpdatePriority (line 46) | public void UpdatePriority(TaskPriority priority) method AddComment (line 55) | public void AddComment(Comment comment) method AddSubtask (line 65) | public void AddSubtask(Task subtask) method SetState (line 76) | public void SetState(TaskState state) method StartProgress (line 83) | public void StartProgress() => currentState.StartProgress(this); method CompleteTask (line 84) | public void CompleteTask() => currentState.CompleteTask(this); method ReopenTask (line 85) | public void ReopenTask() => currentState.ReopenTask(this); method AddObserver (line 88) | public void AddObserver(ITaskObserver observer) => observers.Add(obser... method RemoveObserver (line 89) | public void RemoveObserver(ITaskObserver observer) => observers.Remove... method NotifyObservers (line 91) | public void NotifyObservers(string changeType) method AddLog (line 99) | public void AddLog(string logDescription) method IsComposite (line 104) | public bool IsComposite() => subtasks.Count > 0; method Display (line 106) | public void Display(string indent = "") method GetId (line 119) | public string GetId() => id; method GetTitle (line 120) | public string GetTitle() => title; method GetDescription (line 121) | public string GetDescription() => description; method GetPriority (line 122) | public TaskPriority GetPriority() => priority; method GetDueDate (line 123) | public string GetDueDate() => dueDate; method GetAssignee (line 124) | public User GetAssignee() => assignee; method GetStatus (line 125) | public TaskStatus GetStatus() => currentState.GetStatus(); method SetTitle (line 127) | public void SetTitle(string title) => this.title = title; method SetDescription (line 128) | public void SetDescription(string description) => this.description = d... class TaskBuilder (line 132) | class TaskBuilder method TaskBuilder (line 143) | public TaskBuilder(string title) method SetDescription (line 149) | public TaskBuilder SetDescription(string description) method SetDueDate (line 155) | public TaskBuilder SetDueDate(string dueDate) method SetPriority (line 161) | public TaskBuilder SetPriority(TaskPriority priority) method SetAssignee (line 167) | public TaskBuilder SetAssignee(User assignee) method SetCreatedBy (line 173) | public TaskBuilder SetCreatedBy(User createdBy) method SetTags (line 179) | public TaskBuilder SetTags(HashSet tags) method Build (line 185) | public Task Build() FILE: solutions/csharp/taskmanagementsystem/Models/TaskList.cs class TaskList (line 1) | class TaskList method TaskList (line 8) | public TaskList(string name) method AddTask (line 15) | public void AddTask(Task task) method GetTasks (line 23) | public List GetTasks() method GetId (line 31) | public string GetId() => id; method GetName (line 32) | public string GetName() => name; method Display (line 34) | public void Display() FILE: solutions/csharp/taskmanagementsystem/Models/User.cs class User (line 1) | class User method User (line 7) | public User(string name, string email) method GetId (line 14) | public string GetId() => id; method GetEmail (line 15) | public string GetEmail() => email; method GetName (line 16) | public string GetName() => name; FILE: solutions/csharp/taskmanagementsystem/Observer/ActivityLogger.cs class ActivityLogger (line 1) | class ActivityLogger : ITaskObserver method Update (line 3) | public void Update(Task task, string changeType) FILE: solutions/csharp/taskmanagementsystem/Observer/ITaskObserver.cs type ITaskObserver (line 1) | interface ITaskObserver method Update (line 3) | void Update(Task task, string changeType); FILE: solutions/csharp/taskmanagementsystem/State/DoneState.cs class DoneState (line 1) | class DoneState : TaskState method StartProgress (line 3) | public override void StartProgress(Task task) method CompleteTask (line 8) | public override void CompleteTask(Task task) method ReopenTask (line 13) | public override void ReopenTask(Task task) method GetStatus (line 18) | public override TaskStatus GetStatus() => TaskStatus.DONE; FILE: solutions/csharp/taskmanagementsystem/State/InProgressState.cs class InProgressState (line 1) | class InProgressState : TaskState method StartProgress (line 3) | public override void StartProgress(Task task) method CompleteTask (line 8) | public override void CompleteTask(Task task) method ReopenTask (line 13) | public override void ReopenTask(Task task) method GetStatus (line 18) | public override TaskStatus GetStatus() => TaskStatus.IN_PROGRESS; FILE: solutions/csharp/taskmanagementsystem/State/TaskState.cs class TaskState (line 1) | abstract class TaskState method StartProgress (line 3) | public abstract void StartProgress(Task task); method CompleteTask (line 4) | public abstract void CompleteTask(Task task); method ReopenTask (line 5) | public abstract void ReopenTask(Task task); method GetStatus (line 6) | public abstract TaskStatus GetStatus(); FILE: solutions/csharp/taskmanagementsystem/State/TodoState.cs class TodoState (line 1) | class TodoState : TaskState method StartProgress (line 3) | public override void StartProgress(Task task) method CompleteTask (line 8) | public override void CompleteTask(Task task) method ReopenTask (line 13) | public override void ReopenTask(Task task) method GetStatus (line 18) | public override TaskStatus GetStatus() => TaskStatus.TODO; FILE: solutions/csharp/taskmanagementsystem/Strategy/SortByDueDate.cs class SortByDueDate (line 1) | class SortByDueDate : TaskSortStrategy method Sort (line 3) | public override void Sort(List tasks) FILE: solutions/csharp/taskmanagementsystem/Strategy/SortByPriority.cs class SortByPriority (line 1) | class SortByPriority : TaskSortStrategy method Sort (line 3) | public override void Sort(List tasks) FILE: solutions/csharp/taskmanagementsystem/Strategy/TaskSortStrategy.cs class TaskSortStrategy (line 1) | abstract class TaskSortStrategy method Sort (line 3) | public abstract void Sort(List tasks); FILE: solutions/csharp/taskmanagementsystem/TaskManagementSystem.cs class TaskManagementSystem (line 1) | class TaskManagementSystem method TaskManagementSystem (line 9) | private TaskManagementSystem() { } method GetInstance (line 11) | public static TaskManagementSystem GetInstance() method CreateUser (line 26) | public User CreateUser(string name, string email) method CreateTaskList (line 33) | public TaskList CreateTaskList(string listName) method CreateTask (line 40) | public Task CreateTask(string title, string description, string dueDate, method ListTasksByUser (line 61) | public List ListTasksByUser(string userId) method ListTasksByStatus (line 71) | public List ListTasksByStatus(TaskStatus status) method DeleteTask (line 76) | public void DeleteTask(string taskId) method SearchTasks (line 81) | public List SearchTasks(string keyword, TaskSortStrategy sorting... FILE: solutions/csharp/taskmanagementsystem/TaskManagementSystemDemo.cs class TaskManagementSystemDemo (line 6) | public class TaskManagementSystemDemo method Main (line 8) | public static void Main() FILE: solutions/csharp/tictactoe/Enums/GameStatus.cs type GameStatus (line 1) | enum GameStatus FILE: solutions/csharp/tictactoe/Enums/Symbol.cs type Symbol (line 1) | enum Symbol FILE: solutions/csharp/tictactoe/Exceptions/InvalidMoveException.cs class InvalidMoveException (line 1) | class InvalidMoveException : Exception method InvalidMoveException (line 3) | public InvalidMoveException(string message) : base(message) { } FILE: solutions/csharp/tictactoe/Models/Board.cs class Board (line 4) | class Board method Board (line 10) | public Board(int size) method InitializeBoard (line 18) | private void InitializeBoard() method PlaceSymbol (line 29) | public bool PlaceSymbol(int row, int col, Symbol symbol) method GetCell (line 45) | public Cell GetCell(int row, int col) method IsFull (line 54) | public bool IsFull() { return movesCount == size * size; } method PrintBoard (line 56) | public void PrintBoard() method GetSize (line 71) | public int GetSize() => size; FILE: solutions/csharp/tictactoe/Models/Cell.cs class Cell (line 1) | class Cell method Cell (line 5) | public Cell() method GetSymbol (line 10) | public Symbol GetSymbol() { return symbol; } method SetSymbol (line 11) | public void SetSymbol(Symbol symbol) { this.symbol = symbol; } method GetSymbolChar (line 13) | public char GetSymbolChar() FILE: solutions/csharp/tictactoe/Models/Game.cs class Game (line 3) | class Game : GameSubject method Game (line 14) | public Game(Player player1, Player player2) method MakeMove (line 31) | public void MakeMove(Player player, int row, int col) method CheckWinner (line 36) | public bool CheckWinner(Player player) method SwitchPlayer (line 48) | public void SwitchPlayer() method GetBoard (line 60) | public Board GetBoard() => board; method GetCurrentPlayer (line 61) | public Player GetCurrentPlayer() => currentPlayer; method GetWinner (line 62) | public Player GetWinner() => winner; method SetWinner (line 63) | public void SetWinner(Player winner) => this.winner = winner; method GetStatus (line 64) | public GameStatus GetStatus() => status; method SetState (line 65) | public void SetState(IGameState state) => this.state = state; method SetStatus (line 66) | public void SetStatus(GameStatus status) FILE: solutions/csharp/tictactoe/Models/Player.cs class Player (line 1) | class Player method Player (line 6) | public Player(string name, Symbol symbol) method GetName (line 12) | public string GetName() { return name; } method GetSymbol (line 13) | public Symbol GetSymbol() { return symbol; } method GetSymbolChar (line 15) | public char GetSymbolChar() FILE: solutions/csharp/tictactoe/Observer/GameSubject.cs class GameSubject (line 1) | abstract class GameSubject method AddObserver (line 5) | public void AddObserver(IGameObserver observer) method RemoveObserver (line 10) | public void RemoveObserver(IGameObserver observer) method NotifyObservers (line 15) | public void NotifyObservers() FILE: solutions/csharp/tictactoe/Observer/IGameObserver.cs type IGameObserver (line 1) | interface IGameObserver method Update (line 3) | void Update(Game game); FILE: solutions/csharp/tictactoe/Observer/Scoreboard.cs class Scoreboard (line 3) | class Scoreboard : IGameObserver method Scoreboard (line 7) | public Scoreboard() method Update (line 12) | public void Update(Game game) method PrintScores (line 23) | public void PrintScores() FILE: solutions/csharp/tictactoe/States/DrawState.cs class DrawState (line 1) | class DrawState : IGameState method HandleMove (line 3) | public void HandleMove(Game game, Player player, int row, int col) FILE: solutions/csharp/tictactoe/States/IGameState.cs type IGameState (line 1) | interface IGameState method HandleMove (line 3) | void HandleMove(Game game, Player player, int row, int col); FILE: solutions/csharp/tictactoe/States/InProgressState.cs class InProgressState (line 1) | class InProgressState : IGameState method HandleMove (line 3) | public void HandleMove(Game game, Player player, int row, int col) FILE: solutions/csharp/tictactoe/States/WinnerState.cs class WinnerState (line 1) | class WinnerState : IGameState method HandleMove (line 3) | public void HandleMove(Game game, Player player, int row, int col) FILE: solutions/csharp/tictactoe/Strategy/ColumnWinningStrategy.cs class ColumnWinningStrategy (line 1) | class ColumnWinningStrategy : IWinningStrategy method CheckWinner (line 3) | public bool CheckWinner(Board board, Player player) FILE: solutions/csharp/tictactoe/Strategy/DiagonalWinningStrategy.cs class DiagonalWinningStrategy (line 1) | class DiagonalWinningStrategy : IWinningStrategy method CheckWinner (line 3) | public bool CheckWinner(Board board, Player player) FILE: solutions/csharp/tictactoe/Strategy/IWinningStrategy.cs type IWinningStrategy (line 1) | interface IWinningStrategy method CheckWinner (line 3) | bool CheckWinner(Board board, Player player); FILE: solutions/csharp/tictactoe/Strategy/RowWinningStrategy.cs class RowWinningStrategy (line 1) | class RowWinningStrategy : IWinningStrategy method CheckWinner (line 3) | public bool CheckWinner(Board board, Player player) FILE: solutions/csharp/tictactoe/TicTacToeDemo.cs class TicTacToeDemo (line 4) | public class TicTacToeDemo method Main (line 6) | public static void Main() FILE: solutions/csharp/tictactoe/TicTacToeSystem.cs class TicTacToeSystem (line 1) | class TicTacToeSystem method TicTacToeSystem (line 8) | private TicTacToeSystem() method GetInstance (line 13) | public static TicTacToeSystem GetInstance() method CreateGame (line 28) | public void CreateGame(Player player1, Player player2) method MakeMove (line 37) | public void MakeMove(Player player, int row, int col) method PrintBoard (line 62) | public void PrintBoard() method PrintScoreBoard (line 67) | public void PrintScoreBoard() FILE: solutions/csharp/trafficsignalsystem/Enums/Direction.cs type Direction (line 1) | enum Direction FILE: solutions/csharp/trafficsignalsystem/Enums/LightColor.cs type LightColor (line 1) | enum LightColor FILE: solutions/csharp/trafficsignalsystem/IntersectionController.cs class IntersectionController (line 1) | class IntersectionController method IntersectionController (line 10) | public IntersectionController(int id, Dictionary id; method GetGreenDuration (line 21) | public long GetGreenDuration() => greenDuration; method GetYellowDuration (line 22) | public long GetYellowDuration() => yellowDuration; method GetLight (line 23) | public TrafficLight GetLight(Direction direction) => trafficLights[dir... method SetState (line 25) | public void SetState(IIntersectionState state) method Start (line 30) | public void Start() method Stop (line 35) | public void Stop() method Run (line 40) | public void Run() class IntersectionControllerBuilder (line 58) | class IntersectionControllerBuilder method IntersectionControllerBuilder (line 65) | public IntersectionControllerBuilder(int id) method WithDurations (line 70) | public IntersectionControllerBuilder WithDurations(long green, long ye... method AddObserver (line 77) | public IntersectionControllerBuilder AddObserver(ITrafficObserver obse... method Build (line 83) | public IntersectionController Build() FILE: solutions/csharp/trafficsignalsystem/Observer/CentralMonitor.cs class CentralMonitor (line 1) | class CentralMonitor : ITrafficObserver method Update (line 3) | public void Update(int intersectionId, Direction direction, LightColor... FILE: solutions/csharp/trafficsignalsystem/Observer/ITrafficObserver.cs type ITrafficObserver (line 1) | interface ITrafficObserver method Update (line 3) | void Update(int intersectionId, Direction direction, LightColor color); FILE: solutions/csharp/trafficsignalsystem/States/Intersection/EastWestGreenState.cs class EastWestGreenState (line 1) | class EastWestGreenState : IIntersectionState method Handle (line 3) | public void Handle(IntersectionController context) FILE: solutions/csharp/trafficsignalsystem/States/Intersection/IIntersectionState.cs type IIntersectionState (line 1) | interface IIntersectionState method Handle (line 3) | void Handle(IntersectionController context); FILE: solutions/csharp/trafficsignalsystem/States/Intersection/NorthSouthGreenState.cs class NorthSouthGreenState (line 1) | class NorthSouthGreenState : IIntersectionState method Handle (line 3) | public void Handle(IntersectionController context) FILE: solutions/csharp/trafficsignalsystem/States/Light/GreenState.cs class GreenState (line 1) | class GreenState : ISignalState method Handle (line 3) | public void Handle(TrafficLight context) FILE: solutions/csharp/trafficsignalsystem/States/Light/ISignalState.cs type ISignalState (line 1) | interface ISignalState method Handle (line 3) | void Handle(TrafficLight context); FILE: solutions/csharp/trafficsignalsystem/States/Light/RedState.cs class RedState (line 1) | class RedState : ISignalState method Handle (line 3) | public void Handle(TrafficLight context) FILE: solutions/csharp/trafficsignalsystem/States/Light/YellowState.cs class YellowState (line 1) | class YellowState : ISignalState method Handle (line 3) | public void Handle(TrafficLight context) FILE: solutions/csharp/trafficsignalsystem/TrafficControlSystem.cs class TrafficControlSystem (line 1) | class TrafficControlSystem method TrafficControlSystem (line 8) | private TrafficControlSystem() { } method GetInstance (line 10) | public static TrafficControlSystem GetInstance() method AddIntersection (line 25) | public void AddIntersection(int intersectionId, int greenDuration, int... method StartSystem (line 34) | public void StartSystem() method StopSystem (line 51) | public void StopSystem() FILE: solutions/csharp/trafficsignalsystem/TrafficLight.cs class TrafficLight (line 1) | class TrafficLight method TrafficLight (line 10) | public TrafficLight(int intersectionId, Direction direction) method StartGreen (line 19) | public void StartGreen() method Transition (line 26) | public void Transition() method SetColor (line 32) | public void SetColor(LightColor color) method SetNextState (line 41) | public void SetNextState(ISignalState state) method GetCurrentColor (line 46) | public LightColor GetCurrentColor() => currentColor; method GetDirection (line 47) | public Direction GetDirection() => direction; method AddObserver (line 50) | public void AddObserver(ITrafficObserver observer) method RemoveObserver (line 55) | public void RemoveObserver(ITrafficObserver observer) method NotifyObservers (line 60) | private void NotifyObservers() FILE: solutions/csharp/trafficsignalsystem/TrafficSystemDemo.cs class TrafficSystemDemo (line 7) | public class TrafficSystemDemo method Main (line 9) | public static void Main(string[] args) FILE: solutions/csharp/vendingmachine/Enum/Coin.cs type Coin (line 1) | enum Coin FILE: solutions/csharp/vendingmachine/Models/Inventory.cs class Inventory (line 1) | class Inventory method AddItem (line 6) | public void AddItem(string code, Item item, int quantity) method GetItem (line 12) | public Item GetItem(string code) method IsAvailable (line 17) | public bool IsAvailable(string code) method ReduceStock (line 22) | public void ReduceStock(string code) FILE: solutions/csharp/vendingmachine/Models/Item.cs class Item (line 1) | class Item method Item (line 7) | public Item(string code, string name, int price) method GetName (line 14) | public string GetName() method GetPrice (line 19) | public int GetPrice() FILE: solutions/csharp/vendingmachine/States/DispensingState.cs class DispensingState (line 1) | class DispensingState : VendingMachineState method DispensingState (line 3) | public DispensingState(VendingMachine machine) : base(machine) method InsertCoin (line 7) | public override void InsertCoin(Coin coin) method SelectItem (line 12) | public override void SelectItem(string code) method Dispense (line 17) | public override void Dispense() method Refund (line 22) | public override void Refund() FILE: solutions/csharp/vendingmachine/States/HasMoneyState.cs class HasMoneyState (line 1) | class HasMoneyState : VendingMachineState method HasMoneyState (line 3) | public HasMoneyState(VendingMachine machine) : base(machine) method InsertCoin (line 7) | public override void InsertCoin(Coin coin) method SelectItem (line 12) | public override void SelectItem(string code) method Dispense (line 17) | public override void Dispense() method Refund (line 23) | public override void Refund() FILE: solutions/csharp/vendingmachine/States/IdleState.cs class IdleState (line 1) | class IdleState : VendingMachineState method IdleState (line 3) | public IdleState(VendingMachine machine) : base(machine) method InsertCoin (line 7) | public override void InsertCoin(Coin coin) method SelectItem (line 12) | public override void SelectItem(string code) method Dispense (line 24) | public override void Dispense() method Refund (line 29) | public override void Refund() FILE: solutions/csharp/vendingmachine/States/ItemSelectedState.cs class ItemSelectedState (line 1) | class ItemSelectedState : VendingMachineState method ItemSelectedState (line 3) | public ItemSelectedState(VendingMachine machine) : base(machine) method InsertCoin (line 7) | public override void InsertCoin(Coin coin) method SelectItem (line 19) | public override void SelectItem(string code) method Dispense (line 24) | public override void Dispense() method Refund (line 29) | public override void Refund() FILE: solutions/csharp/vendingmachine/States/VendingMachineState.cs class VendingMachineState (line 1) | abstract class VendingMachineState method VendingMachineState (line 5) | public VendingMachineState(VendingMachine machine) method InsertCoin (line 10) | public abstract void InsertCoin(Coin coin); method SelectItem (line 11) | public abstract void SelectItem(string code); method Dispense (line 12) | public abstract void Dispense(); method Refund (line 13) | public abstract void Refund(); FILE: solutions/csharp/vendingmachine/VendingMachine.cs class VendingMachine (line 1) | class VendingMachine method VendingMachine (line 9) | public VendingMachine() method GetInstance (line 14) | public static VendingMachine GetInstance() method InsertCoin (line 19) | public void InsertCoin(Coin coin) method AddItem (line 24) | public Item AddItem(string code, string name, int price, int quantity) method SelectItem (line 31) | public void SelectItem(string code) method Dispense (line 36) | public void Dispense() method DispenseItem (line 41) | public void DispenseItem() method RefundBalance (line 58) | public void RefundBalance() method Reset (line 64) | public void Reset() method AddBalance (line 70) | public void AddBalance(int value) method GetSelectedItem (line 75) | public Item GetSelectedItem() method SetSelectedItemCode (line 80) | public void SetSelectedItemCode(string code) method SetState (line 85) | public void SetState(VendingMachineState state) method GetInventory (line 90) | public Inventory GetInventory() { return inventory; } method GetBalance (line 91) | public int GetBalance() { return balance; } FILE: solutions/csharp/vendingmachine/VendingMachineDemo.cs class VendingMachineDemo (line 4) | public class VendingMachineDemo method Main (line 6) | public static void Main() FILE: solutions/golang/airlinemanagementsystem/aircraft.go type Aircraft (line 3) | type Aircraft struct function NewAircraft (line 9) | func NewAircraft(tailNumber, model string, totalSeats int) *Aircraft { FILE: solutions/golang/airlinemanagementsystem/airline_management_system.go type AirlineManagementSystem (line 8) | type AirlineManagementSystem struct method AddFlight (line 28) | func (ams *AirlineManagementSystem) AddFlight(flight *Flight) { method AddAircraft (line 34) | func (ams *AirlineManagementSystem) AddAircraft(aircraft *Aircraft) { method SearchFlights (line 40) | func (ams *AirlineManagementSystem) SearchFlights(source, destination ... method BookFlight (line 44) | func (ams *AirlineManagementSystem) BookFlight(flight *Flight, passeng... method CancelBooking (line 48) | func (ams *AirlineManagementSystem) CancelBooking(bookingNumber string) { method ProcessPayment (line 52) | func (ams *AirlineManagementSystem) ProcessPayment(payment *Payment) { function NewAirlineManagementSystem (line 17) | func NewAirlineManagementSystem() *AirlineManagementSystem { FILE: solutions/golang/airlinemanagementsystem/airline_management_system_demo.go type Demo (line 8) | type Demo struct function NewDemo (line 12) | func NewDemo() *Demo { function Run (line 18) | func Run() { FILE: solutions/golang/airlinemanagementsystem/booking.go type Booking (line 5) | type Booking struct method Cancel (line 26) | func (b *Booking) Cancel() { function NewBooking (line 15) | func NewBooking(bookingNumber string, flight *Flight, passenger *Passeng... FILE: solutions/golang/airlinemanagementsystem/booking_manager.go type BookingManager (line 10) | type BookingManager struct method CreateBooking (line 30) | func (bm *BookingManager) CreateBooking(flight *Flight, passenger *Pas... method CancelBooking (line 40) | func (bm *BookingManager) CancelBooking(bookingNumber string) { method generateBookingNumber (line 49) | func (bm *BookingManager) generateBookingNumber() string { function GetBookingManager (line 21) | func GetBookingManager() *BookingManager { FILE: solutions/golang/airlinemanagementsystem/flight.go type Flight (line 8) | type Flight struct function NewFlight (line 18) | func NewFlight(flightNumber, source, destination string, departureTime, ... FILE: solutions/golang/airlinemanagementsystem/flight_search.go type FlightSearch (line 9) | type FlightSearch struct method SearchFlights (line 20) | func (fs *FlightSearch) SearchFlights(source, destination string, date... function NewFlightSearch (line 14) | func NewFlightSearch(flights []*Flight) *FlightSearch { FILE: solutions/golang/airlinemanagementsystem/passenger.go type Passenger (line 3) | type Passenger struct function NewPassenger (line 10) | func NewPassenger(id, name, email, phone string) *Passenger { FILE: solutions/golang/airlinemanagementsystem/payment.go type Payment (line 5) | type Payment struct method ProcessPayment (line 22) | func (p *Payment) ProcessPayment() { function NewPayment (line 13) | func NewPayment(paymentID, paymentMethod string, amount float64) *Payment { FILE: solutions/golang/airlinemanagementsystem/payment_processor.go type PaymentProcessor (line 5) | type PaymentProcessor struct method ProcessPayment (line 21) | func (p *PaymentProcessor) ProcessPayment(payment *Payment) { function GetPaymentProcessor (line 14) | func GetPaymentProcessor() *PaymentProcessor { FILE: solutions/golang/airlinemanagementsystem/seat.go type Seat (line 5) | type Seat struct method Reserve (line 20) | func (s *Seat) Reserve() { method Release (line 26) | func (s *Seat) Release() { method GetStatus (line 32) | func (s *Seat) GetStatus() SeatStatus { function NewSeat (line 12) | func NewSeat(seatNumber string, seatType SeatType) *Seat { FILE: solutions/golang/airlinemanagementsystem/types.go type SeatType (line 3) | type SeatType type SeatStatus (line 4) | type SeatStatus type BookingStatus (line 5) | type BookingStatus type PaymentStatus (line 6) | type PaymentStatus constant SeatTypeEconomy (line 9) | SeatTypeEconomy SeatType = iota constant SeatTypePremiumEconomy (line 10) | SeatTypePremiumEconomy constant SeatTypeBusiness (line 11) | SeatTypeBusiness constant SeatTypeFirstClass (line 12) | SeatTypeFirstClass constant SeatStatusAvailable (line 16) | SeatStatusAvailable SeatStatus = iota constant SeatStatusReserved (line 17) | SeatStatusReserved constant SeatStatusOccupied (line 18) | SeatStatusOccupied constant BookingStatusConfirmed (line 22) | BookingStatusConfirmed BookingStatus = iota constant BookingStatusCancelled (line 23) | BookingStatusCancelled constant BookingStatusPending (line 24) | BookingStatusPending constant BookingStatusExpired (line 25) | BookingStatusExpired constant PaymentStatusPending (line 29) | PaymentStatusPending PaymentStatus = iota constant PaymentStatusCompleted (line 30) | PaymentStatusCompleted constant PaymentStatusFailed (line 31) | PaymentStatusFailed constant PaymentStatusRefunded (line 32) | PaymentStatusRefunded FILE: solutions/golang/atm/account.go type Account (line 5) | type Account struct method GetAccountNumber (line 18) | func (a *Account) GetAccountNumber() string { method GetBalance (line 22) | func (a *Account) GetBalance() float64 { method Debit (line 28) | func (a *Account) Debit(amount float64) error { method Credit (line 38) | func (a *Account) Credit(amount float64) error { function NewAccount (line 11) | func NewAccount(accountNumber string, balance float64) *Account { FILE: solutions/golang/atm/atm.go type ATM (line 10) | type ATM struct method AuthenticateUser (line 23) | func (a *ATM) AuthenticateUser(card *Card) error { method CheckBalance (line 28) | func (a *ATM) CheckBalance(accountNumber string) (float64, error) { method WithdrawCash (line 36) | func (a *ATM) WithdrawCash(accountNumber string, amount float64) error { method DepositCash (line 50) | func (a *ATM) DepositCash(accountNumber string, amount float64) error { method generateTransactionID (line 60) | func (a *ATM) generateTransactionID() string { function NewATM (line 16) | func NewATM(bankingService *BankingService, cashDispenser *CashDispenser... FILE: solutions/golang/atm/atm_demo.go function Run (line 7) | func Run() { FILE: solutions/golang/atm/banking_service.go type BankingService (line 7) | type BankingService struct method CreateAccount (line 18) | func (bs *BankingService) CreateAccount(accountNumber string, initialB... method GetAccount (line 24) | func (bs *BankingService) GetAccount(accountNumber string) *Account { method ProcessTransaction (line 30) | func (bs *BankingService) ProcessTransaction(transaction Transaction) ... function NewBankingService (line 12) | func NewBankingService() *BankingService { FILE: solutions/golang/atm/card.go type Card (line 3) | type Card struct function NewCard (line 8) | func NewCard(cardNumber, pin string) *Card { FILE: solutions/golang/atm/cash_dispenser.go type CashDispenser (line 7) | type CashDispenser struct method DispenseCash (line 18) | func (cd *CashDispenser) DispenseCash(amount int) error { function NewCashDispenser (line 12) | func NewCashDispenser(initialCash int) *CashDispenser { FILE: solutions/golang/atm/deposit_transaction.go type DepositTransaction (line 3) | type DepositTransaction struct method Execute (line 17) | func (t *DepositTransaction) Execute() error { function NewDepositTransaction (line 7) | func NewDepositTransaction(transactionID string, account *Account, amoun... FILE: solutions/golang/atm/transaction.go type Transaction (line 3) | type Transaction interface type BaseTransaction (line 7) | type BaseTransaction struct FILE: solutions/golang/atm/withdrawal_transaction.go type WithdrawalTransaction (line 3) | type WithdrawalTransaction struct method Execute (line 17) | func (t *WithdrawalTransaction) Execute() error { function NewWithdrawalTransaction (line 7) | func NewWithdrawalTransaction(transactionID string, account *Account, am... FILE: solutions/golang/carrentalsystem/car.go type Car (line 5) | type Car struct method IsAvailable (line 26) | func (c *Car) IsAvailable() bool { method SetAvailable (line 32) | func (c *Car) SetAvailable(available bool) { function NewCar (line 15) | func NewCar(make, model string, year int, licensePlate string, rentalPri... FILE: solutions/golang/carrentalsystem/car_rental_system_demo.go function Run (line 8) | func Run() { FILE: solutions/golang/carrentalsystem/credit_card_processor.go type CreditCardPaymentProcessor (line 3) | type CreditCardPaymentProcessor struct method ProcessPayment (line 9) | func (p *CreditCardPaymentProcessor) ProcessPayment(amount float64) bo... function NewCreditCardPaymentProcessor (line 5) | func NewCreditCardPaymentProcessor() *CreditCardPaymentProcessor { FILE: solutions/golang/carrentalsystem/customer.go type Customer (line 3) | type Customer struct function NewCustomer (line 9) | func NewCustomer(name, contactInfo, driversLicenseNumber string) *Custom... FILE: solutions/golang/carrentalsystem/payment_processor.go type PaymentProcessor (line 3) | type PaymentProcessor interface FILE: solutions/golang/carrentalsystem/paypal_processor.go type PayPalPaymentProcessor (line 3) | type PayPalPaymentProcessor struct method ProcessPayment (line 9) | func (p *PayPalPaymentProcessor) ProcessPayment(amount float64) bool { function NewPayPalPaymentProcessor (line 5) | func NewPayPalPaymentProcessor() *PayPalPaymentProcessor { FILE: solutions/golang/carrentalsystem/rental_system.go type RentalSystem (line 12) | type RentalSystem struct method AddCar (line 35) | func (rs *RentalSystem) AddCar(car *Car) { method RemoveCar (line 41) | func (rs *RentalSystem) RemoveCar(licensePlate string) { method SearchCars (line 47) | func (rs *RentalSystem) SearchCars(make, model string, startDate, endD... method isCarAvailable (line 63) | func (rs *RentalSystem) isCarAvailable(car *Car, startDate, endDate ti... method MakeReservation (line 74) | func (rs *RentalSystem) MakeReservation(customer *Customer, car *Car, ... method CancelReservation (line 90) | func (rs *RentalSystem) CancelReservation(reservationID string) { method ProcessPayment (line 100) | func (rs *RentalSystem) ProcessPayment(reservation *Reservation) bool { method generateReservationID (line 104) | func (rs *RentalSystem) generateReservationID() string { function GetRentalSystem (line 24) | func GetRentalSystem() *RentalSystem { FILE: solutions/golang/carrentalsystem/reservation.go type Reservation (line 7) | type Reservation struct method calculateTotalPrice (line 28) | func (r *Reservation) calculateTotalPrice() float64 { function NewReservation (line 16) | func NewReservation(reservationID string, customer *Customer, car *Car, ... FILE: solutions/golang/chessgame/board.go type Board (line 3) | type Board struct method initializeBoard (line 18) | func (b *Board) initializeBoard() { method GetPiece (line 46) | func (b *Board) GetPiece(row, col int) Piece { method SetPiece (line 53) | func (b *Board) SetPiece(row, col int, piece Piece) { method IsValidMove (line 59) | func (b *Board) IsValidMove(piece Piece, destRow, destCol int) bool { method IsCheckmate (line 68) | func (b *Board) IsCheckmate(color Color) bool { method IsStalemate (line 73) | func (b *Board) IsStalemate(color Color) bool { function NewBoard (line 7) | func NewBoard() *Board { FILE: solutions/golang/chessgame/chess_game.go type ChessGame (line 10) | type ChessGame struct method Start (line 24) | func (g *ChessGame) Start() { method isGameOver (line 49) | func (g *ChessGame) isGameOver() bool { method getPlayerMove (line 54) | func (g *ChessGame) getPlayerMove(player *Player, reader *bufio.Reader... method displayResult (line 72) | func (g *ChessGame) displayResult() { function NewChessGame (line 16) | func NewChessGame() *ChessGame { function readLine (line 82) | func readLine(reader *bufio.Reader) string { FILE: solutions/golang/chessgame/chess_game_demo.go function Run (line 3) | func Run() { FILE: solutions/golang/chessgame/color.go type Color (line 3) | type Color method String (line 10) | func (c Color) String() string { constant White (line 6) | White Color = iota constant Black (line 7) | Black FILE: solutions/golang/chessgame/errors.go type InvalidMoveError (line 3) | type InvalidMoveError struct method Error (line 11) | func (e *InvalidMoveError) Error() string { function NewInvalidMoveError (line 7) | func NewInvalidMoveError(message string) *InvalidMoveError { FILE: solutions/golang/chessgame/move.go type Move (line 3) | type Move struct function NewMove (line 9) | func NewMove(piece Piece, destRow, destCol int) *Move { FILE: solutions/golang/chessgame/piece.go type Piece (line 3) | type Piece interface type BasePiece (line 11) | type BasePiece struct method GetColor (line 17) | func (p *BasePiece) GetColor() Color { return p.color } method GetRow (line 18) | func (p *BasePiece) GetRow() int { return p.row } method GetCol (line 19) | func (p *BasePiece) GetCol() int { return p.col } method SetPosition (line 20) | func (p *BasePiece) SetPosition(row, col int) { FILE: solutions/golang/chessgame/pieces.go type Pawn (line 5) | type Pawn struct method CanMove (line 13) | func (p *Pawn) CanMove(board *Board, destRow, destCol int) bool { function NewPawn (line 9) | func NewPawn(color Color, row, col int) *Pawn { type Rook (line 27) | type Rook struct method CanMove (line 35) | func (r *Rook) CanMove(board *Board, destRow, destCol int) bool { function NewRook (line 31) | func NewRook(color Color, row, col int) *Rook { type Knight (line 39) | type Knight struct method CanMove (line 47) | func (k *Knight) CanMove(board *Board, destRow, destCol int) bool { function NewKnight (line 43) | func NewKnight(color Color, row, col int) *Knight { type Bishop (line 53) | type Bishop struct method CanMove (line 61) | func (b *Bishop) CanMove(board *Board, destRow, destCol int) bool { function NewBishop (line 57) | func NewBishop(color Color, row, col int) *Bishop { type Queen (line 67) | type Queen struct method CanMove (line 75) | func (q *Queen) CanMove(board *Board, destRow, destCol int) bool { function NewQueen (line 71) | func NewQueen(color Color, row, col int) *Queen { type King (line 81) | type King struct method CanMove (line 89) | func (k *King) CanMove(board *Board, destRow, destCol int) bool { function NewKing (line 85) | func NewKing(color Color, row, col int) *King { FILE: solutions/golang/chessgame/player.go type Player (line 3) | type Player struct method MakeMove (line 11) | func (p *Player) MakeMove(board *Board, move *Move) error { function NewPlayer (line 7) | func NewPlayer(color Color) *Player { FILE: solutions/golang/coffeevendingmachine/coffee.go type Coffee (line 3) | type Coffee struct method GetName (line 17) | func (c *Coffee) GetName() string { method GetPrice (line 21) | func (c *Coffee) GetPrice() float64 { method GetRecipe (line 25) | func (c *Coffee) GetRecipe() map[*Ingredient]int { function NewCoffee (line 9) | func NewCoffee(name string, price float64, recipe map[*Ingredient]int) *... FILE: solutions/golang/coffeevendingmachine/coffee_machine.go type CoffeeMachine (line 8) | type CoffeeMachine struct method initializeIngredients (line 31) | func (cm *CoffeeMachine) initializeIngredients() { method initializeCoffeeMenu (line 37) | func (cm *CoffeeMachine) initializeCoffeeMenu() { method DisplayMenu (line 59) | func (cm *CoffeeMachine) DisplayMenu() { method SelectCoffee (line 66) | func (cm *CoffeeMachine) SelectCoffee(coffeeName string) *Coffee { method DispenseCoffee (line 78) | func (cm *CoffeeMachine) DispenseCoffee(coffee *Coffee, payment *Payme... method hasEnoughIngredients (line 105) | func (cm *CoffeeMachine) hasEnoughIngredients(coffee *Coffee) bool { method updateIngredients (line 114) | func (cm *CoffeeMachine) updateIngredients(coffee *Coffee) { function GetCoffeeMachine (line 19) | func GetCoffeeMachine() *CoffeeMachine { FILE: solutions/golang/coffeevendingmachine/coffee_vending_machine_demo.go function Run (line 7) | func Run() { FILE: solutions/golang/coffeevendingmachine/ingredient.go type Ingredient (line 5) | type Ingredient struct method GetName (line 18) | func (i *Ingredient) GetName() string { method GetQuantity (line 22) | func (i *Ingredient) GetQuantity() int { method UpdateQuantity (line 28) | func (i *Ingredient) UpdateQuantity(amount int) { function NewIngredient (line 11) | func NewIngredient(name string, quantity int) *Ingredient { FILE: solutions/golang/coffeevendingmachine/payment.go type Payment (line 3) | type Payment struct function NewPayment (line 7) | func NewPayment(amount float64) *Payment { FILE: solutions/golang/concertticketbookingsystem/booking.go type Booking (line 3) | type Booking struct method ConfirmBooking (line 24) | func (b *Booking) ConfirmBooking() { method CancelBooking (line 31) | func (b *Booking) CancelBooking() { function NewBooking (line 12) | func NewBooking(id string, user *User, concert *Concert, seats []*Seat) ... function calculateTotalPrice (line 41) | func calculateTotalPrice(seats []*Seat) float64 { FILE: solutions/golang/concertticketbookingsystem/concert.go type Concert (line 5) | type Concert struct function NewConcert (line 13) | func NewConcert(id, artist, venue string, dateTime time.Time, seats []*S... FILE: solutions/golang/concertticketbookingsystem/concert_booking_system.go type ConcertTicketBookingSystem (line 9) | type ConcertTicketBookingSystem struct method AddConcert (line 30) | func (bs *ConcertTicketBookingSystem) AddConcert(concert *Concert) { method GetConcert (line 36) | func (bs *ConcertTicketBookingSystem) GetConcert(concertID string) *Co... method SearchConcerts (line 42) | func (bs *ConcertTicketBookingSystem) SearchConcerts(artist, venue str... method BookTickets (line 57) | func (bs *ConcertTicketBookingSystem) BookTickets(user *User, concert ... method CancelBooking (line 97) | func (bs *ConcertTicketBookingSystem) CancelBooking(bookingID string) { method processPayment (line 108) | func (bs *ConcertTicketBookingSystem) processPayment(booking *Booking) { function GetBookingSystem (line 20) | func GetBookingSystem() *ConcertTicketBookingSystem { FILE: solutions/golang/concertticketbookingsystem/concert_booking_system_demo.go function Run (line 8) | func Run() { FILE: solutions/golang/concertticketbookingsystem/errors.go type SeatNotAvailableError (line 3) | type SeatNotAvailableError struct method Error (line 11) | func (e *SeatNotAvailableError) Error() string { function NewSeatNotAvailableError (line 7) | func NewSeatNotAvailableError(message string) *SeatNotAvailableError { FILE: solutions/golang/concertticketbookingsystem/seat.go type Seat (line 5) | type Seat struct method Book (line 24) | func (s *Seat) Book() error { method Release (line 35) | func (s *Seat) Release() { method GetStatus (line 44) | func (s *Seat) GetStatus() SeatStatus { function NewSeat (line 14) | func NewSeat(id, seatNumber string, seatType SeatType, price float64) *S... FILE: solutions/golang/concertticketbookingsystem/types.go type SeatType (line 3) | type SeatType type SeatStatus (line 4) | type SeatStatus type BookingStatus (line 5) | type BookingStatus constant SeatTypeRegular (line 8) | SeatTypeRegular SeatType = iota constant SeatTypePremium (line 9) | SeatTypePremium constant SeatTypeVIP (line 10) | SeatTypeVIP constant StatusAvailable (line 14) | StatusAvailable SeatStatus = iota constant StatusBooked (line 15) | StatusBooked constant StatusReserved (line 16) | StatusReserved constant BookingStatusPending (line 20) | BookingStatusPending BookingStatus = iota constant BookingStatusConfirmed (line 21) | BookingStatusConfirmed constant BookingStatusCancelled (line 22) | BookingStatusCancelled FILE: solutions/golang/concertticketbookingsystem/user.go type User (line 3) | type User struct function NewUser (line 9) | func NewUser(id, name, email string) *User { FILE: solutions/golang/concertticketbookingsystem/utils.go function GenerateSeats (line 5) | func GenerateSeats(numberOfSeats int) []*Seat { FILE: solutions/golang/courseregistrationsystem/course.go type Course (line 5) | type Course struct method GetEnrolledStudents (line 23) | func (c *Course) GetEnrolledStudents() int { method IncrementEnrolled (line 29) | func (c *Course) IncrementEnrolled() { function NewCourse (line 14) | func NewCourse(code, name, instructor string, maxCapacity int) *Course { FILE: solutions/golang/courseregistrationsystem/course_registration_system.go type CourseRegistrationSystem (line 9) | type CourseRegistrationSystem struct method AddCourse (line 32) | func (rs *CourseRegistrationSystem) AddCourse(course *Course) { method AddStudent (line 38) | func (rs *CourseRegistrationSystem) AddStudent(student *Student) { method SearchCourses (line 44) | func (rs *CourseRegistrationSystem) SearchCourses(query string) []*Cou... method RegisterCourse (line 60) | func (rs *CourseRegistrationSystem) RegisterCourse(student *Student, c... method GetRegisteredCourses (line 98) | func (rs *CourseRegistrationSystem) GetRegisteredCourses(student *Stud... method notifyObservers (line 109) | func (rs *CourseRegistrationSystem) notifyObservers(course *Course) { function GetRegistrationSystem (line 21) | func GetRegistrationSystem() *CourseRegistrationSystem { FILE: solutions/golang/courseregistrationsystem/course_registration_system_demo.go function Run (line 7) | func Run() { FILE: solutions/golang/courseregistrationsystem/registration.go type Registration (line 5) | type Registration struct function NewRegistration (line 11) | func NewRegistration(student *Student, course *Course) *Registration { FILE: solutions/golang/courseregistrationsystem/student.go type Student (line 5) | type Student struct method AddCourse (line 22) | func (s *Student) AddCourse(course *Course) { function NewStudent (line 13) | func NewStudent(id int, name, email string) *Student { FILE: solutions/golang/cricinfo/ball.go type Ball (line 3) | type Ball struct function NewBall (line 10) | func NewBall(ballNumber int, bowler, batsman, result string) *Ball { FILE: solutions/golang/cricinfo/cricinfo.go function Run (line 8) | func Run() { function displayScorecard (line 65) | func displayScorecard(scorecard *Scorecard) { FILE: solutions/golang/cricinfo/cricinfo_system.go type CricinfoSystem (line 3) | type CricinfoSystem struct method AddMatch (line 15) | func (cs *CricinfoSystem) AddMatch(match *Match) { method GetMatch (line 19) | func (cs *CricinfoSystem) GetMatch(matchID string) *Match { method GetAllMatches (line 23) | func (cs *CricinfoSystem) GetAllMatches() []*Match { method UpdateMatchStatus (line 27) | func (cs *CricinfoSystem) UpdateMatchStatus(matchID string, status Mat... method CreateScorecard (line 31) | func (cs *CricinfoSystem) CreateScorecard(match *Match) string { method GetScorecard (line 35) | func (cs *CricinfoSystem) GetScorecard(scorecardID string) *Scorecard { method UpdateScore (line 39) | func (cs *CricinfoSystem) UpdateScore(scorecardID string, teamID strin... method AddInnings (line 43) | func (cs *CricinfoSystem) AddInnings(scorecardID string, innings *Inni... function NewCricinfoSystem (line 8) | func NewCricinfoSystem() *CricinfoSystem { FILE: solutions/golang/cricinfo/innings.go type Innings (line 3) | type Innings struct method AddOver (line 19) | func (i *Innings) AddOver(over *Over) { function NewInnings (line 10) | func NewInnings(id, battingTeamID, bowlingTeamID string) *Innings { FILE: solutions/golang/cricinfo/match.go type Match (line 5) | type Match struct function NewMatch (line 15) | func NewMatch(id, title, venue string, startTime time.Time, teams []*Tea... FILE: solutions/golang/cricinfo/match_service.go type MatchService (line 7) | type MatchService struct method AddMatch (line 26) | func (ms *MatchService) AddMatch(match *Match) { method GetMatch (line 32) | func (ms *MatchService) GetMatch(matchID string) *Match { method GetAllMatches (line 38) | func (ms *MatchService) GetAllMatches() []*Match { method UpdateMatchStatus (line 49) | func (ms *MatchService) UpdateMatchStatus(matchID string, status Match... function GetMatchService (line 17) | func GetMatchService() *MatchService { FILE: solutions/golang/cricinfo/over.go type Over (line 3) | type Over struct method AddBall (line 15) | func (o *Over) AddBall(ball *Ball) { function NewOver (line 8) | func NewOver(overNumber int) *Over { FILE: solutions/golang/cricinfo/player.go type Player (line 3) | type Player struct function NewPlayer (line 9) | func NewPlayer(id, name, role string) *Player { FILE: solutions/golang/cricinfo/scorecard.go type Scorecard (line 5) | type Scorecard struct method UpdateScore (line 22) | func (s *Scorecard) UpdateScore(teamID string, score int) { method AddInnings (line 28) | func (s *Scorecard) AddInnings(innings *Innings) { function NewScorecard (line 13) | func NewScorecard(id string, match *Match) *Scorecard { FILE: solutions/golang/cricinfo/scorecard_service.go type ScorecardService (line 9) | type ScorecardService struct method CreateScorecard (line 29) | func (ss *ScorecardService) CreateScorecard(match *Match) string { method GetScorecard (line 39) | func (ss *ScorecardService) GetScorecard(scorecardID string) *Scorecard { method UpdateScore (line 45) | func (ss *ScorecardService) UpdateScore(scorecardID string, teamID str... method AddInnings (line 55) | func (ss *ScorecardService) AddInnings(scorecardID string, innings *In... method generateScorecardID (line 65) | func (ss *ScorecardService) generateScorecardID(matchID string) string { function GetScorecardService (line 20) | func GetScorecardService() *ScorecardService { FILE: solutions/golang/cricinfo/team.go type Team (line 3) | type Team struct function NewTeam (line 9) | func NewTeam(id, name string, players []*Player) *Team { FILE: solutions/golang/cricinfo/types.go type MatchStatus (line 3) | type MatchStatus method String (line 12) | func (s MatchStatus) String() string { constant MatchStatusScheduled (line 6) | MatchStatusScheduled MatchStatus = iota constant MatchStatusInProgress (line 7) | MatchStatusInProgress constant MatchStatusCompleted (line 8) | MatchStatusCompleted constant MatchStatusAbandoned (line 9) | MatchStatusAbandoned FILE: solutions/golang/digitalwalletservice/account.go type Account (line 8) | type Account struct method Deposit (line 29) | func (a *Account) Deposit(amount *big.Float) { method Withdraw (line 35) | func (a *Account) Withdraw(amount *big.Float) error { method AddTransaction (line 46) | func (a *Account) AddTransaction(transaction *Transaction) { method GetBalance (line 52) | func (a *Account) GetBalance() *big.Float { method GetTransactions (line 58) | func (a *Account) GetTransactions() []*Transaction { function NewAccount (line 18) | func NewAccount(id string, user *User, accountNumber string, currency Cu... FILE: solutions/golang/digitalwalletservice/bank_account.go type BankAccount (line 5) | type BankAccount struct method ProcessPayment (line 19) | func (b *BankAccount) ProcessPayment(amount *big.Float, currency Curre... function NewBankAccount (line 11) | func NewBankAccount(id string, user *User, accountNumber, routingNumber ... FILE: solutions/golang/digitalwalletservice/credit_card.go type CreditCard (line 5) | type CreditCard struct method ProcessPayment (line 21) | func (c *CreditCard) ProcessPayment(amount *big.Float, currency Curren... function NewCreditCard (line 12) | func NewCreditCard(id string, user *User, cardNumber, expirationDate, cv... FILE: solutions/golang/digitalwalletservice/currency_converter.go type CurrencyConverter (line 8) | type CurrencyConverter struct method initializeRates (line 28) | func (cc *CurrencyConverter) initializeRates() { method Convert (line 39) | func (cc *CurrencyConverter) Convert(amount *big.Float, sourceCurrency... function GetCurrencyConverter (line 18) | func GetCurrencyConverter() *CurrencyConverter { FILE: solutions/golang/digitalwalletservice/digital_wallet.go type DigitalWallet (line 10) | type DigitalWallet struct method CreateUser (line 33) | func (dw *DigitalWallet) CreateUser(user *User) { method CreateAccount (line 39) | func (dw *DigitalWallet) CreateAccount(account *Account) { method AddPaymentMethod (line 46) | func (dw *DigitalWallet) AddPaymentMethod(method PaymentMethod) { method TransferFunds (line 52) | func (dw *DigitalWallet) TransferFunds(sourceAccount, destinationAccou... method GetTransactionHistory (line 87) | func (dw *DigitalWallet) GetTransactionHistory(account *Account) []*Tr... function GetDigitalWallet (line 22) | func GetDigitalWallet() *DigitalWallet { FILE: solutions/golang/digitalwalletservice/digital_wallet_demo.go function Run (line 8) | func Run() { FILE: solutions/golang/digitalwalletservice/errors.go type InsufficientFundsError (line 3) | type InsufficientFundsError struct method Error (line 11) | func (e *InsufficientFundsError) Error() string { function NewInsufficientFundsError (line 7) | func NewInsufficientFundsError(message string) *InsufficientFundsError { FILE: solutions/golang/digitalwalletservice/payment_method.go type PaymentMethod (line 5) | type PaymentMethod interface type BasePaymentMethod (line 11) | type BasePaymentMethod struct method GetID (line 16) | func (b *BasePaymentMethod) GetID() string { method GetUser (line 20) | func (b *BasePaymentMethod) GetUser() *User { FILE: solutions/golang/digitalwalletservice/transaction.go type Transaction (line 8) | type Transaction struct function NewTransaction (line 17) | func NewTransaction(id string, sourceAccount, destinationAccount *Accoun... FILE: solutions/golang/digitalwalletservice/types.go type Currency (line 3) | type Currency constant USD (line 6) | USD Currency = "USD" constant EUR (line 7) | EUR Currency = "EUR" constant GBP (line 8) | GBP Currency = "GBP" constant JPY (line 9) | JPY Currency = "JPY" FILE: solutions/golang/digitalwalletservice/user.go type User (line 5) | type User struct method AddAccount (line 24) | func (u *User) AddAccount(account *Account) { method RemoveAccount (line 30) | func (u *User) RemoveAccount(account *Account) { function NewUser (line 14) | func NewUser(id, name, email, password string) *User { FILE: solutions/golang/elevatorsystem/direction.go type Direction (line 3) | type Direction method String (line 10) | func (d Direction) String() string { constant DirectionUp (line 6) | DirectionUp Direction = iota constant DirectionDown (line 7) | DirectionDown FILE: solutions/golang/elevatorsystem/elevator.go type Elevator (line 9) | type Elevator struct method AddRequest (line 30) | func (e *Elevator) AddRequest(request *Request) bool { method getCurrentFloor (line 41) | func (e *Elevator) getCurrentFloor() int { method setCurrentFloor (line 47) | func (e *Elevator) setCurrentFloor(floor int) { method Run (line 53) | func (e *Elevator) Run() { method Stop (line 66) | func (e *Elevator) Stop() { method processRequest (line 70) | func (e *Elevator) processRequest(request *Request) { function NewElevator (line 19) | func NewElevator(id, capacity int) *Elevator { FILE: solutions/golang/elevatorsystem/elevator_controller.go type ElevatorController (line 8) | type ElevatorController struct method RequestElevator (line 27) | func (ec *ElevatorController) RequestElevator(sourceFloor, destination... method findOptimalElevator (line 33) | func (ec *ElevatorController) findOptimalElevator(sourceFloor, destina... method Stop (line 51) | func (ec *ElevatorController) Stop() { function NewElevatorController (line 13) | func NewElevatorController(numElevators, capacity int) *ElevatorControll... FILE: solutions/golang/elevatorsystem/elevator_controller_demo.go function Run (line 7) | func Run() { FILE: solutions/golang/elevatorsystem/request.go type Request (line 3) | type Request struct function NewRequest (line 8) | func NewRequest(sourceFloor, destinationFloor int) *Request { FILE: solutions/golang/fooddeliveryservice/customer.go type Customer (line 3) | type Customer struct function NewCustomer (line 10) | func NewCustomer(id, name, email, phone string) *Customer { FILE: solutions/golang/fooddeliveryservice/delivery_agent.go type DeliveryAgent (line 5) | type DeliveryAgent struct method SetAvailable (line 22) | func (d *DeliveryAgent) SetAvailable(available bool) { method IsAvailable (line 28) | func (d *DeliveryAgent) IsAvailable() bool { function NewDeliveryAgent (line 13) | func NewDeliveryAgent(id, name, phone string) *DeliveryAgent { FILE: solutions/golang/fooddeliveryservice/food_delivery_service.go type FoodDeliveryService (line 9) | type FoodDeliveryService struct method RegisterCustomer (line 34) | func (s *FoodDeliveryService) RegisterCustomer(customer *Customer) { method RegisterRestaurant (line 40) | func (s *FoodDeliveryService) RegisterRestaurant(restaurant *Restauran... method RegisterDeliveryAgent (line 46) | func (s *FoodDeliveryService) RegisterDeliveryAgent(agent *DeliveryAge... method GetAvailableRestaurants (line 52) | func (s *FoodDeliveryService) GetAvailableRestaurants() []*Restaurant { method GetRestaurantMenu (line 62) | func (s *FoodDeliveryService) GetRestaurantMenu(restaurantID string) [... method PlaceOrder (line 73) | func (s *FoodDeliveryService) PlaceOrder(customerID, restaurantID stri... method UpdateOrderStatus (line 100) | func (s *FoodDeliveryService) UpdateOrderStatus(orderID string, status... method CancelOrder (line 118) | func (s *FoodDeliveryService) CancelOrder(orderID string) error { method notifyCustomer (line 138) | func (s *FoodDeliveryService) notifyCustomer(order *Order) { method notifyRestaurant (line 144) | func (s *FoodDeliveryService) notifyRestaurant(order *Order) { method notifyDeliveryAgent (line 149) | func (s *FoodDeliveryService) notifyDeliveryAgent(order *Order) { method assignDeliveryAgent (line 154) | func (s *FoodDeliveryService) assignDeliveryAgent(order *Order) { function GetFoodDeliveryService (line 22) | func GetFoodDeliveryService() *FoodDeliveryService { FILE: solutions/golang/fooddeliveryservice/food_delivery_service_demo.go function Run (line 7) | func Run() { FILE: solutions/golang/fooddeliveryservice/menu_item.go type MenuItem (line 5) | type MenuItem struct method SetAvailable (line 24) | func (m *MenuItem) SetAvailable(available bool) { method IsAvailable (line 30) | func (m *MenuItem) IsAvailable() bool { function NewMenuItem (line 14) | func NewMenuItem(id, name, description string, price float64) *MenuItem { FILE: solutions/golang/fooddeliveryservice/order.go type OrderItem (line 5) | type OrderItem struct function NewOrderItem (line 10) | func NewOrderItem(menuItem *MenuItem, quantity int) *OrderItem { type Order (line 17) | type Order struct method AddItem (line 37) | func (o *Order) AddItem(item *OrderItem) { method RemoveItem (line 43) | func (o *Order) RemoveItem(item *OrderItem) { method SetStatus (line 54) | func (o *Order) SetStatus(status OrderStatus) { method GetStatus (line 60) | func (o *Order) GetStatus() OrderStatus { method AssignDeliveryAgent (line 66) | func (o *Order) AssignDeliveryAgent(agent *DeliveryAgent) { function NewOrder (line 27) | func NewOrder(id string, customer *Customer, restaurant *Restaurant) *Or... FILE: solutions/golang/fooddeliveryservice/restaurant.go type Restaurant (line 5) | type Restaurant struct method AddMenuItem (line 22) | func (r *Restaurant) AddMenuItem(item *MenuItem) { method RemoveMenuItem (line 28) | func (r *Restaurant) RemoveMenuItem(item *MenuItem) { method GetMenu (line 39) | func (r *Restaurant) GetMenu() []*MenuItem { function NewRestaurant (line 13) | func NewRestaurant(id, name, address string, menu []*MenuItem) *Restaura... FILE: solutions/golang/fooddeliveryservice/types.go type OrderStatus (line 3) | type OrderStatus method String (line 14) | func (s OrderStatus) String() string { constant OrderStatusPending (line 6) | OrderStatusPending OrderStatus = iota constant OrderStatusConfirmed (line 7) | OrderStatusConfirmed constant OrderStatusPreparing (line 8) | OrderStatusPreparing constant OrderStatusOutForDelivery (line 9) | OrderStatusOutForDelivery constant OrderStatusDelivered (line 10) | OrderStatusDelivered constant OrderStatusCancelled (line 11) | OrderStatusCancelled FILE: solutions/golang/hotelmanagementsystem/guest.go type Guest (line 3) | type Guest struct function NewGuest (line 10) | func NewGuest(id, name, email, phoneNumber string) *Guest { FILE: solutions/golang/hotelmanagementsystem/hotel_management.go type HotelManagementSystem (line 9) | type HotelManagementSystem struct method AddGuest (line 32) | func (h *HotelManagementSystem) AddGuest(guest *Guest) { method GetGuest (line 38) | func (h *HotelManagementSystem) GetGuest(guestID string) *Guest { method AddRoom (line 44) | func (h *HotelManagementSystem) AddRoom(room *Room) { method GetRoom (line 50) | func (h *HotelManagementSystem) GetRoom(roomID string) *Room { method BookRoom (line 56) | func (h *HotelManagementSystem) BookRoom(guest *Guest, room *Room, che... method CancelReservation (line 75) | func (h *HotelManagementSystem) CancelReservation(reservationID string... method CheckIn (line 92) | func (h *HotelManagementSystem) CheckIn(reservationID string) error { method CheckOut (line 108) | func (h *HotelManagementSystem) CheckOut(reservationID string, payment... function GetHotelManagementSystem (line 21) | func GetHotelManagementSystem() *HotelManagementSystem { FILE: solutions/golang/hotelmanagementsystem/hotel_management_demo.go function Run (line 8) | func Run() { FILE: solutions/golang/hotelmanagementsystem/payment.go type Payment (line 3) | type Payment interface type CreditCardPayment (line 7) | type CreditCardPayment struct method ProcessPayment (line 13) | func (p *CreditCardPayment) ProcessPayment(amount float64) bool { function NewCreditCardPayment (line 9) | func NewCreditCardPayment() *CreditCardPayment { type CashPayment (line 18) | type CashPayment struct method ProcessPayment (line 24) | func (p *CashPayment) ProcessPayment(amount float64) bool { function NewCashPayment (line 20) | func NewCashPayment() *CashPayment { FILE: solutions/golang/hotelmanagementsystem/reservation.go type Reservation (line 9) | type Reservation struct method Cancel (line 30) | func (r *Reservation) Cancel() error { function NewReservation (line 19) | func NewReservation(id string, guest *Guest, room *Room, checkInDate, ch... FILE: solutions/golang/hotelmanagementsystem/room.go type Room (line 8) | type Room struct method Book (line 25) | func (r *Room) Book() error { method CheckIn (line 36) | func (r *Room) CheckIn() error { method CheckOut (line 47) | func (r *Room) CheckOut() error { method GetStatus (line 58) | func (r *Room) GetStatus() RoomStatus { function NewRoom (line 16) | func NewRoom(id string, roomType RoomType, price float64) *Room { FILE: solutions/golang/hotelmanagementsystem/types.go type RoomType (line 3) | type RoomType type RoomStatus (line 4) | type RoomStatus type ReservationStatus (line 5) | type ReservationStatus constant RoomTypeSingle (line 8) | RoomTypeSingle RoomType = iota constant RoomTypeDouble (line 9) | RoomTypeDouble constant RoomTypeDeluxe (line 10) | RoomTypeDeluxe constant RoomTypeSuite (line 11) | RoomTypeSuite constant RoomStatusAvailable (line 15) | RoomStatusAvailable RoomStatus = iota constant RoomStatusBooked (line 16) | RoomStatusBooked constant RoomStatusOccupied (line 17) | RoomStatusOccupied constant ReservationStatusConfirmed (line 21) | ReservationStatusConfirmed ReservationStatus = iota constant ReservationStatusCancelled (line 22) | ReservationStatusCancelled FILE: solutions/golang/librarymanagementsystem/book.go type Book (line 5) | type Book struct method IsAvailable (line 24) | func (b *Book) IsAvailable() bool { method SetAvailable (line 30) | func (b *Book) SetAvailable(available bool) { function NewBook (line 14) | func NewBook(isbn, title, author string, publicationYear int) *Book { FILE: solutions/golang/librarymanagementsystem/library_management_system_demo.go function Run (line 7) | func Run() { FILE: solutions/golang/librarymanagementsystem/library_manager.go constant maxBooksPerMember (line 10) | maxBooksPerMember = 5 constant loanDurationDays (line 11) | loanDurationDays = 14 type LibraryManager (line 14) | type LibraryManager struct method AddBook (line 35) | func (lm *LibraryManager) AddBook(book *Book) { method RemoveBook (line 41) | func (lm *LibraryManager) RemoveBook(isbn string) { method GetBook (line 47) | func (lm *LibraryManager) GetBook(isbn string) *Book { method RegisterMember (line 53) | func (lm *LibraryManager) RegisterMember(member *Member) { method UnregisterMember (line 59) | func (lm *LibraryManager) UnregisterMember(memberID string) { method GetMember (line 65) | func (lm *LibraryManager) GetMember(memberID string) *Member { method BorrowBook (line 71) | func (lm *LibraryManager) BorrowBook(memberID, isbn string) error { method ReturnBook (line 96) | func (lm *LibraryManager) ReturnBook(memberID, isbn string) error { method SearchBooks (line 113) | func (lm *LibraryManager) SearchBooks(keyword string) []*Book { function GetLibraryManager (line 25) | func GetLibraryManager() *LibraryManager { FILE: solutions/golang/librarymanagementsystem/member.go type Member (line 5) | type Member struct method BorrowBook (line 22) | func (m *Member) BorrowBook(book *Book) { method ReturnBook (line 28) | func (m *Member) ReturnBook(book *Book) { method GetBorrowedBooks (line 34) | func (m *Member) GetBorrowedBooks() []*Book { function NewMember (line 13) | func NewMember(memberID, name, contactInfo string) *Member { FILE: solutions/golang/linkedin/connection.go type Connection (line 5) | type Connection struct function NewConnection (line 10) | func NewConnection(user *User) *Connection { FILE: solutions/golang/linkedin/education.go type Education (line 3) | type Education struct FILE: solutions/golang/linkedin/experience.go type Experience (line 3) | type Experience struct FILE: solutions/golang/linkedin/job_posting.go type JobPosting (line 5) | type JobPosting struct function NewJobPosting (line 14) | func NewJobPosting(id, title, description string, requirements []string,... FILE: solutions/golang/linkedin/linkedin_service.go type LinkedInService (line 10) | type LinkedInService struct method RegisterUser (line 33) | func (s *LinkedInService) RegisterUser(user *User) { method LoginUser (line 39) | func (s *LinkedInService) LoginUser(email, password string) (*User, er... method UpdateUserProfile (line 51) | func (s *LinkedInService) UpdateUserProfile(user *User) { method SendConnectionRequest (line 57) | func (s *LinkedInService) SendConnectionRequest(sender, receiver *User) { method AcceptConnectionRequest (line 70) | func (s *LinkedInService) AcceptConnectionRequest(user, connectionUser... method SearchUsers (line 74) | func (s *LinkedInService) SearchUsers(keyword string) []*User { method PostJobListing (line 89) | func (s *LinkedInService) PostJobListing(jobPosting *JobPosting) { method SearchJobPostings (line 106) | func (s *LinkedInService) SearchJobPostings(keyword string) []*JobPost... method SendMessage (line 122) | func (s *LinkedInService) SendMessage(sender, receiver *User, content ... method addNotification (line 142) | func (s *LinkedInService) addNotification(userID string, notification ... method GetNotifications (line 148) | func (s *LinkedInService) GetNotifications(userID string) []*Notificat... function GetLinkedInService (line 22) | func GetLinkedInService() *LinkedInService { FILE: solutions/golang/linkedin/linkedin_service_demo.go function Run (line 7) | func Run() { FILE: solutions/golang/linkedin/message.go type Message (line 5) | type Message struct function NewMessage (line 13) | func NewMessage(id string, sender, receiver *User, content string) *Mess... FILE: solutions/golang/linkedin/notification.go type Notification (line 5) | type Notification struct function NewNotification (line 13) | func NewNotification(id string, user *User, notifType NotificationType, ... FILE: solutions/golang/linkedin/profile.go type Profile (line 5) | type Profile struct method SetSummary (line 23) | func (p *Profile) SetSummary(summary string) { method SetHeadline (line 29) | func (p *Profile) SetHeadline(headline string) { function NewProfile (line 15) | func NewProfile() *Profile { FILE: solutions/golang/linkedin/skill.go type Skill (line 3) | type Skill struct FILE: solutions/golang/linkedin/types.go type NotificationType (line 3) | type NotificationType constant NotificationTypeConnectionRequest (line 6) | NotificationTypeConnectionRequest NotificationType = iota constant NotificationTypeMessage (line 7) | NotificationTypeMessage constant NotificationTypeJobPosting (line 8) | NotificationTypeJobPosting FILE: solutions/golang/linkedin/user.go type User (line 5) | type User struct method AddConnection (line 30) | func (u *User) AddConnection(connection *Connection) { method AddMessage (line 36) | func (u *User) AddMessage(message *Message, isSent bool) { function NewUser (line 17) | func NewUser(id, name, email, password string) *User { FILE: solutions/golang/loggingframework/console_appender.go type ConsoleAppender (line 5) | type ConsoleAppender struct method Append (line 11) | func (a *ConsoleAppender) Append(message *LogMessage) error { function NewConsoleAppender (line 7) | func NewConsoleAppender() *ConsoleAppender { FILE: solutions/golang/loggingframework/database_appender.go type DatabaseAppender (line 8) | type DatabaseAppender struct method Append (line 23) | func (a *DatabaseAppender) Append(message *LogMessage) error { function NewDatabaseAppender (line 12) | func NewDatabaseAppender(jdbcURL, username, password string) (*DatabaseA... FILE: solutions/golang/loggingframework/file_appender.go type FileAppender (line 7) | type FileAppender struct method Append (line 17) | func (a *FileAppender) Append(message *LogMessage) error { function NewFileAppender (line 11) | func NewFileAppender(filePath string) *FileAppender { FILE: solutions/golang/loggingframework/log_appender.go type LogAppender (line 3) | type LogAppender interface FILE: solutions/golang/loggingframework/log_level.go type LogLevel (line 3) | type LogLevel method String (line 13) | func (l LogLevel) String() string { constant LogLevelDebug (line 6) | LogLevelDebug LogLevel = iota constant LogLevelInfo (line 7) | LogLevelInfo constant LogLevelWarning (line 8) | LogLevelWarning constant LogLevelError (line 9) | LogLevelError constant LogLevelFatal (line 10) | LogLevelFatal FILE: solutions/golang/loggingframework/log_message.go type LogMessage (line 8) | type LogMessage struct method String (line 22) | func (m *LogMessage) String() string { function NewLogMessage (line 14) | func NewLogMessage(level LogLevel, message string) *LogMessage { FILE: solutions/golang/loggingframework/logger.go type Logger (line 7) | type Logger struct method SetConfig (line 26) | func (l *Logger) SetConfig(config *LoggerConfig) { method log (line 32) | func (l *Logger) log(level LogLevel, message string) error { method Debug (line 45) | func (l *Logger) Debug(message string) error { method Info (line 49) | func (l *Logger) Info(message string) error { method Warning (line 53) | func (l *Logger) Warning(message string) error { method Error (line 57) | func (l *Logger) Error(message string) error { method Fatal (line 61) | func (l *Logger) Fatal(message string) error { function GetLogger (line 17) | func GetLogger() *Logger { FILE: solutions/golang/loggingframework/logger_config.go type LoggerConfig (line 3) | type LoggerConfig struct function NewLoggerConfig (line 8) | func NewLoggerConfig(level LogLevel, appender LogAppender) *LoggerConfig { FILE: solutions/golang/loggingframework/logging_framework_demo.go function Run (line 7) | func Run() { FILE: solutions/golang/lrucache/lru_cache.go type Node (line 8) | type Node struct type LRUCache (line 16) | type LRUCache struct function NewLRUCache (line 25) | func NewLRUCache[K comparable, V any](capacity int) *LRUCache[K, V] { method Get (line 39) | func (c *LRUCache[K, V]) Get(key K) (V, bool) { method Put (line 53) | func (c *LRUCache[K, V]) Put(key K, value V) { method addToHead (line 77) | func (c *LRUCache[K, V]) addToHead(node *Node[K, V]) { method removeNode (line 85) | func (c *LRUCache[K, V]) removeNode(node *Node[K, V]) { method moveToHead (line 91) | func (c *LRUCache[K, V]) moveToHead(node *Node[K, V]) { method removeTail (line 97) | func (c *LRUCache[K, V]) removeTail() *Node[K, V] { method Size (line 104) | func (c *LRUCache[K, V]) Size() int { method Clear (line 111) | func (c *LRUCache[K, V]) Clear() { FILE: solutions/golang/lrucache/lru_cache_demo.go function Run (line 7) | func Run() { FILE: solutions/golang/main.go function main (line 37) | func main() { FILE: solutions/golang/movieticketbookingsystem/booking.go type Booking (line 5) | type Booking struct method GetStatus (line 26) | func (b *Booking) GetStatus() BookingStatus { method SetStatus (line 32) | func (b *Booking) SetStatus(status BookingStatus) { function NewBooking (line 15) | func NewBooking(id string, user *User, show *Show, seats []*Seat, totalP... FILE: solutions/golang/movieticketbookingsystem/movie.go type Movie (line 3) | type Movie struct function NewMovie (line 10) | func NewMovie(id, title, description string, durationMinutes int) *Movie { FILE: solutions/golang/movieticketbookingsystem/movie_ticket_booking_system.go type MovieTicketBookingSystem (line 10) | type MovieTicketBookingSystem struct method AddMovie (line 36) | func (bs *MovieTicketBookingSystem) AddMovie(movie *Movie) { method AddTheater (line 42) | func (bs *MovieTicketBookingSystem) AddTheater(theater *Theater) { method AddShow (line 48) | func (bs *MovieTicketBookingSystem) AddShow(show *Show) { method GetShow (line 54) | func (bs *MovieTicketBookingSystem) GetShow(showID string) *Show { method BookTickets (line 60) | func (bs *MovieTicketBookingSystem) BookTickets(user *User, show *Show... method ConfirmBooking (line 93) | func (bs *MovieTicketBookingSystem) ConfirmBooking(bookingID string) e... method CancelBooking (line 110) | func (bs *MovieTicketBookingSystem) CancelBooking(bookingID string) er... method generateBookingID (line 133) | func (bs *MovieTicketBookingSystem) generateBookingID() string { function GetBookingSystem (line 24) | func GetBookingSystem() *MovieTicketBookingSystem { function CreateSeats (line 139) | func CreateSeats(rows, columns int) map[string]*Seat { FILE: solutions/golang/movieticketbookingsystem/movie_ticket_booking_system_demo.go function Run (line 8) | func Run() { FILE: solutions/golang/movieticketbookingsystem/seat.go type Seat (line 5) | type Seat struct method GetStatus (line 26) | func (s *Seat) GetStatus() SeatStatus { method SetStatus (line 32) | func (s *Seat) SetStatus(status SeatStatus) { method GetPrice (line 38) | func (s *Seat) GetPrice() float64 { function NewSeat (line 15) | func NewSeat(id string, row, column int, seatType SeatType, price float6... FILE: solutions/golang/movieticketbookingsystem/show.go type Show (line 8) | type Show struct function NewShow (line 18) | func NewShow(id string, movie *Movie, theater *Theater, startTime, endTi... FILE: solutions/golang/movieticketbookingsystem/theater.go type Theater (line 3) | type Theater struct function NewTheater (line 10) | func NewTheater(id, name, location string) *Theater { FILE: solutions/golang/movieticketbookingsystem/types.go type SeatType (line 3) | type SeatType type SeatStatus (line 4) | type SeatStatus type BookingStatus (line 5) | type BookingStatus constant SeatTypeNormal (line 8) | SeatTypeNormal SeatType = iota constant SeatTypePremium (line 9) | SeatTypePremium constant SeatStatusAvailable (line 13) | SeatStatusAvailable SeatStatus = iota constant SeatStatusBooked (line 14) | SeatStatusBooked constant BookingStatusPending (line 18) | BookingStatusPending BookingStatus = iota constant BookingStatusConfirmed (line 19) | BookingStatusConfirmed constant BookingStatusCancelled (line 20) | BookingStatusCancelled FILE: solutions/golang/movieticketbookingsystem/user.go type User (line 3) | type User struct function NewUser (line 9) | func NewUser(id, name, email string) *User { FILE: solutions/golang/musicstreamingservice/album.go type Album (line 3) | type Album struct FILE: solutions/golang/musicstreamingservice/artist.go type Artist (line 3) | type Artist struct FILE: solutions/golang/musicstreamingservice/music_library.go type MusicLibrary (line 8) | type MusicLibrary struct method AddSong (line 31) | func (ml *MusicLibrary) AddSong(song *Song) { method AddAlbum (line 37) | func (ml *MusicLibrary) AddAlbum(album *Album) { method AddArtist (line 46) | func (ml *MusicLibrary) AddArtist(artist *Artist) { method SearchSongs (line 58) | func (ml *MusicLibrary) SearchSongs(query string) []*Song { function GetMusicLibrary (line 20) | func GetMusicLibrary() *MusicLibrary { FILE: solutions/golang/musicstreamingservice/music_player.go type MusicPlayer (line 5) | type MusicPlayer struct method PlaySong (line 16) | func (p *MusicPlayer) PlaySong(song *Song) { method PauseSong (line 25) | func (p *MusicPlayer) PauseSong() { method SeekTo (line 32) | func (p *MusicPlayer) SeekTo(time int) { function NewMusicPlayer (line 12) | func NewMusicPlayer() *MusicPlayer { FILE: solutions/golang/musicstreamingservice/music_recommender.go type MusicRecommender (line 7) | type MusicRecommender struct method RecommendSongs (line 26) | func (mr *MusicRecommender) RecommendSongs(user *User) []*Song { function GetMusicRecommender (line 17) | func GetMusicRecommender() *MusicRecommender { FILE: solutions/golang/musicstreamingservice/music_streaming_service.go type MusicStreamingService (line 3) | type MusicStreamingService struct function NewMusicStreamingService (line 9) | func NewMusicStreamingService() *MusicStreamingService { FILE: solutions/golang/musicstreamingservice/music_streaming_service_demo.go function Run (line 7) | func Run() { FILE: solutions/golang/musicstreamingservice/playlist.go type Playlist (line 3) | type Playlist struct method AddSong (line 19) | func (p *Playlist) AddSong(song *Song) { method RemoveSong (line 23) | func (p *Playlist) RemoveSong(song *Song) { function NewPlaylist (line 10) | func NewPlaylist(id, name string, owner *User) *Playlist { FILE: solutions/golang/musicstreamingservice/song.go type Song (line 3) | type Song struct FILE: solutions/golang/musicstreamingservice/user.go type User (line 5) | type User struct method AddPlaylist (line 22) | func (u *User) AddPlaylist(playlist *Playlist) { method RemovePlaylist (line 28) | func (u *User) RemovePlaylist(playlist *Playlist) { function NewUser (line 13) | func NewUser(id, username, password string) *User { FILE: solutions/golang/musicstreamingservice/userManager.go type UserManager (line 7) | type UserManager struct method RegisterUser (line 26) | func (um *UserManager) RegisterUser(user *User) { method LoginUser (line 32) | func (um *UserManager) LoginUser(username, password string) *User { function GetUserManager (line 17) | func GetUserManager() *UserManager { FILE: solutions/golang/onlineauctionsystem/auction_listing.go type AuctionListing (line 8) | type AuctionListing struct method PlaceBid (line 38) | func (a *AuctionListing) PlaceBid(bid *Bid) bool { method CloseAuction (line 52) | func (a *AuctionListing) CloseAuction() { method notifyObservers (line 62) | func (a *AuctionListing) notifyObservers() { function NewAuctionListing (line 23) | func NewAuctionListing(id, itemName, description string, startingPrice f... FILE: solutions/golang/onlineauctionsystem/auction_status.go type AuctionStatus (line 3) | type AuctionStatus constant StatusActive (line 6) | StatusActive AuctionStatus = iota constant StatusClosed (line 7) | StatusClosed FILE: solutions/golang/onlineauctionsystem/auction_system.go type AuctionSystem (line 9) | type AuctionSystem struct method RegisterUser (line 30) | func (as *AuctionSystem) RegisterUser(user *User) { method GetUser (line 36) | func (as *AuctionSystem) GetUser(userID string) *User { method CreateAuctionListing (line 42) | func (as *AuctionSystem) CreateAuctionListing(listing *AuctionListing) { method SearchAuctionListings (line 54) | func (as *AuctionSystem) SearchAuctionListings(keyword string) []*Auct... method PlaceBid (line 70) | func (as *AuctionSystem) PlaceBid(auctionListingID string, bid *Bid) b... function GetInstance (line 20) | func GetInstance() *AuctionSystem { FILE: solutions/golang/onlineauctionsystem/bid.go type Bid (line 5) | type Bid struct function NewBid (line 12) | func NewBid(id string, bidder *User, amount float64) *Bid { FILE: solutions/golang/onlineauctionsystem/main.go function Run (line 8) | func Run() { FILE: solutions/golang/onlineauctionsystem/user.go type User (line 3) | type User struct function NewUser (line 9) | func NewUser(id, username, email string) *User { FILE: solutions/golang/onlineshoppingservice/credit_card_payment.go type CreditCardPayment (line 3) | type CreditCardPayment struct method ProcessPayment (line 5) | func (c *CreditCardPayment) ProcessPayment(amount float64) bool { FILE: solutions/golang/onlineshoppingservice/online_shopping_service.go type OnlineShoppingService (line 9) | type OnlineShoppingService struct method RegisterUser (line 28) | func (s *OnlineShoppingService) RegisterUser(user *User) { method AddProduct (line 32) | func (s *OnlineShoppingService) AddProduct(product *Product) { method SearchProducts (line 36) | func (s *OnlineShoppingService) SearchProducts(keyword string) []*Prod... method PlaceOrder (line 46) | func (s *OnlineShoppingService) PlaceOrder(user *User, cart *ShoppingC... function GetInstance (line 17) | func GetInstance() *OnlineShoppingService { FILE: solutions/golang/onlineshoppingservice/online_shopping_service_demo.go function Run (line 7) | func Run() { FILE: solutions/golang/onlineshoppingservice/order.go type Order (line 3) | type Order struct method calculateTotalAmount (line 22) | func (o *Order) calculateTotalAmount() float64 { method SetStatus (line 30) | func (o *Order) SetStatus(status OrderStatus) { function NewOrder (line 11) | func NewOrder(id string, user *User, items []OrderItem) *Order { FILE: solutions/golang/onlineshoppingservice/order_item.go type OrderItem (line 3) | type OrderItem struct function NewOrderItem (line 8) | func NewOrderItem(product *Product, quantity int) OrderItem { FILE: solutions/golang/onlineshoppingservice/order_status.go type OrderStatus (line 3) | type OrderStatus constant Pending (line 6) | Pending OrderStatus = iota constant Processing (line 7) | Processing constant Shipped (line 8) | Shipped constant Delivered (line 9) | Delivered constant Cancelled (line 10) | Cancelled FILE: solutions/golang/onlineshoppingservice/payment.go type Payment (line 3) | type Payment interface FILE: solutions/golang/onlineshoppingservice/product.go type Product (line 3) | type Product struct method UpdateQuantity (line 21) | func (p *Product) UpdateQuantity(quantity int) { method IsAvailable (line 25) | func (p *Product) IsAvailable(quantity int) bool { function NewProduct (line 11) | func NewProduct(id, name, description string, price float64, quantity in... FILE: solutions/golang/onlineshoppingservice/shopping_cart.go type ShoppingCart (line 3) | type ShoppingCart struct method AddItem (line 11) | func (c *ShoppingCart) AddItem(product *Product, quantity int) { method RemoveItem (line 17) | func (c *ShoppingCart) RemoveItem(productId string) { method GetItems (line 21) | func (c *ShoppingCart) GetItems() []OrderItem { method Clear (line 29) | func (c *ShoppingCart) Clear() { function NewShoppingCart (line 7) | func NewShoppingCart() *ShoppingCart { FILE: solutions/golang/onlineshoppingservice/user.go type User (line 3) | type User struct method AddOrder (line 21) | func (u *User) AddOrder(order Order) { function NewUser (line 11) | func NewUser(id, name, email, password string) *User { FILE: solutions/golang/onlinestockbrokeragesystem/account.go type Account (line 5) | type Account struct method Deposit (line 23) | func (a *Account) Deposit(amount float64) { method Withdraw (line 29) | func (a *Account) Withdraw(amount float64) error { method GetBalance (line 41) | func (a *Account) GetBalance() float64 { function NewAccount (line 13) | func NewAccount(accountID string, user *User, initialBalance float64) *A... FILE: solutions/golang/onlinestockbrokeragesystem/buy_order.go type BuyOrder (line 3) | type BuyOrder struct method Execute (line 20) | func (o *BuyOrder) Execute() error { function NewBuyOrder (line 7) | func NewBuyOrder(orderID string, account *Account, stock *Stock, quantit... FILE: solutions/golang/onlinestockbrokeragesystem/exceptions.go type InsufficientFundsError (line 3) | type InsufficientFundsError struct method Error (line 11) | func (e *InsufficientFundsError) Error() string { function NewInsufficientFundsError (line 7) | func NewInsufficientFundsError(message string) *InsufficientFundsError { type InsufficientStockError (line 15) | type InsufficientStockError struct method Error (line 23) | func (e *InsufficientStockError) Error() string { function NewInsufficientStockError (line 19) | func NewInsufficientStockError(message string) *InsufficientStockError { FILE: solutions/golang/onlinestockbrokeragesystem/order.go type Order (line 3) | type Order interface type BaseOrder (line 9) | type BaseOrder struct method GetStatus (line 18) | func (o *BaseOrder) GetStatus() OrderStatus { method SetStatus (line 22) | func (o *BaseOrder) SetStatus(status OrderStatus) { FILE: solutions/golang/onlinestockbrokeragesystem/portfolio.go type Portfolio (line 5) | type Portfolio struct method AddStock (line 18) | func (p *Portfolio) AddStock(stock *Stock, quantity int) { method RemoveStock (line 24) | func (p *Portfolio) RemoveStock(stock *Stock, quantity int) error { method GetHoldings (line 44) | func (p *Portfolio) GetHoldings() map[string]int { function NewPortfolio (line 11) | func NewPortfolio(account *Account) *Portfolio { FILE: solutions/golang/onlinestockbrokeragesystem/sell_order.go type SellOrder (line 3) | type SellOrder struct method Execute (line 20) | func (o *SellOrder) Execute() error { function NewSellOrder (line 7) | func NewSellOrder(orderID string, account *Account, stock *Stock, quanti... FILE: solutions/golang/onlinestockbrokeragesystem/stock.go type Stock (line 5) | type Stock struct method UpdatePrice (line 20) | func (s *Stock) UpdatePrice(newPrice float64) { method GetPrice (line 26) | func (s *Stock) GetPrice() float64 { function NewStock (line 12) | func NewStock(symbol, name string, price float64) *Stock { FILE: solutions/golang/onlinestockbrokeragesystem/stock_broker.go type StockBroker (line 9) | type StockBroker struct method CreateAccount (line 34) | func (sb *StockBroker) CreateAccount(user *User, initialBalance float6... method GetAccount (line 43) | func (sb *StockBroker) GetAccount(accountID string) *Account { method AddStock (line 49) | func (sb *StockBroker) AddStock(stock *Stock) { method GetStock (line 55) | func (sb *StockBroker) GetStock(symbol string) *Stock { method PlaceOrder (line 61) | func (sb *StockBroker) PlaceOrder(order Order) { method processOrders (line 65) | func (sb *StockBroker) processOrders() { method generateAccountID (line 73) | func (sb *StockBroker) generateAccountID() string { function GetStockBroker (line 22) | func GetStockBroker() *StockBroker { FILE: solutions/golang/onlinestockbrokeragesystem/stock_broker_demo.go function Run (line 5) | func Run() { FILE: solutions/golang/onlinestockbrokeragesystem/types.go type OrderStatus (line 3) | type OrderStatus constant OrderStatusPending (line 6) | OrderStatusPending OrderStatus = iota constant OrderStatusExecuted (line 7) | OrderStatusExecuted constant OrderStatusRejected (line 8) | OrderStatusRejected FILE: solutions/golang/onlinestockbrokeragesystem/user.go type User (line 3) | type User struct function NewUser (line 9) | func NewUser(userID, name, email string) *User { FILE: solutions/golang/parkinglot/car.go function NewCar (line 3) | func NewCar(licensePlate string) Vehicle { FILE: solutions/golang/parkinglot/level.go type Level (line 3) | type Level struct method ParkVehicle (line 25) | func (l *Level) ParkVehicle(vehicle Vehicle) bool { method UnparkVehicle (line 35) | func (l *Level) UnparkVehicle(vehicle Vehicle) bool { method DisplayAvailability (line 45) | func (l *Level) DisplayAvailability() { function NewLevel (line 8) | func NewLevel(floor int, numSpots int) *Level { FILE: solutions/golang/parkinglot/motorcycle.go function NewMotorcycle (line 3) | func NewMotorcycle(licensePlate string) Vehicle { FILE: solutions/golang/parkinglot/parking_lot.go type ParkingLot (line 3) | type ParkingLot struct method AddLevel (line 16) | func (p *ParkingLot) AddLevel(level *Level) { method ParkVehicle (line 20) | func (p *ParkingLot) ParkVehicle(vehicle Vehicle) bool { method UnparkVehicle (line 29) | func (p *ParkingLot) UnparkVehicle(vehicle Vehicle) bool { method DisplayAvailability (line 38) | func (p *ParkingLot) DisplayAvailability() { function GetParkingLotInstance (line 9) | func GetParkingLotInstance() *ParkingLot { FILE: solutions/golang/parkinglot/parking_lot_demo.go function Run (line 3) | func Run() { FILE: solutions/golang/parkinglot/parking_spot.go type ParkingSpot (line 3) | type ParkingSpot struct method IsAvailable (line 13) | func (ps *ParkingSpot) IsAvailable() bool { method ParkVehicle (line 17) | func (ps *ParkingSpot) ParkVehicle(vehicle Vehicle) { method UnparkVehicle (line 23) | func (ps *ParkingSpot) UnparkVehicle() { method GetSpotNumber (line 27) | func (ps *ParkingSpot) GetSpotNumber() int { method GetVehicleType (line 31) | func (ps *ParkingSpot) GetVehicleType() VehicleType { method GetParkedVehicle (line 35) | func (ps *ParkingSpot) GetParkedVehicle() Vehicle { function NewParkingSpot (line 9) | func NewParkingSpot(spotNumber int, vehicleType VehicleType) *ParkingSpot { FILE: solutions/golang/parkinglot/truck.go function NewTruck (line 3) | func NewTruck(licensePlate string) Vehicle { FILE: solutions/golang/parkinglot/vehicle.go type VehicleType (line 3) | type VehicleType constant CAR (line 6) | CAR VehicleType = iota constant MOTORCYCLE (line 7) | MOTORCYCLE constant TRUCK (line 8) | TRUCK type Vehicle (line 11) | type Vehicle interface type BaseVehicle (line 16) | type BaseVehicle struct method GetLicensePlate (line 21) | func (v *BaseVehicle) GetLicensePlate() string { method GetType (line 25) | func (v *BaseVehicle) GetType() VehicleType { FILE: solutions/golang/pubsubsystem/message.go type Message (line 3) | type Message struct function NewMessage (line 7) | func NewMessage(content string) *Message { FILE: solutions/golang/pubsubsystem/print_subscriber.go type PrintSubscriber (line 5) | type PrintSubscriber struct method OnMessage (line 13) | func (ps *PrintSubscriber) OnMessage(message *Message) { function NewPrintSubscriber (line 9) | func NewPrintSubscriber(name string) *PrintSubscriber { FILE: solutions/golang/pubsubsystem/publisher.go type Publisher (line 5) | type Publisher struct method RegisterTopic (line 13) | func (p *Publisher) RegisterTopic(topic *Topic) { method Publish (line 17) | func (p *Publisher) Publish(topic *Topic, message *Message) { function NewPublisher (line 9) | func NewPublisher() *Publisher { FILE: solutions/golang/pubsubsystem/pubsub_system_demo.go function Run (line 3) | func Run() { FILE: solutions/golang/pubsubsystem/subscriber.go type Subscriber (line 3) | type Subscriber interface FILE: solutions/golang/pubsubsystem/topic.go type Topic (line 7) | type Topic struct method AddSubscriber (line 20) | func (t *Topic) AddSubscriber(subscriber Subscriber) { method RemoveSubscriber (line 26) | func (t *Topic) RemoveSubscriber(subscriber Subscriber) { method Publish (line 32) | func (t *Topic) Publish(message *Message) { function NewTopic (line 13) | func NewTopic(name string) *Topic { FILE: solutions/golang/restaurantmanagementsystem/menu_item.go type MenuItem (line 3) | type MenuItem struct function NewMenuItem (line 11) | func NewMenuItem(id int, name, description string, price float64, availa... FILE: solutions/golang/restaurantmanagementsystem/order.go type Order (line 7) | type Order struct method SetStatus (line 25) | func (o *Order) SetStatus(status OrderStatus) { function NewOrder (line 15) | func NewOrder(id int, items []MenuItem, totalAmount float64, status Orde... FILE: solutions/golang/restaurantmanagementsystem/order_status.go type OrderStatus (line 3) | type OrderStatus constant OrderPending (line 6) | OrderPending OrderStatus = iota constant OrderPreparing (line 7) | OrderPreparing constant OrderReady (line 8) | OrderReady constant OrderCompleted (line 9) | OrderCompleted constant OrderCancelled (line 10) | OrderCancelled FILE: solutions/golang/restaurantmanagementsystem/payment.go type Payment (line 3) | type Payment struct function NewPayment (line 10) | func NewPayment(id int, amount float64, method PaymentMethod, status Pay... FILE: solutions/golang/restaurantmanagementsystem/payment_method.go type PaymentMethod (line 3) | type PaymentMethod constant Cash (line 6) | Cash PaymentMethod = iota constant CreditCard (line 7) | CreditCard constant MobilePayment (line 8) | MobilePayment FILE: solutions/golang/restaurantmanagementsystem/payment_status.go type PaymentStatus (line 3) | type PaymentStatus constant PaymentPending (line 6) | PaymentPending PaymentStatus = iota constant PaymentCompleted (line 7) | PaymentCompleted constant PaymentFailed (line 8) | PaymentFailed FILE: solutions/golang/restaurantmanagementsystem/reservation.go type Reservation (line 7) | type Reservation struct function NewReservation (line 15) | func NewReservation(id int, customerName, contactNumber string, partySiz... FILE: solutions/golang/restaurantmanagementsystem/restaurant.go type Restaurant (line 5) | type Restaurant struct method AddMenuItem (line 30) | func (r *Restaurant) AddMenuItem(item *MenuItem) { method RemoveMenuItem (line 36) | func (r *Restaurant) RemoveMenuItem(item *MenuItem) { method GetMenu (line 47) | func (r *Restaurant) GetMenu() []MenuItem { method PlaceOrder (line 53) | func (r *Restaurant) PlaceOrder(order *Order) { method UpdateOrderStatus (line 60) | func (r *Restaurant) UpdateOrderStatus(orderID int, status OrderStatus) { method MakeReservation (line 69) | func (r *Restaurant) MakeReservation(reservation *Reservation) { method ProcessPayment (line 75) | func (r *Restaurant) ProcessPayment(payment *Payment) { method AddStaff (line 81) | func (r *Restaurant) AddStaff(staff *Staff) { method notifyKitchen (line 87) | func (r *Restaurant) notifyKitchen(order *Order) { method notifyStaff (line 91) | func (r *Restaurant) notifyStaff(order *Order) { function GetRestaurantInstance (line 17) | func GetRestaurantInstance() *Restaurant { FILE: solutions/golang/restaurantmanagementsystem/restaurant_management_demo.go function Run (line 8) | func Run() { FILE: solutions/golang/restaurantmanagementsystem/staff.go type Staff (line 3) | type Staff struct function NewStaff (line 10) | func NewStaff(id int, name, role, contactNumber string) *Staff { FILE: solutions/golang/ridesharingservice/driver.go type Driver (line 3) | type Driver struct FILE: solutions/golang/ridesharingservice/driver_status.go type DriverStatus (line 3) | type DriverStatus constant Available (line 6) | Available DriverStatus = iota constant Busy (line 7) | Busy FILE: solutions/golang/ridesharingservice/location.go type Location (line 3) | type Location struct FILE: solutions/golang/ridesharingservice/passenger.go type Passenger (line 3) | type Passenger struct FILE: solutions/golang/ridesharingservice/ride.go type Ride (line 3) | type Ride struct FILE: solutions/golang/ridesharingservice/ride_service.go type RideService (line 10) | type RideService struct method AddPassenger (line 33) | func (rs *RideService) AddPassenger(passenger *Passenger) { method AddDriver (line 39) | func (rs *RideService) AddDriver(driver *Driver) { method RequestRide (line 45) | func (rs *RideService) RequestRide(passenger *Passenger, source, desti... method AcceptRide (line 57) | func (rs *RideService) AcceptRide(driver *Driver, ride *Ride) { method StartRide (line 68) | func (rs *RideService) StartRide(ride *Ride) { method CompleteRide (line 77) | func (rs *RideService) CompleteRide(ride *Ride) { method CancelRide (line 89) | func (rs *RideService) CancelRide(ride *Ride) { method notifyDrivers (line 102) | func (rs *RideService) notifyDrivers(ride *Ride) { method notifyPassenger (line 110) | func (rs *RideService) notifyPassenger(ride *Ride) { method notifyDriver (line 125) | func (rs *RideService) notifyDriver(ride *Ride) { method calculateFare (line 138) | func (rs *RideService) calculateFare(ride *Ride) float64 { method calculateDistance (line 149) | func (rs *RideService) calculateDistance(source, destination *Location... method calculateDuration (line 153) | func (rs *RideService) calculateDuration(source, destination *Location... method generateRideID (line 158) | func (rs *RideService) generateRideID() int { function GetRideService (line 21) | func GetRideService() *RideService { FILE: solutions/golang/ridesharingservice/ride_sharing_service_demo.go function Run (line 5) | func Run() { FILE: solutions/golang/ridesharingservice/ride_status.go type RideStatus (line 3) | type RideStatus constant Requested (line 6) | Requested RideStatus = iota constant Accepted (line 7) | Accepted constant InProgress (line 8) | InProgress constant Completed (line 9) | Completed constant Cancelled (line 10) | Cancelled FILE: solutions/golang/snakeandladdergame/board.go type Board (line 3) | type Board struct method initializeSnakesAndLadders (line 19) | func (b *Board) initializeSnakesAndLadders() { method GetNewPosition (line 25) | func (b *Board) GetNewPosition(position int) int { function NewBoard (line 9) | func NewBoard() *Board { FILE: solutions/golang/snakeandladdergame/dice.go type Dice (line 5) | type Dice struct method Roll (line 11) | func (d *Dice) Roll() int { function NewDice (line 7) | func NewDice() *Dice { FILE: solutions/golang/snakeandladdergame/game_manager.go type GameManager (line 5) | type GameManager struct method StartNewGame (line 20) | func (gm *GameManager) StartNewGame(wg *sync.WaitGroup, playerNames []... function GetGameManager (line 11) | func GetGameManager() *GameManager { FILE: solutions/golang/snakeandladdergame/ladder.go type Ladder (line 3) | type Ladder struct function NewLadder (line 8) | func NewLadder(start, end int) *Ladder { FILE: solutions/golang/snakeandladdergame/player.go type Player (line 3) | type Player struct function NewPlayer (line 8) | func NewPlayer(name string) *Player { FILE: solutions/golang/snakeandladdergame/snake.go type Snake (line 3) | type Snake struct function NewSnake (line 8) | func NewSnake(start, end int) *Snake { FILE: solutions/golang/snakeandladdergame/snake_and_ladder_demo.go function Run (line 8) | func Run() { FILE: solutions/golang/snakeandladdergame/snake_and_ladder_game.go type SnakeAndLadderGame (line 10) | type SnakeAndLadderGame struct method Play (line 33) | func (g *SnakeAndLadderGame) Play(wg *sync.WaitGroup) { method isGameOver (line 55) | func (g *SnakeAndLadderGame) isGameOver() bool { function NewSnakeAndLadderGame (line 18) | func NewSnakeAndLadderGame(playerNames []string) *SnakeAndLadderGame { function generateID (line 66) | func generateID() int64 { FILE: solutions/golang/socialnetworkingservice/comment.go type Comment (line 5) | type Comment struct function NewComment (line 13) | func NewComment(id, userID, postID, content string) *Comment { FILE: solutions/golang/socialnetworkingservice/notification.go type Notification (line 5) | type Notification struct function NewNotification (line 13) | func NewNotification(id, userID string, notifType NotificationType, cont... FILE: solutions/golang/socialnetworkingservice/post.go type Post (line 8) | type Post struct method AddLike (line 33) | func (p *Post) AddLike(userID string) bool { method AddComment (line 43) | func (p *Post) AddComment(comment *Comment) { method GetLikes (line 49) | func (p *Post) GetLikes() []string { method GetComments (line 59) | func (p *Post) GetComments() []*Comment { function NewPost (line 20) | func NewPost(id, userID, content string, imageURLs, videoURLs []string) ... FILE: solutions/golang/socialnetworkingservice/social_networking_service.go type SocialNetwork (line 10) | type SocialNetwork struct method RegisterUser (line 33) | func (sn *SocialNetwork) RegisterUser(user *User) error { method LoginUser (line 44) | func (sn *SocialNetwork) LoginUser(email, password string) (*User, err... method UpdateUserProfile (line 56) | func (sn *SocialNetwork) UpdateUserProfile(user *User) { method SendFriendRequest (line 62) | func (sn *SocialNetwork) SendFriendRequest(senderID, receiverID string... method AcceptFriendRequest (line 84) | func (sn *SocialNetwork) AcceptFriendRequest(userID, friendID string) ... method CreatePost (line 109) | func (sn *SocialNetwork) CreatePost(post *Post) error { method GetNewsfeed (line 123) | func (sn *SocialNetwork) GetNewsfeed(userID string) ([]*Post, error) { method LikePost (line 152) | func (sn *SocialNetwork) LikePost(userID, postID string) error { method CommentOnPost (line 173) | func (sn *SocialNetwork) CommentOnPost(comment *Comment) error { method GetNotifications (line 194) | func (sn *SocialNetwork) GetNotifications(userID string) ([]*Notificat... method addNotification (line 205) | func (sn *SocialNetwork) addNotification(userID string, notification *... function GetSocialNetwork (line 22) | func GetSocialNetwork() *SocialNetwork { FILE: solutions/golang/socialnetworkingservice/social_networking_service_demo.go function Run (line 8) | func Run() { FILE: solutions/golang/socialnetworkingservice/types.go type NotificationType (line 3) | type NotificationType method String (line 13) | func (nt NotificationType) String() string { constant NotificationTypeFriendRequest (line 6) | NotificationTypeFriendRequest NotificationType = iota constant NotificationTypeFriendRequestAccepted (line 7) | NotificationTypeFriendRequestAccepted constant NotificationTypeLike (line 8) | NotificationTypeLike constant NotificationTypeComment (line 9) | NotificationTypeComment constant NotificationTypeMention (line 10) | NotificationTypeMention FILE: solutions/golang/socialnetworkingservice/user.go type User (line 5) | type User struct method AddFriend (line 30) | func (u *User) AddFriend(friendID string) { method AddPost (line 36) | func (u *User) AddPost(post *Post) { method GetFriends (line 42) | func (u *User) GetFriends() []string { method GetPosts (line 52) | func (u *User) GetPosts() []*Post { function NewUser (line 17) | func NewUser(id, name, email, password, profilePicture, bio string) *User { FILE: solutions/golang/splitwise/equal_split.go type EqualSplit (line 3) | type EqualSplit struct method GetAmount (line 12) | func (e *EqualSplit) GetAmount() float64 { method SetAmount (line 16) | func (e *EqualSplit) SetAmount(amount float64) { method GetUser (line 20) | func (e *EqualSplit) GetUser() *User { function NewEqualSplit (line 8) | func NewEqualSplit(user *User) *EqualSplit { FILE: solutions/golang/splitwise/expense.go type Expense (line 3) | type Expense struct method AddSplit (line 21) | func (e *Expense) AddSplit(split Split) { function NewExpense (line 11) | func NewExpense(id string, amount float64, description string, paidBy *U... FILE: solutions/golang/splitwise/group.go type Group (line 3) | type Group struct method AddMember (line 19) | func (g *Group) AddMember(user *User) { method AddExpense (line 23) | func (g *Group) AddExpense(expense *Expense) { function NewGroup (line 10) | func NewGroup(id, name string) *Group { FILE: solutions/golang/splitwise/percent_split.go type PercentSplit (line 3) | type PercentSplit struct method GetAmount (line 13) | func (p *PercentSplit) GetAmount() float64 { method SetAmount (line 17) | func (p *PercentSplit) SetAmount(amount float64) { method GetUser (line 21) | func (p *PercentSplit) GetUser() *User { function NewPercentSplit (line 9) | func NewPercentSplit(user *User, percent float64) *PercentSplit { FILE: solutions/golang/splitwise/split.go type Split (line 3) | type Split interface FILE: solutions/golang/splitwise/splitwise_demo.go function Run (line 7) | func Run() { FILE: solutions/golang/splitwise/splitwise_service.go type SplitwiseService (line 8) | type SplitwiseService struct method AddUser (line 28) | func (s *SplitwiseService) AddUser(user *User) { method AddGroup (line 32) | func (s *SplitwiseService) AddGroup(group *Group) { method AddExpense (line 36) | func (s *SplitwiseService) AddExpense(groupID string, expense *Expense) { method splitExpense (line 46) | func (s *SplitwiseService) splitExpense(expense *Expense) { method updateBalances (line 60) | func (s *SplitwiseService) updateBalances(expense *Expense) { method updateBalance (line 72) | func (s *SplitwiseService) updateBalance(user1, user2 *User, amount fl... method SettleBalance (line 77) | func (s *SplitwiseService) SettleBalance(userID1, userID2 string) { method createTransaction (line 98) | func (s *SplitwiseService) createTransaction(sender, receiver *User, a... function GetSplitwiseService (line 18) | func GetSplitwiseService() *SplitwiseService { FILE: solutions/golang/splitwise/transaction.go type Transaction (line 3) | type Transaction struct function NewTransaction (line 10) | func NewTransaction(id string, sender, receiver *User, amount float64) *... FILE: solutions/golang/splitwise/user.go type User (line 3) | type User struct function NewUser (line 10) | func NewUser(id, name, email string) *User { FILE: solutions/golang/stackOverFlow/answer.go type Answer (line 9) | type Answer struct method Vote (line 33) | func (a *Answer) Vote(user *User, value int) error { method GetVoteCount (line 54) | func (a *Answer) GetVoteCount() int { method AddComment (line 65) | func (a *Answer) AddComment(comment *Comment) error { method GetComments (line 72) | func (a *Answer) GetComments() []*Comment { method MarkAsAccepted (line 80) | func (a *Answer) MarkAsAccepted() error { method IsAccepted (line 93) | func (a *Answer) IsAccepted() bool { function NewAnswer (line 21) | func NewAnswer(author *User, question *Question, content string) *Answer { FILE: solutions/golang/stackOverFlow/stackoverflow.go type StackOverflow (line 9) | type StackOverflow struct method CreateUser (line 26) | func (so *StackOverflow) CreateUser(username, email string) *User { method AskQuestion (line 36) | func (so *StackOverflow) AskQuestion(user *User, title, content string... method AnswerQuestion (line 57) | func (so *StackOverflow) AnswerQuestion(user *User, question *Question... method AddComment (line 74) | func (so *StackOverflow) AddComment(user *User, target Commentable, co... method VoteQuestion (line 88) | func (so *StackOverflow) VoteQuestion(user *User, question *Question, ... method VoteAnswer (line 95) | func (so *StackOverflow) VoteAnswer(user *User, answer *Answer, value ... method AcceptAnswer (line 102) | func (so *StackOverflow) AcceptAnswer(answer *Answer) error { method SearchQuestions (line 109) | func (so *StackOverflow) SearchQuestions(query string) []*Question { method GetQuestionsByUser (line 135) | func (so *StackOverflow) GetQuestionsByUser(user *User) []*Question { function NewStackOverflow (line 17) | func NewStackOverflow() *StackOverflow { FILE: solutions/golang/stackOverFlow/stackoverflow_demo.go function Run (line 5) | func Run() { FILE: solutions/golang/stackOverFlow/types.go type Votable (line 10) | type Votable interface type Commentable (line 15) | type Commentable interface constant QuestionReputation (line 22) | QuestionReputation = 5 constant AnswerReputation (line 23) | AnswerReputation = 10 constant CommentReputation (line 24) | CommentReputation = 2 type Vote (line 28) | type Vote struct type Comment (line 34) | type Comment struct function NewComment (line 42) | func NewComment(author *User, content string) *Comment { type Tag (line 52) | type Tag struct function NewTag (line 57) | func NewTag(name string) *Tag { type User (line 65) | type User struct method UpdateReputation (line 87) | func (u *User) UpdateReputation(value int) { method GetReputation (line 96) | func (u *User) GetReputation() int { method AddQuestion (line 102) | func (u *User) AddQuestion(q *Question) { method AddAnswer (line 109) | func (u *User) AddAnswer(a *Answer) { method AddComment (line 116) | func (u *User) AddComment(c *Comment) { method GetQuestions (line 123) | func (u *User) GetQuestions() []*Question { function NewUser (line 76) | func NewUser(id, username, email string) *User { type Question (line 132) | type Question struct method AddAnswer (line 165) | func (q *Question) AddAnswer(answer *Answer) error { method Vote (line 180) | func (q *Question) Vote(user *User, value int) error { method GetVoteCount (line 201) | func (q *Question) GetVoteCount() int { method AddComment (line 212) | func (q *Question) AddComment(comment *Comment) error { method GetComments (line 219) | func (q *Question) GetComments() []*Comment { method GetAnswers (line 227) | func (q *Question) GetAnswers() []*Answer { method GetTags (line 235) | func (q *Question) GetTags() []*Tag { function NewQuestion (line 145) | func NewQuestion(author *User, title, content string, tagNames []string)... function generateID (line 244) | func generateID() string { FILE: solutions/golang/taskmanagementsystem/task.go type Task (line 5) | type Task struct method GetId (line 27) | func (t *Task) GetId() string { method GetTitle (line 31) | func (t *Task) GetTitle() string { method GetDescription (line 35) | func (t *Task) GetDescription() string { method GetDueDate (line 39) | func (t *Task) GetDueDate() time.Time { method GetPriority (line 43) | func (t *Task) GetPriority() int { method GetStatus (line 47) | func (t *Task) GetStatus() TaskStatus { method GetAssignedUser (line 51) | func (t *Task) GetAssignedUser() *User { method SetTitle (line 55) | func (t *Task) SetTitle(title string) { method SetDescription (line 59) | func (t *Task) SetDescription(description string) { method SetDueDate (line 63) | func (t *Task) SetDueDate(dueDate time.Time) { method SetPriority (line 67) | func (t *Task) SetPriority(priority int) { method SetStatus (line 71) | func (t *Task) SetStatus(status TaskStatus) { function NewTask (line 15) | func NewTask(id, title, description string, dueDate time.Time, priority ... FILE: solutions/golang/taskmanagementsystem/task_management_system_demo.go function Run (line 8) | func Run() { FILE: solutions/golang/taskmanagementsystem/task_manager.go type TaskManager (line 8) | type TaskManager struct method CreateTask (line 27) | func (tm *TaskManager) CreateTask(task *Task) { method UpdateTask (line 35) | func (tm *TaskManager) UpdateTask(updatedTask *Task) { method DeleteTask (line 53) | func (tm *TaskManager) DeleteTask(taskId string) { method SearchTasks (line 63) | func (tm *TaskManager) SearchTasks(keyword string) []*Task { method FilterTasks (line 76) | func (tm *TaskManager) FilterTasks(status TaskStatus, startDate, endDa... method MarkTaskAsCompleted (line 92) | func (tm *TaskManager) MarkTaskAsCompleted(taskId string) { method GetTaskHistory (line 101) | func (tm *TaskManager) GetTaskHistory(user *User) []*Task { method assignTaskToUser (line 108) | func (tm *TaskManager) assignTaskToUser(user *User, task *Task) { method unassignTaskFromUser (line 112) | func (tm *TaskManager) unassignTaskFromUser(user *User, task *Task) { function GetTaskManager (line 17) | func GetTaskManager() *TaskManager { function contains (line 122) | func contains(text, substr string) bool { FILE: solutions/golang/taskmanagementsystem/task_status.go type TaskStatus (line 3) | type TaskStatus constant Pending (line 6) | Pending TaskStatus = "PENDING" constant InProgress (line 7) | InProgress TaskStatus = "IN_PROGRESS" constant Completed (line 8) | Completed TaskStatus = "COMPLETED" FILE: solutions/golang/taskmanagementsystem/user.go type User (line 3) | type User struct method GetId (line 13) | func (u *User) GetId() string { method GetName (line 17) | func (u *User) GetName() string { function NewUser (line 9) | func NewUser(id, name, email string) *User { FILE: solutions/golang/tictactoe/board.go type Board (line 5) | type Board struct method InitializeBoard (line 16) | func (b *Board) InitializeBoard() { method MakeMove (line 25) | func (b *Board) MakeMove(row, col int, symbol rune) error { method IsFull (line 34) | func (b *Board) IsFull() bool { method HasWinner (line 38) | func (b *Board) HasWinner() bool { method PrintBoard (line 60) | func (b *Board) PrintBoard() { function NewBoard (line 10) | func NewBoard() *Board { FILE: solutions/golang/tictactoe/game.go type Game (line 10) | type Game struct method Play (line 26) | func (g *Game) Play() { method switchPlayer (line 52) | func (g *Game) switchPlayer() { method getValidInput (line 60) | func (g *Game) getValidInput(prompt string) int { function NewGame (line 17) | func NewGame(player1, player2 *Player) *Game { FILE: solutions/golang/tictactoe/player.go type Player (line 3) | type Player struct function NewPlayer (line 8) | func NewPlayer(name string, symbol rune) *Player { FILE: solutions/golang/tictactoe/tictactoe_demo.go function Run (line 3) | func Run() { FILE: solutions/golang/trafficsignalsystem/road.go type Road (line 3) | type Road struct method SetTrafficLight (line 13) | func (r *Road) SetTrafficLight(trafficLight *TrafficLight) { function NewRoad (line 9) | func NewRoad(id, name string) *Road { FILE: solutions/golang/trafficsignalsystem/signal.go type Signal (line 3) | type Signal constant Red (line 6) | Red Signal = "RED" constant Yellow (line 7) | Yellow Signal = "YELLOW" constant Green (line 8) | Green Signal = "GREEN" FILE: solutions/golang/trafficsignalsystem/traffic_controller.go type TrafficController (line 8) | type TrafficController struct method AddRoad (line 24) | func (tc *TrafficController) AddRoad(road *Road) { method StartTrafficControl (line 30) | func (tc *TrafficController) StartTrafficControl() { method HandleEmergency (line 49) | func (tc *TrafficController) HandleEmergency(roadID string) { function GetTrafficController (line 17) | func GetTrafficController() *TrafficController { FILE: solutions/golang/trafficsignalsystem/traffic_light.go type TrafficLight (line 5) | type TrafficLight struct method ChangeSignal (line 23) | func (tl *TrafficLight) ChangeSignal(newSignal Signal) { method notifyObservers (line 28) | func (tl *TrafficLight) notifyObservers() { function NewTrafficLight (line 13) | func NewTrafficLight(id string, redDuration, yellowDuration, greenDurati... FILE: solutions/golang/trafficsignalsystem/traffic_signal_system_demo.go function Run (line 6) | func Run() { FILE: solutions/golang/vendingmachine/coin.go type Coin (line 3) | type Coin constant PENNY (line 6) | PENNY Coin = 0.01 constant NICKEL (line 7) | NICKEL Coin = 0.05 constant DIME (line 8) | DIME Coin = 0.10 constant QUARTER (line 9) | QUARTER Coin = 0.25 FILE: solutions/golang/vendingmachine/inventory.go type Inventory (line 3) | type Inventory struct method AddProduct (line 11) | func (inv *Inventory) AddProduct(product *Product, quantity int) { method IsAvailable (line 15) | func (inv *Inventory) IsAvailable(product *Product) bool { function NewInventory (line 7) | func NewInventory() *Inventory { FILE: solutions/golang/vendingmachine/note.go type Note (line 3) | type Note constant ONE (line 6) | ONE Note = 1 constant FIVE (line 7) | FIVE Note = 5 constant TEN (line 8) | TEN Note = 10 constant TWENTY (line 9) | TWENTY Note = 20 FILE: solutions/golang/vendingmachine/product.go type Product (line 3) | type Product struct function NewProduct (line 8) | func NewProduct(name string, price float64) *Product { FILE: solutions/golang/vendingmachine/state.go type VendingMachineState (line 5) | type VendingMachineState interface type IdleState (line 14) | type IdleState struct method SelectProduct (line 18) | func (s *IdleState) SelectProduct(product *Product) { method InsertCoin (line 28) | func (s *IdleState) InsertCoin(coin Coin) { fmt.Println("Please select... method InsertNote (line 29) | func (s *IdleState) InsertNote(note Note) { fmt.Println("Please select... method DispenseProduct (line 30) | func (s *IdleState) DispenseProduct() { fmt.Println("Please select... method ReturnChange (line 31) | func (s *IdleState) ReturnChange() { fmt.Println("No change to ... type ReadyState (line 34) | type ReadyState struct method SelectProduct (line 38) | func (s *ReadyState) SelectProduct(product *Product) { method InsertCoin (line 42) | func (s *ReadyState) InsertCoin(coin Coin) { method InsertNote (line 48) | func (s *ReadyState) InsertNote(note Note) { method DispenseProduct (line 54) | func (s *ReadyState) DispenseProduct() { fmt.Println("Please make paym... method ReturnChange (line 55) | func (s *ReadyState) ReturnChange() { method checkPaymentStatus (line 66) | func (s *ReadyState) checkPaymentStatus() { type DispenseState (line 73) | type DispenseState struct method SelectProduct (line 77) | func (s *DispenseState) SelectProduct(product *Product) { fmt.Println(... method InsertCoin (line 78) | func (s *DispenseState) InsertCoin(coin Coin) { fmt.Println(... method InsertNote (line 79) | func (s *DispenseState) InsertNote(note Note) { fmt.Println(... method DispenseProduct (line 80) | func (s *DispenseState) DispenseProduct() { method ReturnChange (line 85) | func (s *DispenseState) ReturnChange() { fmt.Println("Please collect t... type ReturnChangeState (line 88) | type ReturnChangeState struct method SelectProduct (line 92) | func (s *ReturnChangeState) SelectProduct(product *Product) { method InsertCoin (line 95) | func (s *ReturnChangeState) InsertCoin(coin Coin) { fmt.Println("Pleas... method InsertNote (line 96) | func (s *ReturnChangeState) InsertNote(note Note) { fmt.Println("Pleas... method DispenseProduct (line 97) | func (s *ReturnChangeState) DispenseProduct() { method ReturnChange (line 100) | func (s *ReturnChangeState) ReturnChange() { FILE: solutions/golang/vendingmachine/vending_machine.go type VendingMachine (line 3) | type VendingMachine struct method SelectProduct (line 26) | func (vm *VendingMachine) SelectProduct(product *Product) { method InsertCoin (line 30) | func (vm *VendingMachine) InsertCoin(coin Coin) { method InsertNote (line 34) | func (vm *VendingMachine) InsertNote(note Note) { method DispenseProduct (line 38) | func (vm *VendingMachine) DispenseProduct() { method ReturnChange (line 42) | func (vm *VendingMachine) ReturnChange() { method SetState (line 46) | func (vm *VendingMachine) SetState(state VendingMachineState) { method ResetPayment (line 50) | func (vm *VendingMachine) ResetPayment() { method ResetSelectedProduct (line 54) | func (vm *VendingMachine) ResetSelectedProduct() { function NewVendingMachine (line 14) | func NewVendingMachine() *VendingMachine { FILE: solutions/golang/vendingmachine/vending_machine_demo.go function Run (line 6) | func Run() { FILE: solutions/java/src/LLDRunner.java class LLDRunner (line 20) | public class LLDRunner { method main (line 21) | public static void main(String[] args) { FILE: solutions/java/src/airlinemanagementsystem/Aircraft.java class Aircraft (line 3) | public class Aircraft { method Aircraft (line 8) | public Aircraft(String tailNumber, String model, int totalSeats) { method getTailNumber (line 14) | public String getTailNumber() { FILE: solutions/java/src/airlinemanagementsystem/AirlineManagementSystem.java class AirlineManagementSystem (line 17) | public class AirlineManagementSystem { method AirlineManagementSystem (line 25) | public AirlineManagementSystem() { method addPassenger (line 34) | public Passenger addPassenger(String name, String email) { method addAircraft (line 40) | public Aircraft addAircraft(String tailNumber, String model, int total... method addFlight (line 46) | public Flight addFlight(String source, String destination, LocalDateTi... method searchFlights (line 55) | public List searchFlights(String source, String destination, L... method bookFlight (line 59) | public Booking bookFlight(String flightNumber, String passengerId, Sea... method cancelBooking (line 65) | public void cancelBooking(String bookingNumber) { method processPayment (line 69) | public void processPayment(Payment payment) { FILE: solutions/java/src/airlinemanagementsystem/AirlineManagementSystemDemo.java class AirlineManagementSystemDemo (line 12) | public class AirlineManagementSystemDemo { method run (line 13) | public static void run() { FILE: solutions/java/src/airlinemanagementsystem/Passenger.java class Passenger (line 5) | public class Passenger { method Passenger (line 10) | public Passenger(String name, String email) { method getId (line 16) | public String getId() { FILE: solutions/java/src/airlinemanagementsystem/booking/Booking.java class Booking (line 9) | public class Booking { method Booking (line 17) | public Booking(Flight flight, Passenger passenger, Seat seat, double p... method cancel (line 26) | public void cancel() { method getId (line 31) | public String getId() { FILE: solutions/java/src/airlinemanagementsystem/booking/BookingManager.java class BookingManager (line 11) | public class BookingManager { method BookingManager (line 16) | private BookingManager() { method getInstance (line 20) | public static synchronized BookingManager getInstance() { method createBooking (line 27) | public Booking createBooking(Flight flight, Passenger passenger, Seat ... method cancelBooking (line 36) | public void cancelBooking(String bookingNumber) { FILE: solutions/java/src/airlinemanagementsystem/booking/BookingStatus.java type BookingStatus (line 3) | public enum BookingStatus { FILE: solutions/java/src/airlinemanagementsystem/flight/Flight.java class Flight (line 9) | public class Flight { method Flight (line 20) | public Flight(String source, String destination, LocalDateTime departu... method isSeatAvailable (line 32) | public synchronized boolean isSeatAvailable(String seatNo) { method reserveSeat (line 37) | public synchronized void reserveSeat(String seatNo) { method releaseSeat (line 43) | public synchronized void releaseSeat(String seatNo) { method getSource (line 48) | public String getSource() { method getDestination (line 52) | public String getDestination() { method getDepartureTime (line 56) | public LocalDateTime getDepartureTime() { method getFlightNumber (line 60) | public String getFlightNumber() { method getArrivalTime (line 64) | public LocalDateTime getArrivalTime() { method getAvailableSeats (line 68) | public List getAvailableSeats() { FILE: solutions/java/src/airlinemanagementsystem/flight/FlightSearch.java class FlightSearch (line 8) | public class FlightSearch { method FlightSearch (line 11) | public FlightSearch() { method addFlight (line 15) | public void addFlight(Flight flight) { method searchFlights (line 19) | public List searchFlights(String source, String destination, L... FILE: solutions/java/src/airlinemanagementsystem/flight/FlightStatus.java type FlightStatus (line 3) | public enum FlightStatus { FILE: solutions/java/src/airlinemanagementsystem/payment/Payment.java class Payment (line 3) | public class Payment { method Payment (line 9) | public Payment(String paymentId, String paymentMethod, double amount) { method processPayment (line 16) | public void processPayment() { FILE: solutions/java/src/airlinemanagementsystem/payment/PaymentProcessor.java class PaymentProcessor (line 3) | public class PaymentProcessor { method PaymentProcessor (line 6) | private PaymentProcessor() { method getInstance (line 9) | public static synchronized PaymentProcessor getInstance() { method processPayment (line 16) | public void processPayment(Payment payment) { FILE: solutions/java/src/airlinemanagementsystem/payment/PaymentStatus.java type PaymentStatus (line 3) | public enum PaymentStatus { FILE: solutions/java/src/airlinemanagementsystem/seat/Seat.java class Seat (line 3) | public class Seat { method Seat (line 8) | public Seat(String seatNumber, SeatType type) { method getSeatNumber (line 14) | public String getSeatNumber() { method reserve (line 18) | public void reserve() { method release (line 22) | public void release() { method isBooked (line 26) | public synchronized boolean isBooked() { FILE: solutions/java/src/airlinemanagementsystem/seat/SeatStatus.java type SeatStatus (line 3) | public enum SeatStatus { FILE: solutions/java/src/airlinemanagementsystem/seat/SeatType.java type SeatType (line 3) | public enum SeatType { FILE: solutions/java/src/atm/ATMDemo.java class ATMDemo (line 5) | public class ATMDemo { method main (line 6) | public static void main(String[] args) { FILE: solutions/java/src/atm/ATMSystem.java class ATMSystem (line 16) | public class ATMSystem { method ATMSystem (line 24) | private ATMSystem() { method getInstance (line 37) | public static ATMSystem getInstance() { method changeState (line 44) | public void changeState(ATMState newState) { this.currentState = newSt... method setCurrentCard (line 45) | public void setCurrentCard(Card card) { this.currentCard = card; } method insertCard (line 47) | public void insertCard(String cardNumber) { method enterPin (line 51) | public void enterPin(String pin) { method selectOperation (line 55) | public void selectOperation(OperationType op, int... args) { currentSt... method getCard (line 57) | public Card getCard(String cardNumber) { method authenticate (line 61) | public boolean authenticate(String pin) { method checkBalance (line 65) | public void checkBalance() { method withdrawCash (line 70) | public void withdrawCash(int amount) { method depositCash (line 84) | public void depositCash(int amount) { method getCurrentCard (line 88) | public Card getCurrentCard() { method getBankService (line 92) | public BankService getBankService() { FILE: solutions/java/src/atm/chainofresponsibility/DispenseChain.java type DispenseChain (line 4) | public interface DispenseChain { method setNextChain (line 5) | void setNextChain(DispenseChain nextChain); method dispense (line 6) | void dispense(int amount); method canDispense (line 7) | boolean canDispense(int amount); FILE: solutions/java/src/atm/chainofresponsibility/NoteDispenser.java class NoteDispenser (line 3) | abstract class NoteDispenser implements DispenseChain { method NoteDispenser (line 8) | public NoteDispenser(int noteValue, int numNotes) { method setNextChain (line 13) | @Override method dispense (line 18) | @Override method canDispense (line 37) | @Override FILE: solutions/java/src/atm/chainofresponsibility/NoteDispenser100.java class NoteDispenser100 (line 3) | public class NoteDispenser100 extends NoteDispenser{ method NoteDispenser100 (line 4) | public NoteDispenser100(int numNotes) { FILE: solutions/java/src/atm/chainofresponsibility/NoteDispenser20.java class NoteDispenser20 (line 3) | public class NoteDispenser20 extends NoteDispenser{ method NoteDispenser20 (line 4) | public NoteDispenser20(int numNotes) { super(20, numNotes); } FILE: solutions/java/src/atm/chainofresponsibility/NoteDispenser50.java class NoteDispenser50 (line 3) | public class NoteDispenser50 extends NoteDispenser{ method NoteDispenser50 (line 4) | public NoteDispenser50(int numNotes) { super(50, numNotes); } FILE: solutions/java/src/atm/entities/Account.java class Account (line 6) | public class Account { method Account (line 11) | public Account(String accountNumber, double balance) { method getAccountNumber (line 17) | public String getAccountNumber() { method getBalance (line 21) | public double getBalance() { method getCards (line 25) | public Map getCards() { method deposit (line 29) | public synchronized void deposit(double amount) { method withdraw (line 33) | public synchronized boolean withdraw(double amount) { FILE: solutions/java/src/atm/entities/BankService.java class BankService (line 6) | public class BankService { method BankService (line 11) | public BankService() { method createAccount (line 22) | public Account createAccount(String accountNumber, double initialBalan... method createCard (line 28) | public Card createCard(String cardNumber, String pin) { method authenticate (line 34) | public boolean authenticate(Card card, String pin) { method getCard (line 38) | public Card getCard(String cardNumber) { method getBalance (line 42) | public double getBalance(Card card) { method withdrawMoney (line 46) | public void withdrawMoney(Card card, double amount) { method depositMoney (line 50) | public void depositMoney(Card card, double amount) { method linkCardToAccount (line 54) | public void linkCardToAccount(Card card, Account account) { FILE: solutions/java/src/atm/entities/Card.java class Card (line 3) | public class Card { method Card (line 7) | public Card(String cardNumber, String pin) { method getCardNumber (line 12) | public String getCardNumber() { method getPin (line 16) | public String getPin() { FILE: solutions/java/src/atm/entities/CashDispenser.java class CashDispenser (line 5) | public class CashDispenser { method CashDispenser (line 8) | public CashDispenser(DispenseChain chain) { method dispenseCash (line 12) | public synchronized void dispenseCash(int amount) { method canDispenseCash (line 16) | public synchronized boolean canDispenseCash(int amount) { FILE: solutions/java/src/atm/enums/OperationType.java type OperationType (line 3) | public enum OperationType { FILE: solutions/java/src/atm/state/ATMState.java type ATMState (line 6) | public interface ATMState { method insertCard (line 7) | void insertCard(ATMSystem atmSystem, String cardNumber); method enterPin (line 8) | void enterPin(ATMSystem atmSystem, String pin); method selectOperation (line 9) | void selectOperation(ATMSystem atmSystem, OperationType op, int... args); method ejectCard (line 10) | void ejectCard(ATMSystem atmSystem); FILE: solutions/java/src/atm/state/AuthenticatedState.java class AuthenticatedState (line 6) | public class AuthenticatedState implements ATMState { method insertCard (line 7) | @Override method enterPin (line 12) | @Override method selectOperation (line 17) | @Override method ejectCard (line 64) | @Override FILE: solutions/java/src/atm/state/HasCardState.java class HasCardState (line 6) | public class HasCardState implements ATMState { method insertCard (line 7) | @Override method enterPin (line 12) | @Override method selectOperation (line 26) | @Override method ejectCard (line 31) | @Override FILE: solutions/java/src/atm/state/IdleState.java class IdleState (line 7) | public class IdleState implements ATMState { method insertCard (line 8) | @Override method enterPin (line 21) | @Override method selectOperation (line 26) | @Override method ejectCard (line 31) | @Override FILE: solutions/java/src/carrentalsystem/Car.java class Car (line 3) | public class Car { method Car (line 11) | public Car(String make, String model, int year, String licensePlate, d... method getRentalPricePerDay (line 20) | public double getRentalPricePerDay() { method getLicensePlate (line 24) | public String getLicensePlate() { method getMake (line 28) | public String getMake() { method getModel (line 32) | public String getModel() { method isAvailable (line 36) | public boolean isAvailable() { method setAvailable (line 40) | public void setAvailable(boolean available) { FILE: solutions/java/src/carrentalsystem/CarRentalSystem.java class CarRentalSystem (line 13) | public class CarRentalSystem { method CarRentalSystem (line 19) | private CarRentalSystem() { method getInstance (line 25) | public static CarRentalSystem getInstance() { method addCar (line 29) | public void addCar(Car car) { method removeCar (line 33) | public void removeCar(String licensePlate) { method searchCars (line 37) | public List searchCars(String make, String model, LocalDate start... method isCarAvailable (line 49) | private boolean isCarAvailable(Car car, LocalDate startDate, LocalDate... method makeReservation (line 60) | public synchronized Reservation makeReservation(Customer customer, Car... method cancelReservation (line 71) | public synchronized void cancelReservation(String reservationId) { method processPayment (line 78) | public boolean processPayment(Reservation reservation) { method generateReservationId (line 82) | private String generateReservationId() { FILE: solutions/java/src/carrentalsystem/CarRentalSystemDemo.java class CarRentalSystemDemo (line 6) | public class CarRentalSystemDemo { method run (line 7) | public static void run() { FILE: solutions/java/src/carrentalsystem/CarStatus.java type CarStatus (line 3) | public enum CarStatus { FILE: solutions/java/src/carrentalsystem/CarType.java type CarType (line 3) | public enum CarType { FILE: solutions/java/src/carrentalsystem/Customer.java class Customer (line 3) | public class Customer { method Customer (line 8) | public Customer(String name, String contactInfo, String driversLicense... FILE: solutions/java/src/carrentalsystem/Reservation.java class Reservation (line 6) | public class Reservation { method Reservation (line 14) | public Reservation(String reservationId, Customer customer, Car car, L... method calculateTotalPrice (line 23) | private double calculateTotalPrice() { method getStartDate (line 28) | public LocalDate getStartDate() { method getEndDate (line 32) | public LocalDate getEndDate() { method getCar (line 36) | public Car getCar() { method getTotalPrice (line 40) | public double getTotalPrice() { method getReservationId (line 44) | public String getReservationId() { FILE: solutions/java/src/carrentalsystem/payment/CreditCardPaymentProcessor.java class CreditCardPaymentProcessor (line 3) | public class CreditCardPaymentProcessor implements PaymentProcessor { method processPayment (line 4) | @Override FILE: solutions/java/src/carrentalsystem/payment/PayPalPaymentProcessor.java class PayPalPaymentProcessor (line 3) | public class PayPalPaymentProcessor implements PaymentProcessor { method processPayment (line 4) | @Override FILE: solutions/java/src/carrentalsystem/payment/PaymentProcessor.java type PaymentProcessor (line 3) | public interface PaymentProcessor { method processPayment (line 4) | boolean processPayment(double amount); FILE: solutions/java/src/chessgame/Board.java class Board (line 5) | public class Board { method Board (line 8) | public Board() { method setupPieces (line 18) | private void setupPieces() { method getCell (line 46) | public Cell getCell(int row, int col) { method movePiece (line 50) | public synchronized boolean movePiece(Move move) { method getPiece (line 60) | public Piece getPiece(int row, int col) { method setPiece (line 64) | public void setPiece(int row, int col, Piece piece) { method isCheckmate (line 68) | public boolean isCheckmate(Color color) { method isStalemate (line 73) | public boolean isStalemate(Color color) { FILE: solutions/java/src/chessgame/Cell.java class Cell (line 5) | public class Cell { method Cell (line 9) | public Cell(int row, int col) { method isOccupied (line 14) | public boolean isOccupied() { method getPiece (line 18) | public Piece getPiece() { return piece; } method setPiece (line 19) | public void setPiece(Piece piece) { this.piece = piece; } method getRow (line 21) | public int getRow() { return row; } method getCol (line 22) | public int getCol() { return col; } FILE: solutions/java/src/chessgame/ChessGame.java class ChessGame (line 7) | public class ChessGame { method ChessGame (line 12) | public ChessGame() { method setPlayers (line 16) | public void setPlayers(String playerWhiteName, String playerBlackName) { method start (line 22) | public void start() { method switchTurn (line 44) | private void switchTurn() { method isGameOver (line 48) | private boolean isGameOver() { method getPlayerMove (line 53) | private Move getPlayerMove(Player player) { method displayResult (line 73) | private void displayResult() { FILE: solutions/java/src/chessgame/ChessGameDemo.java class ChessGameDemo (line 3) | public class ChessGameDemo { method run (line 4) | public static void run() { FILE: solutions/java/src/chessgame/Color.java type Color (line 3) | public enum Color { FILE: solutions/java/src/chessgame/InvalidMoveException.java class InvalidMoveException (line 3) | public class InvalidMoveException extends RuntimeException { method InvalidMoveException (line 4) | public InvalidMoveException(final String message) { FILE: solutions/java/src/chessgame/Move.java class Move (line 3) | public class Move { method Move (line 7) | public Move(Cell start, Cell end) { method getStart (line 12) | public Cell getStart() { return start; } method getEnd (line 14) | public Cell getEnd() { return end; } FILE: solutions/java/src/chessgame/Player.java class Player (line 3) | public class Player { method Player (line 7) | public Player(String name, Color color) { method getColor (line 12) | public Color getColor() { method getName (line 16) | public String getName() { FILE: solutions/java/src/chessgame/pieces/Bishop.java class Bishop (line 7) | public class Bishop extends Piece { method Bishop (line 8) | public Bishop(Color color) { method canMove (line 12) | @Override FILE: solutions/java/src/chessgame/pieces/King.java class King (line 7) | public class King extends Piece { method King (line 8) | public King(Color color) { method canMove (line 12) | @Override FILE: solutions/java/src/chessgame/pieces/Knight.java class Knight (line 7) | public class Knight extends Piece { method Knight (line 8) | public Knight(Color color) { method canMove (line 12) | @Override FILE: solutions/java/src/chessgame/pieces/Pawn.java class Pawn (line 7) | public class Pawn extends Piece { method Pawn (line 8) | public Pawn(Color color) { method canMove (line 12) | @Override FILE: solutions/java/src/chessgame/pieces/Piece.java class Piece (line 7) | public abstract class Piece { method Piece (line 10) | public Piece(Color color) { method canMove (line 14) | public abstract boolean canMove(Board board, Cell from, Cell to); method getColor (line 16) | public Color getColor() { FILE: solutions/java/src/chessgame/pieces/Queen.java class Queen (line 7) | public class Queen extends Piece { method Queen (line 8) | public Queen(Color color) { method canMove (line 12) | @Override FILE: solutions/java/src/chessgame/pieces/Rook.java class Rook (line 7) | public class Rook extends Piece { method Rook (line 8) | public Rook(Color color) { method canMove (line 12) | @Override FILE: solutions/java/src/coffeevendingmachine/CoffeeVendingMachine.java class CoffeeVendingMachine (line 15) | public class CoffeeVendingMachine { method CoffeeVendingMachine (line 21) | private CoffeeVendingMachine() { method getInstance (line 26) | public static CoffeeVendingMachine getInstance() { method selectCoffee (line 31) | public void selectCoffee(CoffeeType type, List toppings) { method insertMoney (line 50) | public void insertMoney(int amount) { state.insertMoney(this, amount); } method dispenseCoffee (line 51) | public void dispenseCoffee() { state.dispenseCoffee(this); } method cancel (line 52) | public void cancel() { state.cancel(this); } method setState (line 55) | public void setState(VendingMachineState state) { this.state = state; } method getState (line 56) | public VendingMachineState getState() { return state; } method setSelectedCoffee (line 57) | public void setSelectedCoffee(Coffee selectedCoffee) { this.selectedCo... method getSelectedCoffee (line 58) | public Coffee getSelectedCoffee() { return selectedCoffee; } method setMoneyInserted (line 59) | public void setMoneyInserted(int moneyInserted) { this.moneyInserted =... method getMoneyInserted (line 60) | public int getMoneyInserted() { return moneyInserted; } method reset (line 62) | public void reset() { method showIngredientsMap (line 67) | public Map showIngredientsMap() { FILE: solutions/java/src/coffeevendingmachine/CoffeeVendingMachineDemo.java class CoffeeVendingMachineDemo (line 9) | public class CoffeeVendingMachineDemo { method main (line 10) | public static void main(String[] args) { FILE: solutions/java/src/coffeevendingmachine/Inventory.java class Inventory (line 8) | public class Inventory { method Inventory (line 12) | private Inventory() { method getInstance (line 16) | public static Inventory getInstance() { method addStock (line 20) | public void addStock(Ingredient ingredient, int quantity) { method hasIngredients (line 24) | public boolean hasIngredients(Map recipe) { method deductIngredients (line 29) | public synchronized void deductIngredients(Map re... method printInventory (line 38) | public void printInventory() { FILE: solutions/java/src/coffeevendingmachine/decorator/CaramelSyrupDecorator.java class CaramelSyrupDecorator (line 8) | public class CaramelSyrupDecorator extends CoffeeDecorator { method CaramelSyrupDecorator (line 12) | public CaramelSyrupDecorator(Coffee coffee) { method getCoffeeType (line 16) | @Override method getPrice (line 21) | @Override method getRecipe (line 26) | @Override method prepare (line 34) | @Override FILE: solutions/java/src/coffeevendingmachine/decorator/Coffee.java class Coffee (line 7) | public abstract class Coffee { method getCoffeeType (line 10) | public String getCoffeeType() { method prepare (line 15) | public void prepare() { method grindBeans (line 25) | private void grindBeans() { System.out.println("- Grinding fresh coffe... method brew (line 26) | private void brew() { System.out.println("- Brewing coffee with hot wa... method pourIntoCup (line 27) | private void pourIntoCup() { System.out.println("- Pouring into a cup.... method addCondiments (line 30) | protected abstract void addCondiments(); method getPrice (line 32) | public abstract int getPrice(); method getRecipe (line 33) | public abstract Map getRecipe(); FILE: solutions/java/src/coffeevendingmachine/decorator/CoffeeDecorator.java class CoffeeDecorator (line 7) | public abstract class CoffeeDecorator extends Coffee { method CoffeeDecorator (line 10) | public CoffeeDecorator(Coffee coffee) { method getPrice (line 16) | @Override method getRecipe (line 21) | @Override method addCondiments (line 26) | @Override method prepare (line 31) | @Override FILE: solutions/java/src/coffeevendingmachine/decorator/ExtraSugarDecorator.java class ExtraSugarDecorator (line 8) | public class ExtraSugarDecorator extends CoffeeDecorator { method ExtraSugarDecorator (line 12) | public ExtraSugarDecorator(Coffee coffee) { method getCoffeeType (line 16) | @Override method getPrice (line 21) | @Override method getRecipe (line 26) | @Override method prepare (line 35) | @Override FILE: solutions/java/src/coffeevendingmachine/enums/CoffeeType.java type CoffeeType (line 3) | public enum CoffeeType { FILE: solutions/java/src/coffeevendingmachine/enums/Ingredient.java type Ingredient (line 3) | public enum Ingredient { FILE: solutions/java/src/coffeevendingmachine/enums/ToppingType.java type ToppingType (line 3) | public enum ToppingType { FILE: solutions/java/src/coffeevendingmachine/factory/CoffeeFactory.java class CoffeeFactory (line 9) | public class CoffeeFactory { method createCoffee (line 10) | public static Coffee createCoffee(CoffeeType type) { FILE: solutions/java/src/coffeevendingmachine/state/OutOfIngredientState.java class OutOfIngredientState (line 6) | public class OutOfIngredientState implements VendingMachineState { method selectCoffee (line 7) | @Override method insertMoney (line 12) | @Override method dispenseCoffee (line 17) | @Override method cancel (line 22) | @Override FILE: solutions/java/src/coffeevendingmachine/state/PaidState.java class PaidState (line 7) | public class PaidState implements VendingMachineState { method selectCoffee (line 8) | @Override method insertMoney (line 13) | @Override method dispenseCoffee (line 18) | @Override method cancel (line 41) | @Override FILE: solutions/java/src/coffeevendingmachine/state/ReadyState.java class ReadyState (line 6) | public class ReadyState implements VendingMachineState { method selectCoffee (line 7) | @Override method insertMoney (line 14) | @Override method dispenseCoffee (line 19) | @Override method cancel (line 24) | @Override FILE: solutions/java/src/coffeevendingmachine/state/SelectingState.java class SelectingState (line 6) | public class SelectingState implements VendingMachineState { method selectCoffee (line 7) | @Override method insertMoney (line 12) | @Override method dispenseCoffee (line 21) | @Override method cancel (line 26) | @Override public void cancel(CoffeeVendingMachine machine) { FILE: solutions/java/src/coffeevendingmachine/state/VendingMachineState.java type VendingMachineState (line 6) | public interface VendingMachineState { method selectCoffee (line 7) | void selectCoffee(CoffeeVendingMachine machine, Coffee coffee); method insertMoney (line 8) | void insertMoney(CoffeeVendingMachine machine, int amount); method dispenseCoffee (line 9) | void dispenseCoffee(CoffeeVendingMachine machine); method cancel (line 10) | void cancel(CoffeeVendingMachine machine); FILE: solutions/java/src/coffeevendingmachine/templatemethod/Cappuccino.java class Cappuccino (line 8) | public class Cappuccino extends Coffee { method Cappuccino (line 9) | public Cappuccino() { method addCondiments (line 13) | @Override method getPrice (line 18) | @Override method getRecipe (line 23) | @Override FILE: solutions/java/src/coffeevendingmachine/templatemethod/Espresso.java class Espresso (line 8) | public class Espresso extends Coffee { method Espresso (line 9) | public Espresso() { method addCondiments (line 13) | @Override method getPrice (line 16) | @Override method getRecipe (line 21) | @Override FILE: solutions/java/src/coffeevendingmachine/templatemethod/Latte.java class Latte (line 8) | public class Latte extends Coffee { method Latte (line 9) | public Latte() { method addCondiments (line 14) | @Override method getPrice (line 19) | @Override method getRecipe (line 24) | @Override FILE: solutions/java/src/concertticketbookingsystem/Booking.java class Booking (line 5) | public class Booking { method Booking (line 13) | public Booking(String id, User user, Concert concert, List seats) { method calculateTotalPrice (line 22) | private double calculateTotalPrice() { method confirmBooking (line 26) | public void confirmBooking() { method cancelBooking (line 34) | public void cancelBooking() { method getId (line 44) | public String getId() { method getUser (line 48) | public User getUser() { method getConcert (line 52) | public Concert getConcert() { method getSeats (line 56) | public List getSeats() { method getTotalPrice (line 60) | public double getTotalPrice() { method getStatus (line 64) | public BookingStatus getStatus() { FILE: solutions/java/src/concertticketbookingsystem/BookingStatus.java type BookingStatus (line 3) | public enum BookingStatus { FILE: solutions/java/src/concertticketbookingsystem/Concert.java class Concert (line 6) | public class Concert { method Concert (line 13) | public Concert(String id, String artist, String venue, LocalDateTime d... method getId (line 21) | public String getId() { method getArtist (line 25) | public String getArtist() { method getVenue (line 29) | public String getVenue() { method getDateTime (line 33) | public LocalDateTime getDateTime() { method getSeats (line 37) | public List getSeats() { FILE: solutions/java/src/concertticketbookingsystem/ConcertTicketBookingSystem.java class ConcertTicketBookingSystem (line 10) | public class ConcertTicketBookingSystem { method ConcertTicketBookingSystem (line 16) | private ConcertTicketBookingSystem() { method getInstance (line 21) | public static synchronized ConcertTicketBookingSystem getInstance() { method addConcert (line 28) | public void addConcert(Concert concert) { method getConcert (line 32) | public Concert getConcert(String concertId) { method searchConcerts (line 36) | public List searchConcerts(String artist, String venue, Local... method bookTickets (line 44) | public Booking bookTickets(User user, Concert concert, List seat... method cancelBooking (line 71) | public void cancelBooking(String bookingId) { method processPayment (line 79) | private void processPayment(Booking booking) { method generateBookingId (line 84) | private String generateBookingId() { FILE: solutions/java/src/concertticketbookingsystem/ConcertTicketBookingSystemDemo.java class ConcertTicketBookingSystemDemo (line 8) | public class ConcertTicketBookingSystemDemo { method run (line 9) | public static void run() { method generateSeats (line 48) | private static List generateSeats(int numberOfSeats) { method selectSeats (line 59) | private static List selectSeats(Concert concert, int numberOfSea... FILE: solutions/java/src/concertticketbookingsystem/Seat.java class Seat (line 3) | public class Seat { method Seat (line 10) | public Seat(String id, String seatNumber, SeatType seatType, double pr... method book (line 18) | public synchronized void book() { method release (line 26) | public synchronized void release() { method getPrice (line 32) | public double getPrice() { method getId (line 36) | public String getId() { method getSeatNumber (line 40) | public String getSeatNumber() { method getSeatType (line 44) | public SeatType getSeatType() { method getStatus (line 48) | public SeatStatus getStatus() { FILE: solutions/java/src/concertticketbookingsystem/SeatNotAvailableException.java class SeatNotAvailableException (line 3) | public class SeatNotAvailableException extends RuntimeException { method SeatNotAvailableException (line 4) | public SeatNotAvailableException(String message) { FILE: solutions/java/src/concertticketbookingsystem/SeatStatus.java type SeatStatus (line 3) | public enum SeatStatus { FILE: solutions/java/src/concertticketbookingsystem/SeatType.java type SeatType (line 3) | public enum SeatType { FILE: solutions/java/src/concertticketbookingsystem/User.java class User (line 3) | public class User { method User (line 8) | public User(String id, String name, String email) { FILE: solutions/java/src/courseregistrationsystem/CourseRegistrationDemo.java class CourseRegistrationDemo (line 11) | public class CourseRegistrationDemo { method main (line 12) | public static void main(String[] args) { FILE: solutions/java/src/courseregistrationsystem/CourseRegistrationService.java class CourseRegistrationService (line 6) | public class CourseRegistrationService { method CourseRegistrationService (line 8) | public CourseRegistrationService() { method register (line 17) | public void register(RegistrationRequest request) throws RegistrationE... FILE: solutions/java/src/courseregistrationsystem/CourseRegistrationSystemFacade.java class CourseRegistrationSystemFacade (line 8) | public class CourseRegistrationSystemFacade { method registerStudentForCourse (line 13) | public void registerStudentForCourse(String studentId, String offering... method dropStudentFromCourse (line 25) | public void dropStudentFromCourse(String studentId, String offeringId) { FILE: solutions/java/src/courseregistrationsystem/chain/CapacityRuleHandler.java class CapacityRuleHandler (line 5) | public class CapacityRuleHandler extends RegistrationRuleHandler { method handle (line 6) | @Override FILE: solutions/java/src/courseregistrationsystem/chain/PrerequisiteRuleHandler.java class PrerequisiteRuleHandler (line 8) | public class PrerequisiteRuleHandler extends RegistrationRuleHandler { method handle (line 9) | @Override FILE: solutions/java/src/courseregistrationsystem/chain/RegistrationRuleHandler.java class RegistrationRuleHandler (line 5) | public abstract class RegistrationRuleHandler { method setNext (line 8) | public void setNext(RegistrationRuleHandler next) { this.next = next; } method handle (line 10) | public abstract void handle(RegistrationRequest request) throws Regist... method handleNext (line 12) | protected void handleNext(RegistrationRequest request) throws Registra... FILE: solutions/java/src/courseregistrationsystem/chain/ScheduleConflictRuleHandler.java class ScheduleConflictRuleHandler (line 5) | public class ScheduleConflictRuleHandler extends RegistrationRuleHandler { method handle (line 6) | @Override FILE: solutions/java/src/courseregistrationsystem/exception/RegistrationException.java class RegistrationException (line 3) | public class RegistrationException extends Exception { method RegistrationException (line 4) | public RegistrationException(String message) { FILE: solutions/java/src/courseregistrationsystem/model/Course.java class Course (line 6) | public class Course { method Course (line 11) | public Course(String courseCode, String title) { this.courseCode = cou... method addPrerequisite (line 13) | public void addPrerequisite(Course course) { prerequisites.add(course); } method getCourseCode (line 14) | public String getCourseCode() { return courseCode; } method getPrerequisites (line 15) | public Set getPrerequisites() { return prerequisites; } FILE: solutions/java/src/courseregistrationsystem/model/CourseOffering.java class CourseOffering (line 7) | public class CourseOffering { method CourseOffering (line 17) | private CourseOffering(Builder builder) { method addObserver (line 25) | public void addObserver(CourseOfferingObserver observer) { observers.a... method notifyObservers (line 26) | private void notifyObservers() { observers.forEach(o -> o.onSpotAvaila... method isFull (line 28) | public boolean isFull() { return registeredStudents.size() >= capacity; } method addStudent (line 29) | public void addStudent(Student student) { registeredStudents.add(stude... method addToWaitlist (line 30) | public void addToWaitlist(Student student) { waitlistedStudents.add(st... method dropStudent (line 32) | public void dropStudent(Student student) { method getNextFromWaitlist (line 41) | public Optional getNextFromWaitlist() { return Optional.ofNul... method getId (line 42) | public String getId() { return id; } method getCourse (line 43) | public Course getCourse() { return course; } method getTimeSlot (line 44) | public TimeSlot getTimeSlot() { return timeSlot; } class Builder (line 47) | public static class Builder { method Builder (line 49) | public Builder(String id, Course course) { this.id = id; this.course... method withProfessor (line 50) | public Builder withProfessor(Professor professor) { this.professor =... method at (line 51) | public Builder at(TimeSlot timeSlot) { this.timeSlot = timeSlot; ret... method withCapacity (line 52) | public Builder withCapacity(int capacity) { this.capacity = capacity... method build (line 53) | public CourseOffering build() { return new CourseOffering(this); } FILE: solutions/java/src/courseregistrationsystem/model/Student.java class Student (line 6) | public class Student { method Student (line 12) | public Student(String id, String name) { this.id = id; this.name = nam... method getId (line 14) | public String getId() { return id; } method getName (line 15) | public String getName() { return name; } method getCompletedCourses (line 16) | public Set getCompletedCourses() { return completedCourses; } method getRegisteredOfferings (line 17) | public Set getRegisteredOfferings() { return registere... method addCompletedCourse (line 18) | public void addCompletedCourse(Course course) { completedCourses.add(c... method enroll (line 19) | public void enroll(CourseOffering offering) { registeredOfferings.add(... method drop (line 20) | public void drop(CourseOffering offering) { registeredOfferings.remove... FILE: solutions/java/src/courseregistrationsystem/model/TimeSlot.java method overlaps (line 7) | public boolean overlaps(TimeSlot other) { FILE: solutions/java/src/courseregistrationsystem/observer/CourseOfferingObserver.java type CourseOfferingObserver (line 5) | public interface CourseOfferingObserver { method onSpotAvailable (line 6) | void onSpotAvailable(CourseOffering offering); FILE: solutions/java/src/courseregistrationsystem/observer/WaitlistManager.java class WaitlistManager (line 8) | public class WaitlistManager implements CourseOfferingObserver { method getInstance (line 11) | public static WaitlistManager getInstance() { return INSTANCE; } method WaitlistManager (line 12) | private WaitlistManager() {} method onSpotAvailable (line 14) | @Override FILE: solutions/java/src/courseregistrationsystem/repository/CourseRepository.java class CourseRepository (line 10) | public class CourseRepository { method getInstance (line 15) | public static CourseRepository getInstance() { return INSTANCE; } method saveCourse (line 16) | public void saveCourse(Course c) { courses.put(c.getCourseCode(), c); } method saveOffering (line 17) | public void saveOffering(CourseOffering o) { offerings.put(o.getId(), ... method findOfferingById (line 18) | public Optional findOfferingById(String id) { return O... FILE: solutions/java/src/courseregistrationsystem/repository/StudentRepository.java class StudentRepository (line 9) | public class StudentRepository { method getInstance (line 13) | public static StudentRepository getInstance() { return INSTANCE; } method save (line 14) | public void save(Student s) { students.put(s.getId(), s); } method findById (line 15) | public Optional findById(String id) { return Optional.ofNulla... FILE: solutions/java/src/cricinfo/CommentaryManager.java class CommentaryManager (line 12) | public class CommentaryManager { method CommentaryManager (line 18) | private CommentaryManager() { method getInstance (line 22) | public static CommentaryManager getInstance() { method initializeTemplates (line 33) | private void initializeTemplates() { method generateCommentary (line 92) | public String generateCommentary(Ball ball) { method getEventKey (line 107) | private String getEventKey(Ball ball) { FILE: solutions/java/src/cricinfo/CricInfoService.java class CricInfoService (line 17) | public class CricInfoService { method CricInfoService (line 22) | private CricInfoService() { method getInstance (line 27) | public static CricInfoService getInstance() { method createMatch (line 38) | public Match createMatch(Team team1, Team team2, MatchFormatStrategy f... method startMatch (line 46) | public void startMatch(String matchId) { method processBallUpdate (line 53) | public void processBallUpdate(String matchId, Ball ball) { method startNextInnings (line 57) | public void startNextInnings(String matchId) { method subscribeToMatch (line 61) | public void subscribeToMatch(String matchId, MatchObserver observer) { method endMatch (line 65) | public void endMatch(String matchId) { method addPlayer (line 72) | public Player addPlayer(String playerId, String playerName, PlayerRole... FILE: solutions/java/src/cricinfo/CricinfoDemo.java class CricinfoDemo (line 13) | public class CricinfoDemo { method main (line 14) | public static void main(String[] args) { FILE: solutions/java/src/cricinfo/entity/Ball.java class Ball (line 6) | public class Ball { method Ball (line 15) | private Ball(BallBuilder builder) { method isWicket (line 25) | public boolean isWicket() { return wicket != null; } method isBoundary (line 26) | public boolean isBoundary() { return runsScored == 4 || runsScored == ... method getCommentary (line 27) | public String getCommentary() { return commentary; } method getRunsScored (line 28) | public int getRunsScored() { return runsScored; } method getFacedBy (line 29) | public Player getFacedBy() { return facedBy; } method getBowledBy (line 30) | public Player getBowledBy() { return bowledBy; } method getWicket (line 31) | public Wicket getWicket() { return wicket; } method getExtraType (line 33) | public ExtraType getExtraType() { class BallBuilder (line 38) | public static class BallBuilder { method withBallNumber (line 47) | public BallBuilder withBallNumber(int ballNumber) { this.ballNumber ... method bowledBy (line 48) | public BallBuilder bowledBy(Player bowler) { this.bowledBy = bowler;... method facedBy (line 49) | public BallBuilder facedBy(Player batsman) { this.facedBy = batsman;... method withRuns (line 50) | public BallBuilder withRuns(int runs) { this.runsScored = runs; retu... method withWicket (line 51) | public BallBuilder withWicket(Wicket wicket) { this.wicket = wicket;... method withExtraType (line 52) | public BallBuilder withExtraType(ExtraType extra) { this.extraType =... method withCommentary (line 53) | public BallBuilder withCommentary(String commentary) { this.commenta... method build (line 55) | public Ball build() { FILE: solutions/java/src/cricinfo/entity/Innings.java class Innings (line 8) | public class Innings { method Innings (line 16) | public Innings(Team battingTeam, Team bowlingTeam) { method addBall (line 31) | public void addBall(Ball ball) { method printPlayerStats (line 50) | public void printPlayerStats() { method getScore (line 61) | public int getScore() { return score; } method getWickets (line 62) | public int getWickets() { return wickets; } method getBattingTeam (line 63) | public Team getBattingTeam() { return battingTeam; } method getOvers (line 65) | public double getOvers() { FILE: solutions/java/src/cricinfo/entity/Match.java class Match (line 12) | public class Match { method Match (line 24) | public Match(String id, Team team1, Team team2, MatchFormatStrategy fo... method processBall (line 36) | public void processBall(Ball ball) { method startNextInnings (line 40) | public void startNextInnings() { method setState (line 44) | public void setState(MatchState state) { this.currentState = state; } method setCurrentStatus (line 46) | public void setCurrentStatus(MatchStatus status) { this.currentStatus ... method setWinner (line 48) | public void setWinner(Team winner) { method setResultMessage (line 52) | public void setResultMessage(String resultMessage) { method createNewInnings (line 56) | public void createNewInnings() { method addObserver (line 67) | public void addObserver(MatchObserver observer) { observers.add(observ... method removeObserver (line 68) | public void removeObserver(MatchObserver observer) { observers.remove(... method notifyObservers (line 69) | public void notifyObservers(Ball ball) { method getCurrentInnings (line 75) | public Innings getCurrentInnings() { return innings.get(innings.size()... method getTeam1 (line 76) | public Team getTeam1() { return team1; } method getTeam2 (line 77) | public Team getTeam2() { return team2; } method getWinner (line 78) | public Team getWinner() { return winner; } method getResultMessage (line 79) | public String getResultMessage() { return resultMessage; } method getInnings (line 80) | public List getInnings() { return innings; } method getId (line 81) | public String getId() { return id; } method getCurrentStatus (line 82) | public MatchStatus getCurrentStatus() { return currentStatus; } method getFormatStrategy (line 84) | public MatchFormatStrategy getFormatStrategy() { FILE: solutions/java/src/cricinfo/entity/Player.java class Player (line 5) | public class Player { method Player (line 11) | public Player(String id, String name, PlayerRole role) { method getId (line 18) | public String getId() { method getName (line 22) | public String getName() { return name; } method getStats (line 24) | public PlayerStats getStats() { FILE: solutions/java/src/cricinfo/entity/PlayerStats.java class PlayerStats (line 3) | public class PlayerStats { method PlayerStats (line 8) | public PlayerStats() { method updateRuns (line 13) | public void updateRuns(int runScored) { method incrementBallsPlayed (line 17) | public void incrementBallsPlayed() { method incrementWickets (line 21) | public void incrementWickets() { method getRuns (line 25) | public int getRuns() { return runs; } method getWickets (line 26) | public int getWickets() { return wickets; } method getBallsPlayed (line 27) | public int getBallsPlayed() { return ballsPlayed; } method toString (line 29) | @Override FILE: solutions/java/src/cricinfo/entity/Team.java class Team (line 5) | public class Team { method Team (line 10) | public Team(String id, String name, List players) { method getName (line 15) | public String getName() { return name; } method getPlayers (line 17) | public List getPlayers() { return players; } FILE: solutions/java/src/cricinfo/entity/Wicket.java class Wicket (line 5) | public class Wicket { method Wicket (line 11) | private Wicket(Builder builder) { method getWicketType (line 18) | public WicketType getWicketType() { return wicketType; } method getPlayerOut (line 19) | public Player getPlayerOut() { return playerOut; } method getCaughtBy (line 20) | public Player getCaughtBy() { return caughtBy; } method getRunoutBy (line 21) | public Player getRunoutBy() { return runoutBy; } class Builder (line 23) | public static class Builder { method Builder (line 32) | public Builder(WicketType wicketType, Player playerOut) { method caughtBy (line 37) | public Builder caughtBy(Player player) { method runoutBy (line 42) | public Builder runoutBy(Player player) { method build (line 47) | public Wicket build() { FILE: solutions/java/src/cricinfo/enums/ExtraType.java type ExtraType (line 3) | public enum ExtraType { FILE: solutions/java/src/cricinfo/enums/MatchStatus.java type MatchStatus (line 3) | public enum MatchStatus { FILE: solutions/java/src/cricinfo/enums/PlayerRole.java type PlayerRole (line 3) | public enum PlayerRole { FILE: solutions/java/src/cricinfo/enums/WicketType.java type WicketType (line 3) | public enum WicketType { FILE: solutions/java/src/cricinfo/observer/CommentaryDisplay.java class CommentaryDisplay (line 7) | public class CommentaryDisplay implements MatchObserver { method update (line 8) | @Override FILE: solutions/java/src/cricinfo/observer/MatchObserver.java type MatchObserver (line 6) | public interface MatchObserver { method update (line 7) | void update(Match match, Ball lastBall); FILE: solutions/java/src/cricinfo/observer/ScorecardDisplay.java class ScorecardDisplay (line 8) | public class ScorecardDisplay implements MatchObserver { method update (line 9) | @Override FILE: solutions/java/src/cricinfo/observer/UserNotifier.java class UserNotifier (line 7) | public class UserNotifier implements MatchObserver { method update (line 8) | @Override FILE: solutions/java/src/cricinfo/repository/MatchRepository.java class MatchRepository (line 9) | public class MatchRepository { method save (line 12) | public void save(Match match) { method findById (line 16) | public Optional findById(String id) { FILE: solutions/java/src/cricinfo/repository/PlayerRepository.java class PlayerRepository (line 9) | public class PlayerRepository { method save (line 12) | public void save(Player player) { players.put(player.getId(), player); } method findById (line 14) | public Optional findById(String id) { FILE: solutions/java/src/cricinfo/state/FinishedState.java class FinishedState (line 6) | public class FinishedState implements MatchState { method processBall (line 7) | @Override FILE: solutions/java/src/cricinfo/state/InBreakState.java class InBreakState (line 7) | public class InBreakState implements MatchState { method processBall (line 8) | @Override method startNextInnings (line 13) | @Override FILE: solutions/java/src/cricinfo/state/LiveState.java class LiveState (line 9) | public class LiveState implements MatchState { method processBall (line 10) | @Override method checkForMatchEnd (line 20) | private void checkForMatchEnd(Match match) { method declareWinner (line 61) | private void declareWinner(Match match, Team winningTeam, String messa... method isInningsOver (line 72) | private boolean isInningsOver(Match match) { FILE: solutions/java/src/cricinfo/state/MatchState.java type MatchState (line 6) | public interface MatchState { method processBall (line 7) | void processBall(Match match, Ball ball); method startNextInnings (line 9) | default void startNextInnings(Match match) { FILE: solutions/java/src/cricinfo/state/ScheduledState.java class ScheduledState (line 6) | public class ScheduledState implements MatchState { method processBall (line 7) | @Override FILE: solutions/java/src/cricinfo/strategy/MatchFormatStrategy.java type MatchFormatStrategy (line 3) | public interface MatchFormatStrategy { method getTotalInnings (line 4) | int getTotalInnings(); method getTotalOvers (line 5) | int getTotalOvers(); method getFormatName (line 6) | String getFormatName(); FILE: solutions/java/src/cricinfo/strategy/ODIFormatStrategy.java class ODIFormatStrategy (line 3) | public class ODIFormatStrategy implements MatchFormatStrategy { method getTotalInnings (line 4) | @Override method getTotalOvers (line 7) | @Override method getFormatName (line 10) | @Override FILE: solutions/java/src/cricinfo/strategy/T20FormatStrategy.java class T20FormatStrategy (line 3) | public class T20FormatStrategy implements MatchFormatStrategy { method getTotalInnings (line 4) | @Override method getTotalOvers (line 7) | @Override method getFormatName (line 10) | @Override FILE: solutions/java/src/digitalwalletservice/Account.java class Account (line 7) | public class Account { method Account (line 15) | public Account(String id, User user, String accountNumber, Currency cu... method deposit (line 24) | public synchronized void deposit(BigDecimal amount) { method withdraw (line 28) | public synchronized void withdraw(BigDecimal amount) { method addTransaction (line 36) | public synchronized void addTransaction(Transaction transaction) { method getId (line 40) | public String getId() { method getUser (line 44) | public User getUser() { method getAccountNumber (line 48) | public String getAccountNumber() { method getCurrency (line 52) | public Currency getCurrency() { method getBalance (line 56) | public BigDecimal getBalance() { method getTransactions (line 60) | public List getTransactions() { FILE: solutions/java/src/digitalwalletservice/BankAccount.java class BankAccount (line 5) | public class BankAccount extends PaymentMethod { method BankAccount (line 9) | public BankAccount(String id, User user, String accountNumber, String ... method processPayment (line 15) | @Override FILE: solutions/java/src/digitalwalletservice/CreditCard.java class CreditCard (line 5) | public class CreditCard extends PaymentMethod { method CreditCard (line 10) | public CreditCard(String id, User user, String cardNumber, String expi... method processPayment (line 17) | @Override FILE: solutions/java/src/digitalwalletservice/Currency.java type Currency (line 3) | public enum Currency { FILE: solutions/java/src/digitalwalletservice/CurrencyConverter.java class CurrencyConverter (line 8) | public class CurrencyConverter { method convert (line 20) | public static BigDecimal convert(BigDecimal amount, Currency sourceCur... FILE: solutions/java/src/digitalwalletservice/DigitalWallet.java class DigitalWallet (line 9) | public class DigitalWallet { method DigitalWallet (line 15) | private DigitalWallet() { method getInstance (line 21) | public static synchronized DigitalWallet getInstance() { method createUser (line 28) | public void createUser(User user) { method getUser (line 32) | public User getUser(String userId) { method createAccount (line 36) | public void createAccount(Account account) { method getAccount (line 41) | public Account getAccount(String accountId) { method addPaymentMethod (line 45) | public void addPaymentMethod(PaymentMethod paymentMethod) { method getPaymentMethod (line 49) | public PaymentMethod getPaymentMethod(String paymentMethodId) { method transferFunds (line 53) | public synchronized void transferFunds(Account sourceAccount, Account ... method getTransactionHistory (line 70) | public List getTransactionHistory(Account account) { method generateTransactionId (line 74) | private String generateTransactionId() { FILE: solutions/java/src/digitalwalletservice/DigitalWalletDemo.java class DigitalWalletDemo (line 6) | public class DigitalWalletDemo { method run (line 7) | public static void run() { FILE: solutions/java/src/digitalwalletservice/InsufficientFundsException.java class InsufficientFundsException (line 3) | public class InsufficientFundsException extends RuntimeException { method InsufficientFundsException (line 4) | public InsufficientFundsException(String message) { FILE: solutions/java/src/digitalwalletservice/PaymentMethod.java class PaymentMethod (line 5) | public abstract class PaymentMethod { method PaymentMethod (line 9) | public PaymentMethod(String id, User user) { method processPayment (line 14) | public abstract boolean processPayment(BigDecimal amount, Currency cur... method getId (line 16) | public String getId() { method getUser (line 20) | public User getUser() { FILE: solutions/java/src/elevatorsystem/Elevator.java class Elevator (line 14) | public class Elevator implements Runnable { method Elevator (line 26) | public Elevator(int id) { method addObserver (line 35) | public void addObserver(ElevatorObserver observer) { method notifyObservers (line 40) | public void notifyObservers() { method setState (line 47) | public void setState(ElevatorState state) { method move (line 52) | public void move() { method addRequest (line 57) | public synchronized void addRequest(Request request) { method getId (line 63) | public int getId() { return id; } method getCurrentFloor (line 64) | public int getCurrentFloor() { return currentFloor.get(); } method setCurrentFloor (line 66) | public void setCurrentFloor(int floor) { method getDirection (line 71) | public Direction getDirection() { return state.getDirection(); } method getUpRequests (line 72) | public TreeSet getUpRequests() { return upRequests; } method getDownRequests (line 73) | public TreeSet getDownRequests() { return downRequests; } method isRunning (line 74) | public boolean isRunning() { return isRunning; } method stopElevator (line 75) | public void stopElevator() { this.isRunning = false; } method run (line 77) | @Override FILE: solutions/java/src/elevatorsystem/ElevatorSystem.java class ElevatorSystem (line 18) | public class ElevatorSystem { method ElevatorSystem (line 25) | private ElevatorSystem(int numElevators) { method getInstance (line 41) | public static synchronized ElevatorSystem getInstance(int numElevators) { method start (line 48) | public void start() { method requestElevator (line 57) | public void requestElevator(int floor, Direction direction) { method selectFloor (line 72) | public void selectFloor(int elevatorId, int destinationFloor) { method shutdown (line 84) | public void shutdown() { FILE: solutions/java/src/elevatorsystem/ElevatorSystemDemo.java class ElevatorSystemDemo (line 5) | public class ElevatorSystemDemo { method main (line 6) | public static void main(String[] args) throws InterruptedException { FILE: solutions/java/src/elevatorsystem/enums/Direction.java type Direction (line 3) | public enum Direction { FILE: solutions/java/src/elevatorsystem/enums/RequestSource.java type RequestSource (line 3) | public enum RequestSource { FILE: solutions/java/src/elevatorsystem/models/Request.java class Request (line 6) | public class Request { method Request (line 11) | public Request(int targetFloor, Direction direction, RequestSource sou... method getTargetFloor (line 17) | public int getTargetFloor() { method getDirection (line 21) | public Direction getDirection() { method getSource (line 25) | public RequestSource getSource() { method toString (line 29) | @Override FILE: solutions/java/src/elevatorsystem/observer/ElevatorDisplay.java class ElevatorDisplay (line 5) | public class ElevatorDisplay implements ElevatorObserver { method update (line 6) | @Override FILE: solutions/java/src/elevatorsystem/observer/ElevatorObserver.java type ElevatorObserver (line 5) | public interface ElevatorObserver { method update (line 6) | void update(Elevator elevator); FILE: solutions/java/src/elevatorsystem/state/ElevatorState.java type ElevatorState (line 7) | public interface ElevatorState { method move (line 8) | void move(Elevator elevator); method addRequest (line 9) | void addRequest(Elevator elevator, Request request); method getDirection (line 10) | Direction getDirection(); FILE: solutions/java/src/elevatorsystem/state/IdleState.java class IdleState (line 7) | public class IdleState implements ElevatorState { method move (line 8) | @Override method addRequest (line 18) | @Override method getDirection (line 28) | @Override FILE: solutions/java/src/elevatorsystem/state/MovingDownState.java class MovingDownState (line 8) | public class MovingDownState implements ElevatorState { method move (line 9) | @Override method addRequest (line 29) | @Override method getDirection (line 49) | @Override FILE: solutions/java/src/elevatorsystem/state/MovingUpState.java class MovingUpState (line 8) | public class MovingUpState implements ElevatorState { method move (line 9) | @Override method addRequest (line 29) | @Override method getDirection (line 49) | @Override FILE: solutions/java/src/elevatorsystem/strategy/ElevatorSelectionStrategy.java type ElevatorSelectionStrategy (line 9) | public interface ElevatorSelectionStrategy { method selectElevator (line 10) | Optional selectElevator(List elevators, Request re... FILE: solutions/java/src/elevatorsystem/strategy/NearestElevatorStrategy.java class NearestElevatorStrategy (line 10) | public class NearestElevatorStrategy implements ElevatorSelectionStrategy { method selectElevator (line 11) | @Override method isSuitable (line 28) | private boolean isSuitable(Elevator elevator, Request request) { FILE: solutions/java/src/filedirectory/AbstractNode.java class AbstractNode (line 6) | public abstract class AbstractNode { method AbstractNode (line 10) | public AbstractNode(String name) { method getName (line 15) | public String getName() { method getCreatedAt (line 19) | public Date getCreatedAt() { FILE: solutions/java/src/filedirectory/DirectoryNode.java class DirectoryNode (line 6) | public class DirectoryNode extends AbstractNode { method DirectoryNode (line 9) | public DirectoryNode(String name) { method addNode (line 14) | public void addNode(AbstractNode node) { method getChildren (line 18) | public List getChildren() { method getNode (line 22) | public AbstractNode getNode(String name) { FILE: solutions/java/src/filedirectory/FileNode.java class FileNode (line 4) | public class FileNode extends AbstractNode { method FileNode (line 8) | public FileNode(String name) { method appendContent (line 14) | public void appendContent(String newContent) { method readContent (line 19) | public String readContent() { method getSize (line 23) | public int getSize() { FILE: solutions/java/src/filedirectory/FileSystem.java class FileSystem (line 7) | public class FileSystem { method FileSystem (line 10) | public FileSystem() { method traverse (line 14) | private DirectoryNode traverse(String path, boolean createMissingDirs) { method mkdir (line 31) | public void mkdir(String path) { method addFile (line 35) | public void addFile(String filePath, String content) { method searchNodes (line 47) | public List searchNodes(String directoryPath, NodeSearch... FILE: solutions/java/src/filedirectory/FileSystemDemo.java class FileSystemDemo (line 9) | public class FileSystemDemo { method main (line 10) | public static void main(String[] args) { FILE: solutions/java/src/filedirectory/chainofresponsibility/FileSizeFilter.java class FileSizeFilter (line 9) | public class FileSizeFilter implements NodeFilter { method apply (line 10) | @Override FILE: solutions/java/src/filedirectory/chainofresponsibility/FilenameFilter.java class FilenameFilter (line 9) | public class FilenameFilter implements NodeFilter { method apply (line 10) | @Override FILE: solutions/java/src/filedirectory/chainofresponsibility/NodeFilter.java type NodeFilter (line 7) | public interface NodeFilter { method apply (line 8) | boolean apply(AbstractNode node, Map params); FILE: solutions/java/src/filedirectory/chainofresponsibility/NodeFilterChain.java class NodeFilterChain (line 8) | public class NodeFilterChain { method NodeFilterChain (line 11) | public NodeFilterChain() { method addFilter (line 15) | public void addFilter(NodeFilter filter) { method applyFilters (line 19) | public boolean applyFilters(AbstractNode node, Map par... FILE: solutions/java/src/filedirectory/strategy/FilenameAndSizeSearchStrategy.java class FilenameAndSizeSearchStrategy (line 10) | public class FilenameAndSizeSearchStrategy implements NodeSearchStrategy { method FilenameAndSizeSearchStrategy (line 13) | public FilenameAndSizeSearchStrategy() { method search (line 19) | @Override method searchRecursive (line 26) | private void searchRecursive(DirectoryNode dir, Map pa... FILE: solutions/java/src/filedirectory/strategy/NodeSearchStrategy.java type NodeSearchStrategy (line 9) | public // Search strategy interface method search (line 11) | List search(DirectoryNode directory, Map... FILE: solutions/java/src/fooddeliveryservice/FoodDeliveryService.java class FoodDeliveryService (line 16) | public class FoodDeliveryService { method FoodDeliveryService (line 24) | private FoodDeliveryService() {} method getInstance (line 26) | public static FoodDeliveryService getInstance() { method setAssignmentStrategy (line 35) | public void setAssignmentStrategy(DeliveryAssignmentStrategy assignmen... method registerCustomer (line 40) | public Customer registerCustomer(String name, String phone, Address ad... method registerRestaurant (line 46) | public Restaurant registerRestaurant(String name, Address address) { method registerDeliveryAgent (line 52) | public DeliveryAgent registerDeliveryAgent(String name, String phone, ... method placeOrder (line 58) | public Order placeOrder(String customerId, String restaurantId, List searchRestaurants(List getItems() { return items; } FILE: solutions/java/src/fooddeliveryservice/entity/MenuItem.java class MenuItem (line 3) | public class MenuItem { method MenuItem (line 9) | public MenuItem(String id, String name, double price) { method getId (line 16) | public String getId() { method setAvailable (line 20) | public void setAvailable(boolean available) { method getName (line 24) | public String getName() { method getPrice (line 28) | public double getPrice() { method getMenuItem (line 32) | public String getMenuItem() { FILE: solutions/java/src/fooddeliveryservice/entity/Restaurant.java class Restaurant (line 8) | public class Restaurant implements OrderObserver { method Restaurant (line 14) | public Restaurant(String name, Address address) { method addToMenu (line 20) | public void addToMenu(MenuItem item) { this.menu.addItem(item); } method getId (line 22) | public String getId() { return id; } method getName (line 23) | public String getName() { return name; } method getAddress (line 24) | public Address getAddress() { return address; } method getMenu (line 25) | public Menu getMenu() { return menu; } method onUpdate (line 27) | @Override public void onUpdate(Order order) { FILE: solutions/java/src/fooddeliveryservice/entity/User.java class User (line 7) | public abstract class User implements OrderObserver { method User (line 12) | public User(String name, String phone) { method getId (line 18) | public String getId() { return id; } method getName (line 19) | public String getName() { return name; } FILE: solutions/java/src/fooddeliveryservice/observer/OrderObserver.java type OrderObserver (line 5) | public interface OrderObserver { method onUpdate (line 6) | void onUpdate(Order order); FILE: solutions/java/src/fooddeliveryservice/order/Order.java class Order (line 12) | public class Order { method Order (line 21) | public Order(Customer customer, Restaurant restaurant, List... method addObserver (line 31) | public void addObserver(OrderObserver observer) { observers.add(observ... method notifyObservers (line 32) | private void notifyObservers() { observers.forEach(o -> o.onUpdate(thi... method setStatus (line 34) | public void setStatus(OrderStatus newStatus) { method cancel (line 41) | public boolean cancel() { method assignDeliveryAgent (line 50) | public void assignDeliveryAgent(DeliveryAgent agent) { method getId (line 57) | public String getId() { return id; } method getStatus (line 58) | public OrderStatus getStatus() { return status; } method getCustomer (line 59) | public Customer getCustomer() { return customer; } method getRestaurant (line 60) | public Restaurant getRestaurant() { return restaurant; } method getDeliveryAgent (line 61) | public DeliveryAgent getDeliveryAgent() { return deliveryAgent; } FILE: solutions/java/src/fooddeliveryservice/order/OrderItem.java class OrderItem (line 5) | public class OrderItem { method OrderItem (line 9) | public OrderItem(MenuItem item, int quantity) { method getItem (line 14) | public MenuItem getItem() { return item; } method getQuantity (line 15) | public int getQuantity() { return quantity; } FILE: solutions/java/src/fooddeliveryservice/order/OrderStatus.java type OrderStatus (line 3) | public enum OrderStatus { FILE: solutions/java/src/fooddeliveryservice/search/RestaurantSearchStrategy.java type RestaurantSearchStrategy (line 7) | public interface RestaurantSearchStrategy { method filter (line 8) | List filter(List allRestaurants); FILE: solutions/java/src/fooddeliveryservice/search/SearchByCityStrategy.java class SearchByCityStrategy (line 8) | public class SearchByCityStrategy implements RestaurantSearchStrategy { method SearchByCityStrategy (line 11) | public SearchByCityStrategy(String city) { method filter (line 15) | @Override FILE: solutions/java/src/fooddeliveryservice/search/SearchByMenuKeywordStrategy.java class SearchByMenuKeywordStrategy (line 8) | public class SearchByMenuKeywordStrategy implements RestaurantSearchStra... method SearchByMenuKeywordStrategy (line 11) | public SearchByMenuKeywordStrategy(String keyword) { method filter (line 15) | @Override FILE: solutions/java/src/fooddeliveryservice/search/SearchByProximityStrategy.java class SearchByProximityStrategy (line 10) | public class SearchByProximityStrategy implements RestaurantSearchStrate... method SearchByProximityStrategy (line 14) | public SearchByProximityStrategy(Address userLocation, double maxDista... method filter (line 19) | @Override FILE: solutions/java/src/fooddeliveryservice/strategy/DeliveryAssignmentStrategy.java type DeliveryAssignmentStrategy (line 9) | public interface DeliveryAssignmentStrategy { method findAgent (line 10) | Optional findAgent(Order order, List age... FILE: solutions/java/src/fooddeliveryservice/strategy/NearestAvailableAgentStrategy.java class NearestAvailableAgentStrategy (line 11) | public class NearestAvailableAgentStrategy implements DeliveryAssignment... method findAgent (line 12) | @Override method calculateTotalDistance (line 23) | private double calculateTotalDistance(DeliveryAgent agent, Address res... FILE: solutions/java/src/hotelmanagementsystem/BookingService.java class BookingService (line 13) | public class BookingService { method addObserver (line 17) | public void addObserver(BookingObserver observer) { method removeObserver (line 21) | public void removeObserver(BookingObserver observer) { method createBooking (line 25) | public Booking createBooking(Guest guest, Room room, LocalDate startDa... method notifyObservers (line 37) | private void notifyObservers(Booking booking) { FILE: solutions/java/src/hotelmanagementsystem/HotelManagementDemo.java class HotelManagementDemo (line 13) | public class HotelManagementDemo { method main (line 14) | public static void main(String[] args) { FILE: solutions/java/src/hotelmanagementsystem/HotelManagerFacade.java class HotelManagerFacade (line 21) | public class HotelManagerFacade { method HotelManagerFacade (line 26) | public HotelManagerFacade(RoomService roomService, BookingService book... method bookRoom (line 32) | public Booking bookRoom(Guest guest, RoomType type, RoomStyle style, L... method checkIn (line 68) | public void checkIn(String bookingId) { method checkOut (line 74) | public void checkOut(String roomNumber) { FILE: solutions/java/src/hotelmanagementsystem/PaymentService.java class PaymentService (line 3) | public class PaymentService { method processPayment (line 4) | public boolean processPayment(double amount) { FILE: solutions/java/src/hotelmanagementsystem/RoomService.java class RoomService (line 10) | public class RoomService { method addRoom (line 13) | public void addRoom(Room room) { method findRooms (line 17) | public List findRooms(Specification spec) { method findRoomByNumber (line 23) | public Room findRoomByNumber(String roomNumber) { FILE: solutions/java/src/hotelmanagementsystem/decorator/AmenityDecorator.java class AmenityDecorator (line 3) | public abstract class AmenityDecorator implements Bookable { method AmenityDecorator (line 6) | public AmenityDecorator(Bookable bookable) { method getCost (line 10) | @Override method getDescription (line 15) | @Override FILE: solutions/java/src/hotelmanagementsystem/decorator/Bookable.java type Bookable (line 3) | public interface Bookable { method getCost (line 4) | double getCost(); method getDescription (line 5) | String getDescription(); FILE: solutions/java/src/hotelmanagementsystem/decorator/BreakfastDecorator.java class BreakfastDecorator (line 3) | public class BreakfastDecorator extends AmenityDecorator { method BreakfastDecorator (line 6) | public BreakfastDecorator(Bookable bookable) { method getCost (line 10) | @Override method getDescription (line 15) | @Override FILE: solutions/java/src/hotelmanagementsystem/decorator/RoomBooking.java class RoomBooking (line 5) | public class RoomBooking implements Bookable { method RoomBooking (line 8) | public RoomBooking(Room room) { method getCost (line 12) | @Override method getDescription (line 17) | @Override FILE: solutions/java/src/hotelmanagementsystem/decorator/SpaDecorator.java class SpaDecorator (line 3) | public class SpaDecorator extends AmenityDecorator { method SpaDecorator (line 6) | public SpaDecorator(Bookable bookable) { method getCost (line 10) | @Override method getDescription (line 17) | @Override FILE: solutions/java/src/hotelmanagementsystem/enums/BookingStatus.java type BookingStatus (line 3) | public enum BookingStatus { FILE: solutions/java/src/hotelmanagementsystem/enums/RoomStyle.java type RoomStyle (line 3) | public enum RoomStyle { FILE: solutions/java/src/hotelmanagementsystem/enums/RoomType.java type RoomType (line 3) | public enum RoomType { FILE: solutions/java/src/hotelmanagementsystem/factory/RoomFactory.java class RoomFactory (line 7) | public class RoomFactory { method createRoom (line 8) | public static Room createRoom(String roomNumber, String type, String s... FILE: solutions/java/src/hotelmanagementsystem/model/Booking.java class Booking (line 7) | public class Booking { method Booking (line 15) | public Booking(String bookingId, Guest guest, Room room, LocalDate sta... method checkIn (line 24) | public void checkIn() { this.status = BookingStatus.CHECKED_IN; } method checkOut (line 25) | public void checkOut() { this.status = BookingStatus.CHECKED_OUT; } method cancel (line 26) | public void cancel() { this.status = BookingStatus.CANCELLED; } method getBookingId (line 28) | public String getBookingId() { return bookingId; } method getGuest (line 29) | public Guest getGuest() { return guest; } method getRoom (line 30) | public Room getRoom() { return room; } method getStartDate (line 31) | public LocalDate getStartDate() { return startDate; } method getEndDate (line 32) | public LocalDate getEndDate() { return endDate; } method getStatus (line 33) | public BookingStatus getStatus() { return status; } FILE: solutions/java/src/hotelmanagementsystem/model/Guest.java class Guest (line 3) | public class Guest { method Guest (line 8) | public Guest(String id, String name, String email) { method getId (line 14) | public String getId() { return id; } method getName (line 15) | public String getName() { return name; } method getEmail (line 16) | public String getEmail() { return email; } FILE: solutions/java/src/hotelmanagementsystem/model/Room.java class Room (line 8) | public class Room { method Room (line 15) | public Room(String roomNumber, RoomType type, RoomStyle style, double ... method setState (line 23) | public void setState(RoomState state) { method book (line 27) | public void book() { method checkIn (line 31) | public void checkIn() { method checkOut (line 35) | public void checkOut() { method markForMaintenance (line 39) | public void markForMaintenance() { method getRoomNumber (line 43) | public String getRoomNumber() { return roomNumber; } method getType (line 44) | public RoomType getType() { return type; } method getStyle (line 45) | public RoomStyle getStyle() { return style; } method getPrice (line 46) | public double getPrice() { return price; } method getState (line 47) | public RoomState getState() { return state; } method toString (line 49) | @Override FILE: solutions/java/src/hotelmanagementsystem/observer/BookingObserver.java type BookingObserver (line 5) | public interface BookingObserver { method update (line 6) | void update(Booking booking); FILE: solutions/java/src/hotelmanagementsystem/observer/EmailNotifier.java class EmailNotifier (line 5) | public class EmailNotifier implements BookingObserver { method update (line 6) | @Override FILE: solutions/java/src/hotelmanagementsystem/observer/SmsNotifier.java class SmsNotifier (line 5) | public class SmsNotifier implements BookingObserver { method update (line 6) | @Override FILE: solutions/java/src/hotelmanagementsystem/payment/CashPayment.java class CashPayment (line 3) | public class CashPayment implements Payment { method processPayment (line 4) | @Override FILE: solutions/java/src/hotelmanagementsystem/payment/CreditCardPayment.java class CreditCardPayment (line 3) | public class CreditCardPayment implements Payment { method processPayment (line 4) | @Override FILE: solutions/java/src/hotelmanagementsystem/payment/Payment.java type Payment (line 3) | public interface Payment { method processPayment (line 4) | boolean processPayment(double amount); FILE: solutions/java/src/hotelmanagementsystem/specification/AbstractSpecification.java class AbstractSpecification (line 3) | public abstract class AbstractSpecification implements Specification<... method and (line 4) | public Specification and(Specification other) { FILE: solutions/java/src/hotelmanagementsystem/specification/AndSpecification.java class AndSpecification (line 3) | public class AndSpecification extends AbstractSpecification { method AndSpecification (line 7) | public AndSpecification(Specification spec1, Specification spec2) { method isSatisfiedBy (line 12) | @Override FILE: solutions/java/src/hotelmanagementsystem/specification/RoomAvailableSpecification.java class RoomAvailableSpecification (line 6) | public class RoomAvailableSpecification extends AbstractSpecification { method RoomStyleSpecification (line 9) | public RoomStyleSpecification(RoomStyle style) { method isSatisfiedBy (line 13) | @Override FILE: solutions/java/src/hotelmanagementsystem/specification/RoomTypeSpecification.java class RoomTypeSpecification (line 6) | public class RoomTypeSpecification extends AbstractSpecification { method RoomTypeSpecification (line 9) | public RoomTypeSpecification(RoomType type) { method isSatisfiedBy (line 13) | @Override FILE: solutions/java/src/hotelmanagementsystem/specification/Specification.java type Specification (line 3) | public interface Specification { method isSatisfiedBy (line 4) | boolean isSatisfiedBy(T item); method and (line 5) | Specification and(Specification other); FILE: solutions/java/src/hotelmanagementsystem/state/AvailableState.java class AvailableState (line 5) | public class AvailableState implements RoomState { method book (line 6) | @Override method checkIn (line 12) | @Override method checkOut (line 18) | @Override method markForMaintenance (line 23) | @Override FILE: solutions/java/src/hotelmanagementsystem/state/MaintenanceState.java class MaintenanceState (line 5) | public class MaintenanceState implements RoomState { method book (line 6) | @Override method checkIn (line 11) | @Override method checkOut (line 16) | @Override method markForMaintenance (line 21) | @Override FILE: solutions/java/src/hotelmanagementsystem/state/OccupiedState.java class OccupiedState (line 5) | public class OccupiedState implements RoomState { method book (line 6) | @Override method checkIn (line 11) | @Override method checkOut (line 16) | @Override method markForMaintenance (line 22) | @Override FILE: solutions/java/src/hotelmanagementsystem/state/RoomState.java type RoomState (line 5) | public interface RoomState { method book (line 6) | void book(Room room); method checkIn (line 7) | void checkIn(Room room); method checkOut (line 8) | void checkOut(Room room); method markForMaintenance (line 9) | void markForMaintenance(Room room); FILE: solutions/java/src/librarymanagementsystem/LibraryManagementDemo.java class LibraryManagementDemo (line 11) | public class LibraryManagementDemo { method main (line 12) | public static void main(String[] args) { FILE: solutions/java/src/librarymanagementsystem/LibraryManagementSystem.java class LibraryManagementSystem (line 15) | public class LibraryManagementSystem { method LibraryManagementSystem (line 21) | private LibraryManagementSystem() {} method getInstance (line 22) | public static LibraryManagementSystem getInstance() { return INSTANCE; } method addItem (line 25) | public List addItem(ItemType type, String id, String title, ... method addMember (line 40) | public Member addMember(String id, String name) { method checkout (line 47) | public void checkout(String memberId, String copyId) { method returnItem (line 57) | public void returnItem(String copyId) { method placeHold (line 66) | public void placeHold(String memberId, String itemId) { method search (line 79) | public List search(String query, SearchStrategy strategy) { method printCatalog (line 83) | public void printCatalog() { FILE: solutions/java/src/librarymanagementsystem/TransactionService.java class TransactionService (line 10) | public class TransactionService { method TransactionService (line 14) | private TransactionService() {} method getInstance (line 15) | public static TransactionService getInstance() { return INSTANCE; } method createLoan (line 17) | public void createLoan(BookCopy copy, Member member) { method endLoan (line 26) | public void endLoan(BookCopy copy) { FILE: solutions/java/src/librarymanagementsystem/enums/ItemType.java type ItemType (line 3) | public enum ItemType { FILE: solutions/java/src/librarymanagementsystem/factory/ItemFactory.java class ItemFactory (line 8) | public class ItemFactory { method createItem (line 9) | public static LibraryItem createItem(ItemType type, String id, String ... FILE: solutions/java/src/librarymanagementsystem/models/Book.java class Book (line 3) | public class Book extends LibraryItem { method Book (line 6) | public Book(String id, String title, String author) { method getAuthorOrPublisher (line 11) | @Override FILE: solutions/java/src/librarymanagementsystem/models/BookCopy.java class BookCopy (line 7) | public class BookCopy { method BookCopy (line 12) | public BookCopy(String id, LibraryItem item) { method checkout (line 19) | public void checkout(Member member) { currentState.checkout(this, memb... method returnItem (line 20) | public void returnItem() { currentState.returnItem(this); } method placeHold (line 21) | public void placeHold(Member member) { currentState.placeHold(this, me... method setState (line 23) | public void setState(ItemState state) { this.currentState = state; } method getId (line 24) | public String getId() { return id; } method getItem (line 25) | public LibraryItem getItem() { return item; } method isAvailable (line 26) | public boolean isAvailable() { return currentState instanceof Availabl... FILE: solutions/java/src/librarymanagementsystem/models/LibraryItem.java class LibraryItem (line 6) | public abstract class LibraryItem { method LibraryItem (line 13) | public LibraryItem(String id, String title) { method addCopy (line 18) | public void addCopy(BookCopy copy) { this.copies.add(copy); } method addObserver (line 19) | public void addObserver(Member member) { observers.add(member); } method removeObserver (line 20) | public void removeObserver(Member member) { observers.remove(member); } method notifyObservers (line 22) | public void notifyObservers() { method getAvailableCopy (line 28) | public BookCopy getAvailableCopy() { method getId (line 36) | public String getId() { return id; } method getTitle (line 37) | public String getTitle() { return title; } method getCopies (line 39) | public List getCopies() { method getAuthorOrPublisher (line 43) | public abstract String getAuthorOrPublisher(); method getAvailableCopyCount (line 44) | public long getAvailableCopyCount() { method hasObservers (line 48) | public boolean hasObservers() { return !observers.isEmpty(); } method isObserver (line 49) | public boolean isObserver(Member member) { return observers.contains(m... FILE: solutions/java/src/librarymanagementsystem/models/Loan.java class Loan (line 5) | public class Loan { method Loan (line 10) | public Loan(BookCopy copy, Member member) { method getCopy (line 16) | public BookCopy getCopy() { return copy; } method getMember (line 17) | public Member getMember() { return member; } FILE: solutions/java/src/librarymanagementsystem/models/Magazine.java class Magazine (line 3) | public class Magazine extends LibraryItem { method Magazine (line 6) | public Magazine(String id, String title, String publisher) { method getAuthorOrPublisher (line 11) | @Override FILE: solutions/java/src/librarymanagementsystem/models/Member.java class Member (line 6) | public class Member { method Member (line 11) | public Member(String id, String name) { method update (line 17) | public void update(LibraryItem item) { method addLoan (line 21) | public void addLoan(Loan loan) { loans.add(loan); } method removeLoan (line 22) | public void removeLoan(Loan loan) { loans.remove(loan); } method getId (line 23) | public String getId() { return id; } method getName (line 24) | public String getName() { return name; } method getLoans (line 25) | public List getLoans() { return loans; } FILE: solutions/java/src/librarymanagementsystem/state/AvailableState.java class AvailableState (line 7) | public class AvailableState implements ItemState { method checkout (line 8) | @Override method returnItem (line 15) | @Override method placeHold (line 20) | @Override FILE: solutions/java/src/librarymanagementsystem/state/CheckedOutState.java class CheckedOutState (line 7) | public class CheckedOutState implements ItemState { method checkout (line 8) | @Override public void checkout(BookCopy c, Member m) { System.out.prin... method returnItem (line 10) | @Override method placeHold (line 23) | @Override FILE: solutions/java/src/librarymanagementsystem/state/ItemState.java type ItemState (line 6) | public interface ItemState { method checkout (line 7) | void checkout(BookCopy copy, Member member); method returnItem (line 8) | void returnItem(BookCopy copy); method placeHold (line 9) | void placeHold(BookCopy copy, Member member); FILE: solutions/java/src/librarymanagementsystem/state/OnHoldState.java class OnHoldState (line 7) | public class OnHoldState implements ItemState { method checkout (line 8) | @Override method returnItem (line 21) | @Override method placeHold (line 26) | @Override FILE: solutions/java/src/librarymanagementsystem/strategy/SearchByAuthorStrategy.java class SearchByAuthorStrategy (line 8) | public class SearchByAuthorStrategy implements SearchStrategy { method search (line 9) | @Override FILE: solutions/java/src/librarymanagementsystem/strategy/SearchByTitleStrategy.java class SearchByTitleStrategy (line 8) | public class SearchByTitleStrategy implements SearchStrategy { method search (line 9) | @Override FILE: solutions/java/src/librarymanagementsystem/strategy/SearchStrategy.java type SearchStrategy (line 7) | public interface SearchStrategy { method search (line 8) | List search(String query, List items); FILE: solutions/java/src/linkedin/LinkedInDemo.java class LinkedInDemo (line 11) | public class LinkedInDemo { method main (line 12) | public static void main(String[] args) { FILE: solutions/java/src/linkedin/LinkedInSystem.java class LinkedInSystem (line 15) | public class LinkedInSystem { method LinkedInSystem (line 26) | private LinkedInSystem() { method getInstance (line 33) | public static LinkedInSystem getInstance() { method registerMember (line 44) | public void registerMember(Member member) { method getMember (line 49) | public Member getMember(String name) { method sendConnectionRequest (line 53) | public String sendConnectionRequest(Member from, Member to) { method acceptConnectionRequest (line 57) | public void acceptConnectionRequest(String requestId) { method createPost (line 61) | public void createPost(String memberId, String content) { method getLatestPostByMember (line 68) | public Post getLatestPostByMember(String memberId) { method viewNewsFeed (line 74) | public void viewNewsFeed(String memberId) { method searchMemberByName (line 81) | public List searchMemberByName(String name) { FILE: solutions/java/src/linkedin/entities/Comment.java class Comment (line 5) | public class Comment { method Comment (line 10) | public Comment(Member author, String text) { method getAuthor (line 15) | public Member getAuthor() { return author; } method getText (line 16) | public String getText() { return text; } FILE: solutions/java/src/linkedin/entities/Connection.java class Connection (line 7) | public class Connection { method Connection (line 14) | public Connection(Member fromMember, Member toMember) { method getFromMember (line 21) | public Member getFromMember() { return fromMember; } method getToMember (line 22) | public Member getToMember() { return toMember; } method getStatus (line 23) | public ConnectionStatus getStatus() { return status; } method setStatus (line 25) | public void setStatus(ConnectionStatus status) { FILE: solutions/java/src/linkedin/entities/Education.java class Education (line 3) | public class Education { method Education (line 9) | public Education(String school, String degree, int startYear, int endY... method toString (line 16) | @Override FILE: solutions/java/src/linkedin/entities/Experience.java class Experience (line 5) | public class Experience { method Experience (line 11) | public Experience(String title, String company, LocalDate startDate, L... method toString (line 18) | @Override FILE: solutions/java/src/linkedin/entities/Like.java class Like (line 5) | public class Like { method Like (line 9) | public Like(Member member) { method getMember (line 13) | public Member getMember() { return member; } FILE: solutions/java/src/linkedin/entities/Member.java class Member (line 7) | public class Member implements NotificationObserver { method Member (line 15) | private Member(String id, String name, String email, Profile profile) { method getId (line 22) | public String getId() { return id; } method getName (line 23) | public String getName() { return name; } method getEmail (line 24) | public String getEmail() { return email; } method getConnections (line 25) | public Set getConnections() { return connections; } method getProfile (line 26) | public Profile getProfile() { return profile; } method addConnection (line 28) | public void addConnection(Member member) { method displayProfile (line 32) | public void displayProfile() { method viewNotifications (line 38) | public void viewNotifications() { method update (line 52) | @Override class Builder (line 59) | public static class Builder { method Builder (line 65) | public Builder(String name, String email) { method withSummary (line 71) | public Builder withSummary(String summary) { method addExperience (line 76) | public Builder addExperience(Experience experience) { method addEducation (line 81) | public Builder addEducation(Education education) { method build (line 86) | public Member build() { FILE: solutions/java/src/linkedin/entities/NewsFeed.java class NewsFeed (line 7) | public class NewsFeed { method NewsFeed (line 10) | public NewsFeed(List posts) { method display (line 14) | public void display(FeedSortingStrategy strategy) { FILE: solutions/java/src/linkedin/entities/Notification.java class Notification (line 8) | public class Notification { method Notification (line 16) | public Notification(String memberId, NotificationType type, String con... method getContent (line 24) | public String getContent() { return content; } method markAsRead (line 25) | public void markAsRead() { this.isRead = true; } method isRead (line 26) | public boolean isRead() { return isRead; } FILE: solutions/java/src/linkedin/entities/Post.java class Post (line 11) | public class Post extends Subject { method Post (line 19) | public Post(Member author, String content) { method addLike (line 28) | public void addLike(Member member) { method addComment (line 35) | public void addComment(Member member, String text) { method getId (line 42) | public String getId() { return id; } method getAuthor (line 43) | public Member getAuthor() { return author; } method getContent (line 44) | public String getContent() { return content; } method getCreatedAt (line 45) | public LocalDateTime getCreatedAt() { return createdAt; } method getLikes (line 46) | public List getLikes() { return likes; } method getComments (line 47) | public List getComments() { return comments; } FILE: solutions/java/src/linkedin/entities/Profile.java class Profile (line 6) | public class Profile { method setSummary (line 11) | public void setSummary(String summary) { this.summary = summary; } method addExperience (line 12) | public void addExperience(Experience experience) { experiences.add(exp... method addEducation (line 13) | public void addEducation(Education education) { educations.add(educati... method display (line 15) | public void display() { FILE: solutions/java/src/linkedin/enums/ConnectionStatus.java type ConnectionStatus (line 3) | public enum ConnectionStatus { FILE: solutions/java/src/linkedin/enums/NotificationType.java type NotificationType (line 3) | public enum NotificationType { FILE: solutions/java/src/linkedin/observer/NotificationObserver.java type NotificationObserver (line 5) | public interface NotificationObserver { method update (line 6) | void update(Notification notification); FILE: solutions/java/src/linkedin/observer/Subject.java class Subject (line 8) | public abstract class Subject { method addObserver (line 11) | public void addObserver(NotificationObserver observer) { method removeObserver (line 15) | public void removeObserver(NotificationObserver observer) { method notifyObservers (line 19) | public void notifyObservers(Notification notification) { FILE: solutions/java/src/linkedin/services/ConnectionService.java class ConnectionService (line 13) | public class ConnectionService { method ConnectionService (line 18) | public ConnectionService(NotificationService notificationService) { method sendRequest (line 22) | public String sendRequest(Member from, Member to) { method acceptRequest (line 39) | public void acceptRequest(String requestId) { FILE: solutions/java/src/linkedin/services/NewsFeedService.java class NewsFeedService (line 13) | public class NewsFeedService { method NewsFeedService (line 16) | public NewsFeedService() { method addPost (line 20) | public void addPost(Member member, Post post) { method getMemberPosts (line 28) | public List getMemberPosts(Member member) { method displayFeedForMember (line 32) | public void displayFeedForMember(Member member, FeedSortingStrategy fe... FILE: solutions/java/src/linkedin/services/NotificationService.java class NotificationService (line 6) | public class NotificationService { method sendNotification (line 7) | public void sendNotification(Member member, Notification notification) { FILE: solutions/java/src/linkedin/services/SearchService.java class SearchService (line 9) | public class SearchService { method SearchService (line 12) | public SearchService(Collection members) { method searchByName (line 16) | public List searchByName(String name) { FILE: solutions/java/src/linkedin/strategy/ChronologicalSortStrategy.java class ChronologicalSortStrategy (line 9) | public class ChronologicalSortStrategy implements FeedSortingStrategy { method sort (line 10) | @Override FILE: solutions/java/src/linkedin/strategy/FeedSortingStrategy.java type FeedSortingStrategy (line 7) | public interface FeedSortingStrategy { method sort (line 8) | List sort(List posts); FILE: solutions/java/src/loggingframework/AsyncLogProcessor.java class AsyncLogProcessor (line 9) | class AsyncLogProcessor { method AsyncLogProcessor (line 12) | public AsyncLogProcessor() { method process (line 20) | public void process(LogMessage logMessage, List appenders) { method stop (line 34) | public void stop() { FILE: solutions/java/src/loggingframework/LogManager.java class LogManager (line 8) | public class LogManager { method LogManager (line 14) | private LogManager() { method getInstance (line 20) | public static LogManager getInstance() { method getLogger (line 24) | public Logger getLogger(String name) { method createLogger (line 28) | private Logger createLogger(String name) { method getRootLogger (line 38) | public Logger getRootLogger() { method getProcessor (line 42) | AsyncLogProcessor getProcessor() { method shutdown (line 46) | public void shutdown() { FILE: solutions/java/src/loggingframework/Logger.java class Logger (line 9) | public class Logger { method Logger (line 16) | Logger(String name, Logger parent) { method addAppender (line 22) | public void addAppender(LogAppender appender) { method getAppenders (line 26) | public List getAppenders() { method setLevel (line 30) | public void setLevel(LogLevel minLevel) { method setAdditivity (line 34) | public void setAdditivity(boolean additivity) { method getEffectiveLevel (line 38) | public LogLevel getEffectiveLevel() { method log (line 48) | public void log(LogLevel messageLevel, String message) { method callAppenders (line 55) | private void callAppenders(LogMessage logMessage) { method debug (line 64) | public void debug(String message) { method info (line 67) | public void info(String message) { method warn (line 70) | public void warn(String message) { method error (line 73) | public void error(String message) { method fatal (line 76) | public void fatal(String message) { FILE: solutions/java/src/loggingframework/LoggingFrameworkDemo.java class LoggingFrameworkDemo (line 6) | public class LoggingFrameworkDemo { method main (line 7) | public static void main(String[] args) { FILE: solutions/java/src/loggingframework/entities/LogMessage.java class LogMessage (line 7) | public final class LogMessage { method LogMessage (line 14) | public LogMessage(LogLevel level, String loggerName, String message) { method getTimestamp (line 23) | public LocalDateTime getTimestamp() { return timestamp; } method getLevel (line 24) | public LogLevel getLevel() { return level; } method getLoggerName (line 25) | public String getLoggerName() { return loggerName; } method getThreadName (line 26) | public String getThreadName() { return threadName; } method getMessage (line 27) | public String getMessage() { return message; } FILE: solutions/java/src/loggingframework/enums/LogLevel.java type LogLevel (line 3) | public enum LogLevel { method LogLevel (line 8) | LogLevel(int level) { method isGreaterOrEqual (line 12) | public boolean isGreaterOrEqual(LogLevel other) { FILE: solutions/java/src/loggingframework/strategies/appender/ConsoleAppender.java class ConsoleAppender (line 7) | public class ConsoleAppender implements LogAppender { method ConsoleAppender (line 10) | public ConsoleAppender() { method append (line 14) | @Override method close (line 19) | @Override method setFormatter (line 22) | @Override method getFormatter (line 27) | @Override FILE: solutions/java/src/loggingframework/strategies/appender/FileAppender.java class FileAppender (line 10) | public class FileAppender implements LogAppender { method FileAppender (line 14) | public FileAppender(String filePath) { method append (line 23) | @Override method close (line 33) | @Override method setFormatter (line 42) | @Override method getFormatter (line 47) | @Override FILE: solutions/java/src/loggingframework/strategies/appender/LogAppender.java type LogAppender (line 6) | public interface LogAppender { method append (line 7) | void append(LogMessage logMessage); method close (line 8) | void close(); method getFormatter (line 9) | LogFormatter getFormatter(); method setFormatter (line 10) | void setFormatter(LogFormatter formatter); FILE: solutions/java/src/loggingframework/strategies/formatter/LogFormatter.java type LogFormatter (line 5) | public interface LogFormatter { method format (line 6) | String format(LogMessage logMessage); FILE: solutions/java/src/loggingframework/strategies/formatter/SimpleTextFormatter.java class SimpleTextFormatter (line 7) | public class SimpleTextFormatter implements LogFormatter { method format (line 11) | @Override FILE: solutions/java/src/lrucache/DoublyLinkedList.java class DoublyLinkedList (line 3) | class DoublyLinkedList { method DoublyLinkedList (line 7) | public DoublyLinkedList() { method addFirst (line 14) | public void addFirst(Node node) { method remove (line 21) | public void remove(Node node) { method moveToFront (line 26) | public void moveToFront(Node node) { method removeLast (line 31) | public Node removeLast() { FILE: solutions/java/src/lrucache/LRUCache.java class LRUCache (line 6) | public class LRUCache { method LRUCache (line 11) | public LRUCache(int capacity) { method get (line 17) | public synchronized V get(K key) { method put (line 24) | public synchronized void put(K key, V value) { method remove (line 40) | public synchronized void remove(K key) { FILE: solutions/java/src/lrucache/LRUCacheDemo.java class LRUCacheDemo (line 3) | public class LRUCacheDemo { method run (line 4) | public static void run() { FILE: solutions/java/src/lrucache/Node.java class Node (line 3) | class Node { method Node (line 8) | public Node(K key, V value) { FILE: solutions/java/src/movieticketbookingsystem/BookingManager.java class BookingManager (line 10) | public class BookingManager { method BookingManager (line 13) | public BookingManager(SeatLockManager seatLockManager) { method createBooking (line 17) | public Optional createBooking(User user, Show show, List bookTickets(String userId, String showId, Lis... method findShows (line 94) | public List findShows(String movieTitle, String cityName) { method findCinemaForShow (line 106) | private Cinema findCinemaForShow(Show show) { method shutdown (line 115) | public void shutdown() { FILE: solutions/java/src/movieticketbookingsystem/SeatLockManager.java class SeatLockManager (line 14) | public class SeatLockManager { method lockSeats (line 19) | public void lockSeats(Show show, List seats, String userId) { method unlockSeats (line 45) | public void unlockSeats(Show show, List seats, String userId) { method shutdown (line 69) | public void shutdown() { FILE: solutions/java/src/movieticketbookingsystem/entities/Booking.java class Booking (line 7) | public class Booking { method Booking (line 16) | private Booking(String id, User user, Show show, List seats, dou... method confirmBooking (line 26) | public void confirmBooking() { method getId (line 32) | public String getId() { return id; } method getUser (line 33) | public User getUser() { return user; } method getShow (line 34) | public Show getShow() { return show; } method getSeats (line 35) | public List getSeats() { return seats; } method getTotalAmount (line 36) | public double getTotalAmount() { return totalAmount; } method getPayment (line 37) | public Payment getPayment() { return payment; } class BookingBuilder (line 40) | public static class BookingBuilder { method setId (line 48) | public BookingBuilder setId(String id) { method setUser (line 53) | public BookingBuilder setUser(User user) { method setShow (line 58) | public BookingBuilder setShow(Show show) { method setSeats (line 63) | public BookingBuilder setSeats(List seats) { method setTotalAmount (line 68) | public BookingBuilder setTotalAmount(double totalAmount) { method setPayment (line 73) | public BookingBuilder setPayment(Payment payment) { method build (line 78) | public Booking build() { FILE: solutions/java/src/movieticketbookingsystem/entities/Cinema.java class Cinema (line 5) | public class Cinema { method Cinema (line 11) | public Cinema(String id, String name, City city, List screens) { method getId (line 18) | public String getId() { return id; } method getName (line 19) | public String getName() { return name; } method getCity (line 20) | public City getCity() { return city; } method getScreens (line 21) | public List getScreens() { return screens; } FILE: solutions/java/src/movieticketbookingsystem/entities/City.java class City (line 3) | public class City { method City (line 7) | public City(String id, String name) { method getId (line 12) | public String getId() { method getName (line 16) | public String getName() { FILE: solutions/java/src/movieticketbookingsystem/entities/Movie.java class Movie (line 5) | public class Movie extends MovieSubject { method Movie (line 10) | public Movie(String id, String title, int durationInMinutes) { method getId (line 16) | public String getId() { method getTitle (line 20) | public String getTitle() { FILE: solutions/java/src/movieticketbookingsystem/entities/Payment.java class Payment (line 7) | public class Payment { method Payment (line 13) | public Payment(double amount, PaymentStatus status, String transaction... method getStatus (line 20) | public PaymentStatus getStatus() { return status; } FILE: solutions/java/src/movieticketbookingsystem/entities/Screen.java class Screen (line 6) | public class Screen { method Screen (line 10) | public Screen(String id) { method addSeat (line 15) | public void addSeat(Seat seat) { method getId (line 19) | public String getId() { return id; } method getSeats (line 20) | public List getSeats() { return seats; } FILE: solutions/java/src/movieticketbookingsystem/entities/Seat.java class Seat (line 6) | public class Seat { method Seat (line 13) | public Seat(String id, int row, int col, SeatType type) { method getId (line 22) | public String getId() { return id; } method getRow (line 23) | public int getRow() { return row; } method getCol (line 24) | public int getCol() { return col; } method getType (line 25) | public SeatType getType() { return type; } method getStatus (line 26) | public SeatStatus getStatus() { return status; } method setStatus (line 27) | public void setStatus(SeatStatus status) { this.status = status; } FILE: solutions/java/src/movieticketbookingsystem/entities/Show.java class Show (line 7) | public class Show { method Show (line 14) | public Show(String id, Movie movie, Screen screen, LocalDateTime start... method getId (line 22) | public String getId() { return id; } method getMovie (line 23) | public Movie getMovie() { return movie; } method getScreen (line 24) | public Screen getScreen() { return screen; } method getStartTime (line 25) | public LocalDateTime getStartTime() { return startTime; } method getPricingStrategy (line 26) | public PricingStrategy getPricingStrategy() { return pricingStrategy; } FILE: solutions/java/src/movieticketbookingsystem/entities/User.java class User (line 5) | public class User { method User (line 10) | public User(String name, String email) { method getId (line 16) | public String getId() { method getName (line 20) | public String getName() { FILE: solutions/java/src/movieticketbookingsystem/enums/PaymentStatus.java type PaymentStatus (line 3) | public enum PaymentStatus { FILE: solutions/java/src/movieticketbookingsystem/enums/SeatStatus.java type SeatStatus (line 3) | public enum SeatStatus { FILE: solutions/java/src/movieticketbookingsystem/enums/SeatType.java type SeatType (line 3) | public enum SeatType { method SeatType (line 10) | SeatType(double price) { method getPrice (line 14) | public double getPrice() { FILE: solutions/java/src/movieticketbookingsystem/observer/MovieObserver.java type MovieObserver (line 5) | public interface MovieObserver { method update (line 6) | void update(Movie movie); FILE: solutions/java/src/movieticketbookingsystem/observer/MovieSubject.java class MovieSubject (line 8) | public abstract class MovieSubject { method addObserver (line 11) | public void addObserver(MovieObserver observer) { method removeObserver (line 15) | public void removeObserver(MovieObserver observer) { method notifyObservers (line 19) | public void notifyObservers() { FILE: solutions/java/src/movieticketbookingsystem/observer/UserObserver.java class UserObserver (line 6) | public class UserObserver implements MovieObserver { method UserObserver (line 9) | public UserObserver(User user) { method update (line 13) | @Override FILE: solutions/java/src/movieticketbookingsystem/strategy/payment/CreditCardPaymentStrategy.java class CreditCardPaymentStrategy (line 8) | public class CreditCardPaymentStrategy implements PaymentStrategy { method CreditCardPaymentStrategy (line 12) | public CreditCardPaymentStrategy(String cardNumber, String cvv) { method pay (line 17) | @Override FILE: solutions/java/src/movieticketbookingsystem/strategy/payment/PaymentStrategy.java type PaymentStrategy (line 5) | public interface PaymentStrategy { method pay (line 6) | Payment pay(double amount); FILE: solutions/java/src/movieticketbookingsystem/strategy/pricing/PricingStrategy.java type PricingStrategy (line 7) | public interface PricingStrategy { method calculatePrice (line 8) | double calculatePrice(List seats); FILE: solutions/java/src/movieticketbookingsystem/strategy/pricing/WeekdayPricingStrategy.java class WeekdayPricingStrategy (line 7) | public class WeekdayPricingStrategy implements PricingStrategy { method calculatePrice (line 8) | @Override FILE: solutions/java/src/movieticketbookingsystem/strategy/pricing/WeekendPricingStrategy.java class WeekendPricingStrategy (line 7) | public class WeekendPricingStrategy implements PricingStrategy { method calculatePrice (line 10) | @Override FILE: solutions/java/src/musicstreamingservice/MusicStreamingDemo.java class MusicStreamingDemo (line 12) | public class MusicStreamingDemo { method main (line 13) | public static void main(String[] args) throws InterruptedException { FILE: solutions/java/src/musicstreamingservice/MusicStreamingSystem.java class MusicStreamingSystem (line 16) | public class MusicStreamingSystem { method MusicStreamingSystem (line 27) | private MusicStreamingSystem() { method getInstance (line 32) | public static MusicStreamingSystem getInstance() { method registerUser (line 43) | public void registerUser(User user) { method addSong (line 47) | public Song addSong(String id, String title, String artistId, int dura... method addArtist (line 53) | public void addArtist(Artist artist) { method searchSongsByTitle (line 57) | public List searchSongsByTitle(String title) { method getSongRecommendations (line 61) | public List getSongRecommendations() { method getPlayer (line 65) | public Player getPlayer() { return player; } FILE: solutions/java/src/musicstreamingservice/command/Command.java type Command (line 3) | public interface Command { method execute (line 4) | void execute(); FILE: solutions/java/src/musicstreamingservice/command/NextTrackCommand.java class NextTrackCommand (line 5) | public class NextTrackCommand implements Command { method NextTrackCommand (line 8) | public NextTrackCommand(Player player) { this.player = player; } method execute (line 10) | @Override FILE: solutions/java/src/musicstreamingservice/command/PauseCommand.java class PauseCommand (line 5) | public class PauseCommand implements Command { method PauseCommand (line 8) | public PauseCommand(Player player) { this.player = player; } method execute (line 10) | @Override FILE: solutions/java/src/musicstreamingservice/command/PlayCommand.java class PlayCommand (line 5) | public class PlayCommand implements Command { method PlayCommand (line 8) | public PlayCommand(Player player) { this.player = player; } method execute (line 10) | @Override FILE: solutions/java/src/musicstreamingservice/entities/Album.java class Album (line 6) | public class Album implements Playable { method Album (line 10) | public Album(String title) { method addTrack (line 13) | public void addTrack(Song song) { tracks.add(song); } method getTracks (line 15) | @Override method getTitle (line 18) | public String getTitle() { return title; } FILE: solutions/java/src/musicstreamingservice/entities/Artist.java class Artist (line 8) | public class Artist extends Subject { method Artist (line 13) | public Artist(String id, String name) { method releaseAlbum (line 17) | public void releaseAlbum(Album album) { method getId (line 23) | public String getId() { return id; } method getName (line 24) | public String getName() { return name; } FILE: solutions/java/src/musicstreamingservice/entities/Playable.java type Playable (line 5) | public interface Playable { method getTracks (line 6) | List getTracks(); FILE: solutions/java/src/musicstreamingservice/entities/Player.java class Player (line 10) | public class Player { method Player (line 18) | public Player() { method load (line 23) | public void load(Playable playable, User user) { method playCurrentSongInQueue (line 31) | public void playCurrentSongInQueue() { method clickPlay (line 39) | public void clickPlay() { state.play(this); } method clickPause (line 40) | public void clickPause() { state.pause(this); } method clickNext (line 42) | public void clickNext() { method changeState (line 53) | public void changeState(PlayerState state) { this.state = state; } method setStatus (line 54) | public void setStatus(PlayerStatus status) { this.status = status; } method setCurrentSong (line 55) | public void setCurrentSong(Song song) { this.currentSong = song; } method hasQueue (line 56) | public boolean hasQueue() { return !queue.isEmpty(); } FILE: solutions/java/src/musicstreamingservice/entities/Playlist.java class Playlist (line 6) | public class Playlist implements Playable { method Playlist (line 10) | public Playlist(String name) { this.name = name; } method addTrack (line 12) | public void addTrack(Song song) { tracks.add(song); } method getTracks (line 14) | @Override FILE: solutions/java/src/musicstreamingservice/entities/Song.java class Song (line 6) | public class Song implements Playable { method Song (line 12) | public Song(String id, String title, Artist artist, int durationInSeco... method getTracks (line 19) | @Override method toString (line 24) | @Override method getId (line 29) | public String getId() { return id; } method getTitle (line 30) | public String getTitle() { return title; } method getArtist (line 31) | public Artist getArtist() { return artist; } FILE: solutions/java/src/musicstreamingservice/entities/User.java class User (line 11) | public class User implements ArtistObserver { method User (line 17) | private User(String id, String name, PlaybackStrategy strategy) { method followArtist (line 23) | public void followArtist(Artist artist) { method update (line 28) | @Override method getPlaybackStrategy (line 34) | public PlaybackStrategy getPlaybackStrategy() { return playbackStrateg... method getId (line 36) | public String getId() { return id; } method getName (line 37) | public String getName() { return name; } class Builder (line 40) | public static class Builder { method Builder (line 45) | public Builder(String name) { method withSubscription (line 49) | public Builder withSubscription(SubscriptionTier tier, int songsPlay... method build (line 53) | public User build() { FILE: solutions/java/src/musicstreamingservice/enums/PlayerStatus.java type PlayerStatus (line 3) | public enum PlayerStatus { FILE: solutions/java/src/musicstreamingservice/enums/SubscriptionTier.java type SubscriptionTier (line 3) | public enum SubscriptionTier { FILE: solutions/java/src/musicstreamingservice/observer/ArtistObserver.java type ArtistObserver (line 6) | public interface ArtistObserver { method update (line 7) | void update(Artist artist, Album newAlbum); FILE: solutions/java/src/musicstreamingservice/observer/Subject.java class Subject (line 9) | public abstract class Subject { method addObserver (line 12) | public void addObserver(ArtistObserver observer) { observers.add(obser... method removeObserver (line 14) | public void removeObserver(ArtistObserver observer) { observers.remove... method notifyObservers (line 16) | public void notifyObservers(Artist artist, Album album) { FILE: solutions/java/src/musicstreamingservice/services/RecommendationService.java class RecommendationService (line 8) | public class RecommendationService { method RecommendationService (line 11) | public RecommendationService(RecommendationStrategy strategy) { this.s... method setStrategy (line 13) | public void setStrategy(RecommendationStrategy strategy) { this.strate... method generateRecommendations (line 15) | public List generateRecommendations(List allSongs) { FILE: solutions/java/src/musicstreamingservice/services/SearchService.java class SearchService (line 9) | public class SearchService { method searchSongsByTitle (line 10) | public List searchSongsByTitle(List songs, String query) { method searchArtistsByName (line 15) | public List searchArtistsByName(List artists, String q... FILE: solutions/java/src/musicstreamingservice/state/PausedState.java class PausedState (line 6) | public class PausedState implements PlayerState { method play (line 7) | @Override method pause (line 14) | @Override method stop (line 17) | @Override FILE: solutions/java/src/musicstreamingservice/state/PlayerState.java type PlayerState (line 5) | public interface PlayerState { method play (line 6) | void play(Player player); method pause (line 7) | void pause(Player player); method stop (line 8) | void stop(Player player); FILE: solutions/java/src/musicstreamingservice/state/PlayingState.java class PlayingState (line 6) | public class PlayingState implements PlayerState { method play (line 7) | @Override method pause (line 10) | @Override method stop (line 17) | @Override FILE: solutions/java/src/musicstreamingservice/state/StoppedState.java class StoppedState (line 6) | public class StoppedState implements PlayerState { method play (line 7) | @Override method pause (line 19) | @Override method stop (line 22) | @Override FILE: solutions/java/src/musicstreamingservice/strategies/playback/FreePlaybackStrategy.java class FreePlaybackStrategy (line 6) | public class FreePlaybackStrategy implements PlaybackStrategy { method FreePlaybackStrategy (line 10) | public FreePlaybackStrategy(int initialSongsPlayed) { method play (line 14) | @Override FILE: solutions/java/src/musicstreamingservice/strategies/playback/PlaybackStrategy.java type PlaybackStrategy (line 7) | public interface PlaybackStrategy { method play (line 8) | void play(Song song, Player player); method getStrategy (line 11) | static PlaybackStrategy getStrategy(SubscriptionTier tier, int songsPl... FILE: solutions/java/src/musicstreamingservice/strategies/playback/PremiumPlaybackStrategy.java class PremiumPlaybackStrategy (line 6) | public class PremiumPlaybackStrategy implements PlaybackStrategy { method play (line 7) | @Override FILE: solutions/java/src/musicstreamingservice/strategies/recommendation/GenreBasedRecommendationStrategy.java class GenreBasedRecommendationStrategy (line 9) | public class GenreBasedRecommendationStrategy implements RecommendationS... method recommend (line 11) | @Override FILE: solutions/java/src/musicstreamingservice/strategies/recommendation/RecommendationStrategy.java type RecommendationStrategy (line 7) | public interface RecommendationStrategy { method recommend (line 8) | List recommend(List allSongs); FILE: solutions/java/src/onlineauctionsystem/AuctionService.java class AuctionService (line 14) | public class AuctionService { method AuctionService (line 20) | private AuctionService() { method getInstance (line 26) | public static synchronized AuctionService getInstance() { method createUser (line 33) | public User createUser(String name) { method getUser (line 39) | public User getUser(String userId) { method createAuction (line 43) | public Auction createAuction(String itemName, String description, BigD... method viewActiveAuctions (line 56) | public List viewActiveAuctions() { method placeBid (line 60) | public void placeBid(String auctionId, String bidderId, BigDecimal amo... method endAuction (line 65) | public void endAuction(String auctionId) { method getAuction (line 70) | public Auction getAuction(String auctionId) { method shutdown (line 78) | public void shutdown() { FILE: solutions/java/src/onlineauctionsystem/AuctionSystemDemo.java class AuctionSystemDemo (line 9) | public class AuctionSystemDemo { method main (line 10) | public static void main(String[] args) { FILE: solutions/java/src/onlineauctionsystem/entities/Auction.java class Auction (line 11) | public class Auction { method Auction (line 23) | public Auction(String itemName, String description, BigDecimal startin... method placeBid (line 36) | public synchronized void placeBid(User bidder, BigDecimal amount) { method endAuction (line 66) | public synchronized void endAuction() { method getHighestBid (line 86) | public Bid getHighestBid() { method isActive (line 93) | public boolean isActive() { method addObserver (line 99) | private void addObserver(AuctionObserver observer) { method notifyAllObservers (line 103) | private void notifyAllObservers(String message) { method notifyObserver (line 109) | private void notifyObserver(AuctionObserver observer, String message) { method getId (line 114) | public String getId() { return id; } method getItemName (line 115) | public String getItemName() { return itemName; } method getBidHistory (line 116) | public List getBidHistory() { return Collections.unmodifiableList... method getState (line 117) | public AuctionStatus getState() { return state; } method getWinningBid (line 118) | public Bid getWinningBid() { return winningBid; } FILE: solutions/java/src/onlineauctionsystem/entities/Bid.java class Bid (line 6) | public class Bid implements Comparable { method Bid (line 11) | public Bid(User bidder, BigDecimal amount) { method getBidder (line 17) | public User getBidder() { method getAmount (line 21) | public BigDecimal getAmount() { method getTimestamp (line 25) | public LocalDateTime getTimestamp() { method compareTo (line 29) | @Override method toString (line 38) | @Override FILE: solutions/java/src/onlineauctionsystem/entities/User.java class User (line 7) | public class User implements AuctionObserver { method User (line 11) | public User(String name) { method getId (line 16) | public String getId() { method getName (line 20) | public String getName() { method onUpdate (line 24) | @Override FILE: solutions/java/src/onlineauctionsystem/enums/AuctionStatus.java type AuctionStatus (line 3) | public enum AuctionStatus { FILE: solutions/java/src/onlineauctionsystem/observer/AuctionObserver.java type AuctionObserver (line 5) | public interface AuctionObserver { method onUpdate (line 6) | void onUpdate(Auction auction, String message); FILE: solutions/java/src/onlineshoppingservice/OnlineShoppingDemo.java class OnlineShoppingDemo (line 9) | public class OnlineShoppingDemo { method main (line 10) | public static void main(String[] args) { FILE: solutions/java/src/onlineshoppingservice/OnlineShoppingSystem.java class OnlineShoppingSystem (line 14) | public class OnlineShoppingSystem { method OnlineShoppingSystem (line 28) | private OnlineShoppingSystem() { method getInstance (line 35) | public static OnlineShoppingSystem getInstance() { method addProduct (line 47) | public void addProduct(Product product, int initialStock) { method registerCustomer (line 52) | public Customer registerCustomer(String name, String email, String pas... method addToCart (line 58) | public void addToCart(String customerId, String productId, int quantit... method getCustomerCart (line 64) | public ShoppingCart getCustomerCart(String customerId) { method searchProducts (line 69) | public List searchProducts(String name) { method placeOrder (line 73) | public Order placeOrder(String customerId, PaymentStrategy paymentStra... FILE: solutions/java/src/onlineshoppingservice/decorator/GiftWrapDecorator.java class GiftWrapDecorator (line 5) | public class GiftWrapDecorator extends ProductDecorator { method GiftWrapDecorator (line 8) | public GiftWrapDecorator(Product product) { method getPrice (line 12) | @Override method getDescription (line 17) | @Override FILE: solutions/java/src/onlineshoppingservice/decorator/ProductDecorator.java class ProductDecorator (line 6) | public abstract class ProductDecorator extends Product { method ProductDecorator (line 9) | public ProductDecorator(Product product) { method getId (line 13) | @Override public String getId() { return decoratedProduct.getId(); } method getName (line 15) | @Override public String getName() { return decoratedProduct.getName(); } method getPrice (line 17) | @Override public double getPrice() { return decoratedProduct.getPrice(... method getDescription (line 19) | @Override public String getDescription() { return decoratedProduct.get... method getCategory (line 21) | @Override public ProductCategory getCategory() { return decoratedProdu... FILE: solutions/java/src/onlineshoppingservice/enums/OrderStatus.java type OrderStatus (line 3) | public enum OrderStatus { FILE: solutions/java/src/onlineshoppingservice/enums/ProductCategory.java type ProductCategory (line 3) | public enum ProductCategory { FILE: solutions/java/src/onlineshoppingservice/exceptions/OutOfStockException.java class OutOfStockException (line 3) | public class OutOfStockException extends RuntimeException { method OutOfStockException (line 4) | public OutOfStockException(String message) { FILE: solutions/java/src/onlineshoppingservice/models/Account.java class Account (line 3) | public class Account { method Account (line 8) | public Account(String username, String password) { method getCart (line 13) | public ShoppingCart getCart() { return cart; } FILE: solutions/java/src/onlineshoppingservice/models/Address.java class Address (line 3) | public class Address { method Address (line 9) | public Address(String street, String city, String state, String zipCod... method toString (line 16) | @Override FILE: solutions/java/src/onlineshoppingservice/models/CartItem.java class CartItem (line 3) | public class CartItem { method CartItem (line 7) | public CartItem(Product product, int quantity) { method getProduct (line 12) | public Product getProduct() { return product; } method getQuantity (line 13) | public int getQuantity() { return quantity; } method incrementQuantity (line 14) | public void incrementQuantity(int amount) { this.quantity += amount; } method getPrice (line 15) | public double getPrice() { return product.getPrice() * quantity; } FILE: solutions/java/src/onlineshoppingservice/models/Customer.java class Customer (line 7) | public class Customer implements OrderObserver { method Customer (line 14) | public Customer(String name, String email, String password, Address sh... method update (line 22) | @Override method getId (line 28) | public String getId() { return id; } method getName (line 29) | public String getName() { return name; } method getAccount (line 30) | public Account getAccount() { return account; } method getShippingAddress (line 31) | public Address getShippingAddress() { return shippingAddress; } method setShippingAddress (line 32) | public void setShippingAddress(Address address) { this.shippingAddress... FILE: solutions/java/src/onlineshoppingservice/models/Order.java class Order (line 12) | public class Order extends Subject { method Order (line 22) | public Order(Customer customer, List items, Address shi... method shipOrder (line 35) | public void shipOrder() { currentState.ship(this); } method deliverOrder (line 36) | public void deliverOrder() { currentState.deliver(this); } method cancelOrder (line 37) | public void cancelOrder() { currentState.cancel(this); } method getId (line 40) | public String getId() { return id; } method getStatus (line 41) | public OrderStatus getStatus() { return status; } method setState (line 42) | public void setState(OrderState state) { this.currentState = state; } method setStatus (line 43) | public void setStatus(OrderStatus status) { method getItems (line 47) | public List getItems() { return items; } FILE: solutions/java/src/onlineshoppingservice/models/OrderLineItem.java class OrderLineItem (line 3) | public class OrderLineItem { method OrderLineItem (line 9) | public OrderLineItem(String productId, String productName, int quantit... method getProductId (line 16) | public String getProductId() { return productId; } method getQuantity (line 17) | public int getQuantity() { return quantity; } FILE: solutions/java/src/onlineshoppingservice/models/Product.java class Product (line 7) | public abstract class Product { method getId (line 14) | public abstract String getId(); method getName (line 15) | public abstract String getName(); method getDescription (line 16) | public abstract String getDescription(); method getPrice (line 17) | public abstract double getPrice(); method getCategory (line 18) | public abstract ProductCategory getCategory(); class BaseProduct (line 21) | public static class BaseProduct extends Product { method BaseProduct (line 22) | private BaseProduct(String id, String name, String description, doub... method getId (line 29) | @Override public String getId() { return id; } method getName (line 30) | @Override public String getName() { return name; } method getDescription (line 31) | @Override public String getDescription() { return description; } method getPrice (line 32) | @Override public double getPrice() { return price; } method getCategory (line 33) | @Override public ProductCategory getCategory() { return category; } class Builder (line 37) | public static class Builder { method Builder (line 43) | public Builder(String name, double price) { method withDescription (line 47) | public Builder withDescription(String description) { this.descriptio... method withCategory (line 48) | public Builder withCategory(ProductCategory category) { this.categor... method build (line 49) | public Product build() { FILE: solutions/java/src/onlineshoppingservice/models/ShoppingCart.java class ShoppingCart (line 6) | public class ShoppingCart { method addItem (line 9) | public void addItem(Product product, int quantity) { method removeItem (line 17) | public void removeItem(String productId) { method getItems (line 21) | public Map getItems() { return Map.copyOf(items); } method calculateTotal (line 23) | public double calculateTotal() { method clearCart (line 27) | public void clearCart() { FILE: solutions/java/src/onlineshoppingservice/observer/OrderObserver.java type OrderObserver (line 5) | public interface OrderObserver { method update (line 6) | void update(Order order); FILE: solutions/java/src/onlineshoppingservice/observer/Subject.java class Subject (line 8) | public abstract class Subject { method addObserver (line 11) | public void addObserver(OrderObserver observer) { observers.add(observ... method removeObserver (line 12) | public void removeObserver(OrderObserver observer) { observers.remove(... method notifyObservers (line 13) | public void notifyObservers(Order order) { FILE: solutions/java/src/onlineshoppingservice/services/InventoryService.java class InventoryService (line 11) | public class InventoryService { method InventoryService (line 14) | public InventoryService() { method addStock (line 18) | public void addStock(Product product, int quantity) { method updateStockForOrder (line 22) | public synchronized void updateStockForOrder(List items) { FILE: solutions/java/src/onlineshoppingservice/services/OrderService.java class OrderService (line 11) | public class OrderService { method OrderService (line 14) | public OrderService(InventoryService inventoryService) { method createOrder (line 18) | public Order createOrder(Customer customer, ShoppingCart cart) { FILE: solutions/java/src/onlineshoppingservice/services/PaymentService.java class PaymentService (line 5) | public class PaymentService { method processPayment (line 6) | public boolean processPayment(PaymentStrategy strategy, double amount) { FILE: solutions/java/src/onlineshoppingservice/services/SearchService.java class SearchService (line 10) | public class SearchService { method SearchService (line 13) | public SearchService(Collection productCatalog) { this.produc... method searchByName (line 15) | public List searchByName(String name) { method searchByCategory (line 23) | public List searchByCategory(ProductCategory category) { FILE: solutions/java/src/onlineshoppingservice/state/CancelledState.java class CancelledState (line 5) | public class CancelledState implements OrderState { method ship (line 6) | @Override method deliver (line 9) | @Override method cancel (line 12) | @Override FILE: solutions/java/src/onlineshoppingservice/state/DeliveredState.java class DeliveredState (line 5) | public class DeliveredState implements OrderState { method ship (line 6) | @Override method deliver (line 9) | @Override method cancel (line 12) | @Override FILE: solutions/java/src/onlineshoppingservice/state/OrderState.java type OrderState (line 5) | public interface OrderState { method ship (line 6) | void ship(Order order); method deliver (line 7) | void deliver(Order order); method cancel (line 8) | void cancel(Order order); FILE: solutions/java/src/onlineshoppingservice/state/PlacedState.java class PlacedState (line 6) | public class PlacedState implements OrderState { method ship (line 7) | @Override method deliver (line 14) | @Override method cancel (line 17) | @Override FILE: solutions/java/src/onlineshoppingservice/state/ShippedState.java class ShippedState (line 6) | public class ShippedState implements OrderState { method ship (line 7) | @Override method deliver (line 10) | @Override method cancel (line 17) | @Override FILE: solutions/java/src/onlineshoppingservice/strategy/CreditCardPaymentStrategy.java class CreditCardPaymentStrategy (line 3) | public class CreditCardPaymentStrategy implements PaymentStrategy { method CreditCardPaymentStrategy (line 6) | public CreditCardPaymentStrategy(String cardNumber) { this.cardNumber ... method pay (line 8) | @Override FILE: solutions/java/src/onlineshoppingservice/strategy/PaymentStrategy.java type PaymentStrategy (line 3) | public interface PaymentStrategy { method pay (line 4) | boolean pay(double amount); FILE: solutions/java/src/onlineshoppingservice/strategy/UPIPaymentStrategy.java class UPIPaymentStrategy (line 3) | public class UPIPaymentStrategy implements PaymentStrategy{ method UPIPaymentStrategy (line 6) | public UPIPaymentStrategy(String upiId) { this.upiId = upiId; } method pay (line 8) | @Override FILE: solutions/java/src/onlinestockbrokeragesystem/BuyOrder.java class BuyOrder (line 3) | public class BuyOrder extends Order { method BuyOrder (line 4) | public BuyOrder(String orderId, Account account, Stock stock, int quan... method execute (line 8) | @Override FILE: solutions/java/src/onlinestockbrokeragesystem/SellOrder.java class SellOrder (line 3) | public class SellOrder extends Order { method SellOrder (line 4) | public SellOrder(String orderId, Account account, Stock stock, int qua... method execute (line 8) | @Override FILE: solutions/java/src/onlinestockbrokeragesystem/StockBrokerageSystem.java class StockBrokerageSystem (line 13) | public class StockBrokerageSystem { method StockBrokerageSystem (line 18) | private StockBrokerageSystem() { method getInstance (line 23) | public static StockBrokerageSystem getInstance() { method registerUser (line 34) | public User registerUser(String name, double initialAmount) { method addStock (line 40) | public Stock addStock(String symbol, double initialPrice) { method placeBuyOrder (line 46) | public void placeBuyOrder(Order order) { method placeSellOrder (line 52) | public void placeSellOrder(Order order) { method cancelOrder (line 58) | public void cancelOrder(Order order) { FILE: solutions/java/src/onlinestockbrokeragesystem/StockBrokerageSystemDemo.java class StockBrokerageSystemDemo (line 8) | public class StockBrokerageSystemDemo { method main (line 9) | public static void main(String[] args) throws InterruptedException { method printAccountStatus (line 88) | private static void printAccountStatus(User user) { FILE: solutions/java/src/onlinestockbrokeragesystem/StockExchange.java class StockExchange (line 16) | public class StockExchange { method StockExchange (line 21) | private StockExchange() { method getInstance (line 26) | public static StockExchange getInstance() { method placeBuyOrder (line 37) | public void placeBuyOrder(Order order) { method placeSellOrder (line 42) | public void placeSellOrder(Order order) { method matchOrders (line 47) | private void matchOrders(Stock stock) { method executeTrade (line 73) | private void executeTrade(Order buyOrder, Order sellOrder, double trad... method updateOrderStatus (line 99) | private void updateOrderStatus(Order order, int quantityTraded) { method findBestBuy (line 111) | private Order findBestBuy(List buys) { method findBestSell (line 118) | private Order findBestSell(List sells) { FILE: solutions/java/src/onlinestockbrokeragesystem/command/BuyStockCommand.java class BuyStockCommand (line 9) | public class BuyStockCommand implements OrderCommand { method BuyStockCommand (line 14) | public BuyStockCommand(Account account, Order order) { method execute (line 20) | @Override FILE: solutions/java/src/onlinestockbrokeragesystem/command/OrderCommand.java type OrderCommand (line 3) | public interface OrderCommand { method execute (line 4) | void execute(); FILE: solutions/java/src/onlinestockbrokeragesystem/command/SellStockCommand.java class SellStockCommand (line 8) | public class SellStockCommand implements OrderCommand { method SellStockCommand (line 13) | public SellStockCommand(Account account, Order order) { method execute (line 19) | @Override FILE: solutions/java/src/onlinestockbrokeragesystem/entities/Account.java class Account (line 9) | public class Account { method Account (line 13) | public Account(double initialCash) { method debit (line 18) | public synchronized void debit(double amount) { method credit (line 25) | public synchronized void credit(double amount) { method addStock (line 29) | public synchronized void addStock(String symbol, int quantity) { method removeStock (line 33) | public synchronized void removeStock(String symbol, int quantity) { method getBalance (line 41) | public double getBalance() { return balance; } method getPortfolio (line 42) | public Map getPortfolio() { return Map.copyOf(portfol... method getStockQuantity (line 43) | public int getStockQuantity(String symbol) { return portfolio.getOrDef... FILE: solutions/java/src/onlinestockbrokeragesystem/entities/Order.java class Order (line 9) | public class Order { method Order (line 21) | public Order(String orderId, User user, Stock stock, OrderType type, i... method cancel (line 35) | public void cancel() { method getOrderId (line 40) | public String getOrderId() { return orderId; } method getUser (line 41) | public User getUser() { return user; } method getStock (line 42) | public Stock getStock() { return stock; } method getType (line 43) | public OrderType getType() { return type; } method getQuantity (line 44) | public int getQuantity() { return quantity; } method getPrice (line 45) | public double getPrice() { return price; } method getStatus (line 46) | public OrderStatus getStatus() { return status; } method getExecutionStrategy (line 47) | public ExecutionStrategy getExecutionStrategy() { return executionStra... method setState (line 50) | public void setState(OrderState state) { method setStatus (line 54) | public void setStatus(OrderStatus status) { method notifyOwner (line 59) | private void notifyOwner() { FILE: solutions/java/src/onlinestockbrokeragesystem/entities/OrderBuilder.java class OrderBuilder (line 10) | public class OrderBuilder { method forUser (line 18) | public OrderBuilder forUser(User user) { method withStock (line 23) | public OrderBuilder withStock(Stock stock) { method buy (line 28) | public OrderBuilder buy(int quantity) { method sell (line 34) | public OrderBuilder sell(int quantity) { method atMarketPrice (line 40) | public OrderBuilder atMarketPrice() { method withLimit (line 46) | public OrderBuilder withLimit(double limitPrice) { method build (line 52) | public Order build() { FILE: solutions/java/src/onlinestockbrokeragesystem/entities/Stock.java class Stock (line 8) | public class Stock { method Stock (line 13) | public Stock(String symbol, double initialPrice) { method getSymbol (line 18) | public String getSymbol() { method getPrice (line 22) | public double getPrice() { method setPrice (line 26) | public void setPrice(double newPrice) { method addObserver (line 33) | public void addObserver(StockObserver observer) { method removeObserver (line 37) | public void removeObserver(StockObserver observer) { method notifyObservers (line 41) | private void notifyObservers() { FILE: solutions/java/src/onlinestockbrokeragesystem/entities/User.java class User (line 7) | public class User implements StockObserver { method User (line 12) | public User(String name, double initialCash) { method getUserId (line 18) | public String getUserId() { return userId; } method getName (line 19) | public String getName() { return name; } method getAccount (line 20) | public Account getAccount() { return account; } method update (line 22) | @Override method orderStatusUpdate (line 28) | public void orderStatusUpdate(Order order) { FILE: solutions/java/src/onlinestockbrokeragesystem/enums/OrderStatus.java type OrderStatus (line 3) | public enum OrderStatus { FILE: solutions/java/src/onlinestockbrokeragesystem/enums/OrderType.java type OrderType (line 3) | public enum OrderType { FILE: solutions/java/src/onlinestockbrokeragesystem/enums/TransactionType.java type TransactionType (line 3) | public enum TransactionType { FILE: solutions/java/src/onlinestockbrokeragesystem/exceptions/InsufficientFundsException.java class InsufficientFundsException (line 3) | public class InsufficientFundsException extends RuntimeException { method InsufficientFundsException (line 4) | public InsufficientFundsException(String message) { FILE: solutions/java/src/onlinestockbrokeragesystem/exceptions/InsufficientStockException.java class InsufficientStockException (line 3) | public class InsufficientStockException extends RuntimeException { method InsufficientStockException (line 4) | public InsufficientStockException(String message) { FILE: solutions/java/src/onlinestockbrokeragesystem/observer/StockObserver.java type StockObserver (line 5) | public interface StockObserver { method update (line 6) | void update(Stock stock); FILE: solutions/java/src/onlinestockbrokeragesystem/state/CancelledState.java class CancelledState (line 5) | public class CancelledState implements OrderState { method handle (line 6) | @Override method cancel (line 11) | @Override FILE: solutions/java/src/onlinestockbrokeragesystem/state/FilledState.java class FilledState (line 5) | public class FilledState implements OrderState { method handle (line 6) | @Override method cancel (line 11) | @Override FILE: solutions/java/src/onlinestockbrokeragesystem/state/OpenState.java class OpenState (line 6) | public class OpenState implements OrderState { method handle (line 7) | @Override method cancel (line 12) | @Override FILE: solutions/java/src/onlinestockbrokeragesystem/state/OrderState.java type OrderState (line 5) | public interface OrderState { method handle (line 6) | void handle(Order order); method cancel (line 7) | void cancel(Order order); FILE: solutions/java/src/onlinestockbrokeragesystem/strategy/ExecutionStrategy.java type ExecutionStrategy (line 5) | public interface ExecutionStrategy { method canExecute (line 6) | boolean canExecute(Order order, double marketPrice); FILE: solutions/java/src/onlinestockbrokeragesystem/strategy/LimitOrderStrategy.java class LimitOrderStrategy (line 6) | public class LimitOrderStrategy implements ExecutionStrategy { method LimitOrderStrategy (line 9) | public LimitOrderStrategy(TransactionType type) { method canExecute (line 13) | @Override FILE: solutions/java/src/onlinestockbrokeragesystem/strategy/MarketOrderStrategy.java class MarketOrderStrategy (line 5) | public class MarketOrderStrategy implements ExecutionStrategy { method canExecute (line 6) | @Override FILE: solutions/java/src/parkinglot/ParkingLot.java class ParkingLot (line 15) | public class ParkingLot { method ParkingLot (line 22) | private ParkingLot() { method getInstance (line 28) | public static synchronized ParkingLot getInstance() { method addFloor (line 35) | public void addFloor(ParkingFloor floor) { method setFeeStrategy (line 39) | public void setFeeStrategy (FeeStrategy feeStrategy) { method setParkingStrategy (line 43) | public void setParkingStrategy(ParkingStrategy parkingStrategy) { method parkVehicle (line 47) | public Optional parkVehicle(Vehicle vehicle) { method unparkVehicle (line 63) | public Optional unparkVehicle(String licenseNumber) { FILE: solutions/java/src/parkinglot/ParkingLotDemo.java class ParkingLotDemo (line 11) | public class ParkingLotDemo { method main (line 12) | public static void main(String[] args) { FILE: solutions/java/src/parkinglot/entities/ParkingFloor.java class ParkingFloor (line 12) | public class ParkingFloor { method ParkingFloor (line 16) | public ParkingFloor(int floorNumber) { method addSpot (line 21) | public void addSpot(ParkingSpot spot) { method findAvailableSpot (line 25) | public synchronized Optional findAvailableSpot(Vehicle ve... method displayAvailability (line 32) | public void displayAvailability() { FILE: solutions/java/src/parkinglot/entities/ParkingSpot.java class ParkingSpot (line 6) | public class ParkingSpot { method ParkingSpot (line 12) | public ParkingSpot(String spotId, VehicleSize spotSize) { method getSpotId (line 19) | public String getSpotId() { method getSpotSize (line 23) | public VehicleSize getSpotSize() { method isAvailable (line 27) | public synchronized boolean isAvailable() { method isOccupied (line 31) | public boolean isOccupied() { method parkVehicle (line 35) | public synchronized void parkVehicle(Vehicle vehicle) { method unparkVehicle (line 40) | public synchronized void unparkVehicle() { method canFitVehicle (line 45) | public boolean canFitVehicle(Vehicle vehicle) { FILE: solutions/java/src/parkinglot/entities/ParkingTicket.java class ParkingTicket (line 8) | public class ParkingTicket { method ParkingTicket (line 15) | public ParkingTicket(Vehicle vehicle, ParkingSpot spot) { method getTicketId (line 22) | public String getTicketId() { return ticketId; } method getVehicle (line 23) | public Vehicle getVehicle() { return vehicle; } method getSpot (line 24) | public ParkingSpot getSpot() { return spot; } method getEntryTimestamp (line 25) | public long getEntryTimestamp() { return entryTimestamp; } method getExitTimestamp (line 26) | public long getExitTimestamp() { return exitTimestamp; } method setExitTimestamp (line 28) | public void setExitTimestamp() { FILE: solutions/java/src/parkinglot/strategy/fee/FeeStrategy.java type FeeStrategy (line 5) | public interface FeeStrategy { method calculateFee (line 6) | double calculateFee(ParkingTicket parkingTicket); FILE: solutions/java/src/parkinglot/strategy/fee/FlatRateFeeStrategy.java class FlatRateFeeStrategy (line 5) | public class FlatRateFeeStrategy implements FeeStrategy { method calculateFee (line 9) | @Override FILE: solutions/java/src/parkinglot/strategy/fee/VehicleBasedFeeStrategy.java class VehicleBasedFeeStrategy (line 8) | public class VehicleBasedFeeStrategy implements FeeStrategy { method calculateFee (line 15) | @Override FILE: solutions/java/src/parkinglot/strategy/parking/BestFitStrategy.java class BestFitStrategy (line 10) | public class BestFitStrategy implements ParkingStrategy { method findSpot (line 11) | @Override FILE: solutions/java/src/parkinglot/strategy/parking/FarthestFirstStrategy.java class FarthestFirstStrategy (line 12) | public class FarthestFirstStrategy implements ParkingStrategy { method findSpot (line 13) | @Override FILE: solutions/java/src/parkinglot/strategy/parking/NearestFirstStrategy.java class NearestFirstStrategy (line 10) | public class NearestFirstStrategy implements ParkingStrategy { method findSpot (line 11) | @Override FILE: solutions/java/src/parkinglot/strategy/parking/ParkingStrategy.java type ParkingStrategy (line 10) | public interface ParkingStrategy { method findSpot (line 11) | Optional findSpot(List floors, Vehicle vehi... FILE: solutions/java/src/parkinglot/vehicle/Bike.java class Bike (line 3) | public class Bike extends Vehicle { method Bike (line 4) | public Bike(String licenseNumber) { FILE: solutions/java/src/parkinglot/vehicle/Car.java class Car (line 3) | public class Car extends Vehicle { method Car (line 4) | public Car(String licenseNumber) { FILE: solutions/java/src/parkinglot/vehicle/Truck.java class Truck (line 3) | public class Truck extends Vehicle { method Truck (line 4) | public Truck(String licenseNumber) { FILE: solutions/java/src/parkinglot/vehicle/Vehicle.java class Vehicle (line 3) | public abstract class Vehicle { method Vehicle (line 7) | public Vehicle(String licenseNumber, VehicleSize size) { method getLicenseNumber (line 12) | public String getLicenseNumber() { return licenseNumber; } method getSize (line 13) | public VehicleSize getSize() { FILE: solutions/java/src/parkinglot/vehicle/VehicleSize.java type VehicleSize (line 3) | public enum VehicleSize { FILE: solutions/java/src/pubsubsystem/PubSubDemo.java class PubSubDemo (line 8) | public class PubSubDemo { method main (line 9) | public static void main(String[] args) throws InterruptedException { FILE: solutions/java/src/pubsubsystem/PubSubService.java class PubSubService (line 13) | public class PubSubService { method PubSubService (line 18) | private PubSubService() { method getInstance (line 24) | public static PubSubService getInstance() { method createTopic (line 28) | public void createTopic(String topicName) { method subscribe (line 33) | public void subscribe(String topicName, Subscriber subscriber) { method unsubscribe (line 41) | public void unsubscribe(String topicName, Subscriber subscriber) { method publish (line 48) | public void publish(String topicName, Message message) { method shutdown (line 55) | public void shutdown() { FILE: solutions/java/src/pubsubsystem/entities/Message.java class Message (line 5) | public class Message { method Message (line 9) | public Message(String payload) { method getPayload (line 14) | public String getPayload() { method toString (line 18) | @Override FILE: solutions/java/src/pubsubsystem/entities/Topic.java class Topic (line 9) | public class Topic { method Topic (line 14) | public Topic(String name, ExecutorService deliveryExecutor) { method getName (line 20) | public String getName() { method addSubscriber (line 24) | public void addSubscriber(Subscriber subscriber) { method removeSubscriber (line 28) | public void removeSubscriber(Subscriber subscriber) { method broadcast (line 32) | public void broadcast(Message message) { FILE: solutions/java/src/pubsubsystem/subscriber/AlertSubscriber.java class AlertSubscriber (line 5) | public class AlertSubscriber implements Subscriber { method AlertSubscriber (line 8) | public AlertSubscriber(String id) { method getId (line 12) | @Override method onMessage (line 17) | @Override FILE: solutions/java/src/pubsubsystem/subscriber/NewsSubscriber.java class NewsSubscriber (line 5) | public class NewsSubscriber implements Subscriber { method NewsSubscriber (line 8) | public NewsSubscriber(String id) { method getId (line 12) | @Override method onMessage (line 17) | @Override FILE: solutions/java/src/pubsubsystem/subscriber/Subscriber.java type Subscriber (line 5) | public interface Subscriber { method getId (line 6) | String getId(); method onMessage (line 7) | void onMessage(Message message); FILE: solutions/java/src/restaurantmanagementsystem/RestaurantManagementSystem.java class RestaurantManagementSystem (line 12) | public class RestaurantManagementSystem { method RestaurantManagementSystem (line 21) | private RestaurantManagementSystem() { method getInstance (line 30) | public static synchronized RestaurantManagementSystem getInstance() { method addMenuItem (line 37) | public MenuItem addMenuItem(String name, double price) { method removeMenuItem (line 43) | public void removeMenuItem(String itemName) { method getMenu (line 47) | public List getMenu() { method addTable (line 51) | public void addTable(int tableId, int capacity) { method reserveTable (line 55) | public Table reserveTable(int tableId) { method placeOrder (line 64) | public Order placeOrder(int tableId, List items) { method markOrderPreparing (line 75) | public void markOrderPreparing(String orderId) { method markOrderReady (line 81) | public void markOrderReady(String orderId) { method markOrderServed (line 87) | public void markOrderServed(String orderId) { method getBill (line 92) | public Bill getBill(String orderId) { method makePayment (line 100) | public void makePayment(Bill bill, Payment payment) { method makeReservation (line 111) | public Reservation makeReservation(String customerName, String contact... method cancelReservation (line 117) | public void cancelReservation(Reservation reservation) { method addStaff (line 121) | public void addStaff(Staff staff) { method removeStaff (line 125) | public void removeStaff(Staff staff) { method notifyKitchen (line 129) | private void notifyKitchen(Order order) { method notifyStaff (line 134) | private void notifyStaff(Order order) { FILE: solutions/java/src/restaurantmanagementsystem/RestaurantManagementSystemDemo.java class RestaurantManagementSystemDemo (line 8) | public class RestaurantManagementSystemDemo { method run (line 9) | public static void run() { FILE: solutions/java/src/restaurantmanagementsystem/RestaurantManagementSystemFacade.java class RestaurantManagementSystemFacade (line 14) | public class RestaurantManagementSystemFacade { method RestaurantManagementSystemFacade (line 20) | private RestaurantManagementSystemFacade() { method getInstance (line 25) | public static synchronized RestaurantManagementSystemFacade getInstanc... method addTable (line 32) | public Table addTable(int id, int capacity) { method addWaiter (line 38) | public Waiter addWaiter(String id, String name) { method addChef (line 44) | public Chef addChef(String id, String name) { method addMenuItem (line 50) | public MenuItem addMenuItem(String id, String name, double price) { method takeOrder (line 56) | public Order takeOrder(int tableId, String waiterId, List menu... method markItemsAsReady (line 83) | public void markItemsAsReady(int orderId) { method serveOrder (line 93) | public void serveOrder(String waiterId, int orderId) { method generateBill (line 101) | public Bill generateBill(int orderId) { FILE: solutions/java/src/restaurantmanagementsystem/command/Command.java type Command (line 3) | public interface Command { method execute (line 4) | void execute(); FILE: solutions/java/src/restaurantmanagementsystem/command/PrepareOrderCommand.java class PrepareOrderCommand (line 6) | public class PrepareOrderCommand implements Command { method PrepareOrderCommand (line 10) | public PrepareOrderCommand(Order order, Chef chef) { method execute (line 15) | @Override FILE: solutions/java/src/restaurantmanagementsystem/command/ServeOrderCommand.java class ServeOrderCommand (line 6) | public class ServeOrderCommand implements Command{ method ServeOrderCommand (line 10) | public ServeOrderCommand(Order order, Waiter waiter) { method execute (line 15) | @Override FILE: solutions/java/src/restaurantmanagementsystem/decorator/BaseBill.java class BaseBill (line 5) | public class BaseBill implements BillComponent { method BaseBill (line 7) | public BaseBill(Order order) { this.order = order; } method calculateTotal (line 9) | @Override method getDescription (line 12) | @Override FILE: solutions/java/src/restaurantmanagementsystem/decorator/Bill.java class Bill (line 3) | public class Bill { method Bill (line 6) | public Bill(BillComponent component) { method printBill (line 10) | public void printBill() { FILE: solutions/java/src/restaurantmanagementsystem/decorator/BillComponent.java type BillComponent (line 3) | public interface BillComponent { method calculateTotal (line 4) | double calculateTotal(); method getDescription (line 5) | String getDescription(); FILE: solutions/java/src/restaurantmanagementsystem/decorator/BillDecorator.java class BillDecorator (line 3) | public abstract class BillDecorator implements BillComponent { method BillDecorator (line 6) | public BillDecorator(BillComponent component) { method calculateTotal (line 10) | @Override method getDescription (line 15) | @Override FILE: solutions/java/src/restaurantmanagementsystem/decorator/ServiceChargeDecorator.java class ServiceChargeDecorator (line 3) | public class ServiceChargeDecorator extends BillDecorator { method ServiceChargeDecorator (line 6) | public ServiceChargeDecorator(BillComponent component, double charge) { method calculateTotal (line 11) | @Override method getDescription (line 16) | @Override FILE: solutions/java/src/restaurantmanagementsystem/decorator/TaxDecorator.java class TaxDecorator (line 3) | public class TaxDecorator extends BillDecorator { method TaxDecorator (line 6) | public TaxDecorator(BillComponent component, double taxRate) { method calculateTotal (line 11) | @Override method getDescription (line 16) | @Override FILE: solutions/java/src/restaurantmanagementsystem/enums/TableStatus.java type TableStatus (line 3) | public enum TableStatus { FILE: solutions/java/src/restaurantmanagementsystem/model/Chef.java class Chef (line 5) | public class Chef extends Staff { method Chef (line 6) | public Chef(String id, String name) { method prepareOrder (line 10) | public void prepareOrder(Order order) { FILE: solutions/java/src/restaurantmanagementsystem/model/Menu.java class Menu (line 6) | public class Menu { method addItem (line 9) | public void addItem(MenuItem item) { method getItem (line 13) | public MenuItem getItem(String id) { FILE: solutions/java/src/restaurantmanagementsystem/model/MenuItem.java class MenuItem (line 3) | public class MenuItem { method MenuItem (line 8) | public MenuItem(String id, String name, double price) { method getId (line 14) | public String getId() { return id; } method getName (line 15) | public String getName() { return name; } method getPrice (line 16) | public double getPrice() { return price; } FILE: solutions/java/src/restaurantmanagementsystem/model/Order.java class Order (line 6) | public class Order { method Order (line 11) | public Order(int orderId, int tableId) { method addItem (line 16) | public void addItem(OrderItem item) { method getTotalPrice (line 20) | public double getTotalPrice() { method getOrderId (line 26) | public int getOrderId() { return orderId; } method getTableId (line 27) | public int getTableId() { return tableId; } method getOrderItems (line 28) | public List getOrderItems() { return items; } FILE: solutions/java/src/restaurantmanagementsystem/model/OrderItem.java class OrderItem (line 10) | public class OrderItem { method OrderItem (line 16) | public OrderItem(MenuItem menuItem, Order order) { method changeState (line 22) | public void changeState(OrderItemState newState) { method nextState (line 27) | public void nextState() { method setState (line 31) | public void setState(OrderItemState state) { method addObserver (line 35) | public void addObserver(OrderObserver observer) { method notifyObservers (line 39) | public void notifyObservers() { method getMenuItem (line 43) | public MenuItem getMenuItem() { return menuItem; } method getOrder (line 44) | public Order getOrder() { return order; } FILE: solutions/java/src/restaurantmanagementsystem/model/Restaurant.java class Restaurant (line 7) | public class Restaurant { method Restaurant (line 14) | private Restaurant() {} method getInstance (line 16) | public static Restaurant getInstance() { method addWaiter (line 20) | public void addWaiter(Waiter waiter) { waiters.put(waiter.getId(), wai... method getWaiter (line 21) | public Waiter getWaiter(String id) { return waiters.get(id); } method addChef (line 23) | public void addChef(Chef chef) { chefs.put(chef.getId(), chef); } method getChef (line 24) | public Chef getChef(String id) { return chefs.get(id); } method getChefs (line 26) | public List getChefs() { method getWaiters (line 30) | public List getWaiters() { method addTable (line 34) | public void addTable(Table table) { tables.put(table.getId(), table); } method getMenu (line 36) | public Menu getMenu() { return menu; } FILE: solutions/java/src/restaurantmanagementsystem/model/Staff.java class Staff (line 3) | public abstract class Staff { method Staff (line 7) | public Staff(String id, String name) { method getId (line 12) | public String getId() { return id; } method getName (line 13) | public String getName() { return name; } FILE: solutions/java/src/restaurantmanagementsystem/model/Table.java class Table (line 5) | public class Table { method Table (line 10) | public Table(int id, int capacity) { method getId (line 16) | public int getId() { return id; } method getCapacity (line 17) | public int getCapacity() { return capacity; } method getStatus (line 18) | public TableStatus getStatus() { return status; } method setStatus (line 19) | public void setStatus(TableStatus status) { this.status = status; } FILE: solutions/java/src/restaurantmanagementsystem/model/Waiter.java class Waiter (line 6) | public class Waiter extends Staff implements OrderObserver { method Waiter (line 7) | public Waiter(String id, String name) { method serveOrder (line 11) | public void serveOrder(Order order) { method update (line 18) | @Override FILE: solutions/java/src/restaurantmanagementsystem/observer/OrderObserver.java type OrderObserver (line 5) | public interface OrderObserver { method update (line 6) | void update(OrderItem item); FILE: solutions/java/src/restaurantmanagementsystem/state/OrderItemState.java type OrderItemState (line 5) | public interface OrderItemState { method next (line 6) | void next(OrderItem item); method prev (line 7) | void prev(OrderItem item); method getStatus (line 8) | String getStatus(); FILE: solutions/java/src/restaurantmanagementsystem/state/OrderedState.java class OrderedState (line 5) | public class OrderedState implements OrderItemState { method next (line 6) | @Override method prev (line 11) | @Override method getStatus (line 16) | @Override FILE: solutions/java/src/restaurantmanagementsystem/state/PreparingState.java class PreparingState (line 5) | public class PreparingState implements OrderItemState { method next (line 6) | @Override method prev (line 11) | @Override method getStatus (line 16) | @Override FILE: solutions/java/src/restaurantmanagementsystem/state/ReadyForPickupState.java class ReadyForPickupState (line 5) | public class ReadyForPickupState implements OrderItemState { method next (line 6) | @Override method prev (line 12) | @Override method getStatus (line 17) | @Override FILE: solutions/java/src/restaurantmanagementsystem/state/ServedState.java class ServedState (line 5) | public class ServedState implements OrderItemState { method next (line 6) | @Override method prev (line 11) | @Override method getStatus (line 16) | @Override FILE: solutions/java/src/ridesharingservice/RideSharingService.java class RideSharingService (line 18) | public class RideSharingService { method RideSharingService (line 26) | private RideSharingService() {} method getInstance (line 28) | public static synchronized RideSharingService getInstance() { method setPricingStrategy (line 36) | public void setPricingStrategy(PricingStrategy pricingStrategy) { method setDriverMatchingStrategy (line 40) | public void setDriverMatchingStrategy(DriverMatchingStrategy driverMat... method registerRider (line 44) | public Rider registerRider(String name, String contact) { method registerDriver (line 50) | public Driver registerDriver(String name, String contact, Vehicle vehi... method requestRide (line 56) | public Trip requestRide(String riderId, Location pickup, Location drop... method acceptRide (line 97) | public void acceptRide(String driverId, String tripId) { method startTrip (line 109) | public void startTrip(String tripId) { method endTrip (line 117) | public void endTrip(String tripId) { FILE: solutions/java/src/ridesharingservice/RideSharingServiceDemo.java class RideSharingServiceDemo (line 13) | public class RideSharingServiceDemo { method main (line 14) | public static void main(String[] args) { FILE: solutions/java/src/ridesharingservice/entities/Driver.java class Driver (line 6) | public class Driver extends User { method Driver (line 11) | public Driver(String name, String contact, Vehicle vehicle, Location i... method getVehicle (line 18) | public Vehicle getVehicle() { method getStatus (line 22) | public DriverStatus getStatus() { method setStatus (line 26) | public void setStatus(DriverStatus status) { method getCurrentLocation (line 31) | public Location getCurrentLocation() { method setCurrentLocation (line 35) | public void setCurrentLocation(Location currentLocation) { method onUpdate (line 39) | @Override public void onUpdate(Trip trip) { FILE: solutions/java/src/ridesharingservice/entities/Location.java class Location (line 3) | public class Location { method Location (line 7) | public Location(double latitude, double longitude) { method distanceTo (line 12) | public double distanceTo(Location other) { method toString (line 18) | @Override FILE: solutions/java/src/ridesharingservice/entities/Trip.java class Trip (line 14) | public class Trip { method Trip (line 26) | private Trip(TripBuilder builder) { method addObserver (line 36) | public void addObserver(TripObserver observer) { method notifyObservers (line 40) | private void notifyObservers() { method assignDriver (line 44) | public void assignDriver(Driver driver) { method startTrip (line 50) | public void startTrip() { method endTrip (line 55) | public void endTrip() { method getId (line 61) | public String getId() { return id; } method getRider (line 62) | public Rider getRider() { return rider; } method getDriver (line 63) | public Driver getDriver() { return driver; } method getPickupLocation (line 64) | public Location getPickupLocation() { return pickupLocation; } method getDropoffLocation (line 65) | public Location getDropoffLocation() { return dropoffLocation; } method getFare (line 66) | public double getFare() { return fare; } method getStatus (line 67) | public TripStatus getStatus() { return status; } method setState (line 70) | public void setState(TripState state) { method setStatus (line 74) | public void setStatus(TripStatus status) { method setDriver (line 78) | public void setDriver(Driver driver) { class TripBuilder (line 83) | public static class TripBuilder { method TripBuilder (line 90) | public TripBuilder() { method withRider (line 94) | public TripBuilder withRider(Rider rider) { method withPickupLocation (line 99) | public TripBuilder withPickupLocation(Location pickupLocation) { method withDropoffLocation (line 104) | public TripBuilder withDropoffLocation(Location dropoffLocation) { method withFare (line 109) | public TripBuilder withFare(double fare) { method build (line 114) | public Trip build() { method toString (line 123) | @Override FILE: solutions/java/src/ridesharingservice/entities/User.java class User (line 9) | public abstract class User implements TripObserver { method User (line 15) | public User(String name, String contact) { method addTripToHistory (line 22) | public void addTripToHistory(Trip trip) { method getTripHistory (line 26) | public List getTripHistory() { method getId (line 30) | public String getId() { method getName (line 34) | public String getName() { method getContact (line 38) | public String getContact() { FILE: solutions/java/src/ridesharingservice/entities/Vehicle.java class Vehicle (line 5) | public class Vehicle { method Vehicle (line 10) | public Vehicle(String licenseNumber, String model, RideType type) { method getLicenseNumber (line 16) | public String getLicenseNumber() { return licenseNumber; } method getModel (line 18) | public String getModel() { return model; } method getType (line 20) | public RideType getType() { return type; } FILE: solutions/java/src/ridesharingservice/enums/DriverStatus.java type DriverStatus (line 3) | public enum DriverStatus { FILE: solutions/java/src/ridesharingservice/enums/RideType.java type RideType (line 3) | public enum RideType { FILE: solutions/java/src/ridesharingservice/enums/TripStatus.java type TripStatus (line 3) | public enum TripStatus { FILE: solutions/java/src/ridesharingservice/observer/Rider.java class Rider (line 6) | public class Rider extends User { method Rider (line 7) | public Rider(String name, String contact) { method onUpdate (line 11) | @Override FILE: solutions/java/src/ridesharingservice/observer/TripObserver.java type TripObserver (line 5) | public interface TripObserver { method onUpdate (line 6) | void onUpdate(Trip trip); FILE: solutions/java/src/ridesharingservice/state/AssignedState.java class AssignedState (line 7) | public class AssignedState implements TripState { method request (line 8) | @Override method assign (line 13) | @Override method start (line 18) | @Override method end (line 24) | @Override FILE: solutions/java/src/ridesharingservice/state/CompletedState.java class CompletedState (line 6) | public class CompletedState implements TripState { method request (line 7) | @Override method assign (line 12) | @Override method start (line 17) | @Override method end (line 22) | @Override FILE: solutions/java/src/ridesharingservice/state/InProgressState.java class InProgressState (line 7) | public class InProgressState implements TripState { method request (line 8) | @Override method assign (line 13) | @Override method start (line 18) | @Override method end (line 23) | @Override FILE: solutions/java/src/ridesharingservice/state/RequestedState.java class RequestedState (line 7) | public class RequestedState implements TripState { method request (line 8) | @Override method assign (line 13) | @Override method start (line 20) | @Override method end (line 25) | @Override FILE: solutions/java/src/ridesharingservice/state/TripState.java type TripState (line 6) | public interface TripState { method request (line 7) | void request(Trip trip); method assign (line 8) | void assign(Trip trip, Driver driver); method start (line 9) | void start(Trip trip); method end (line 10) | void end(Trip trip); FILE: solutions/java/src/ridesharingservice/strategy/matching/DriverMatchingStrategy.java type DriverMatchingStrategy (line 9) | public interface DriverMatchingStrategy { method findDrivers (line 10) | List findDrivers(List allDrivers, Location pickupLocat... FILE: solutions/java/src/ridesharingservice/strategy/matching/NearestDriverMatchingStrategy.java class NearestDriverMatchingStrategy (line 12) | public class NearestDriverMatchingStrategy implements DriverMatchingStra... method findDrivers (line 15) | @Override FILE: solutions/java/src/ridesharingservice/strategy/pricing/FlatRatePricingStrategy.java class FlatRatePricingStrategy (line 6) | public class FlatRatePricingStrategy implements PricingStrategy { method calculateFare (line 10) | @Override FILE: solutions/java/src/ridesharingservice/strategy/pricing/PricingStrategy.java type PricingStrategy (line 6) | public interface PricingStrategy { method calculateFare (line 7) | double calculateFare(Location pickup, Location dropoff, RideType rideT... FILE: solutions/java/src/ridesharingservice/strategy/pricing/VehicleBasedPricingStrategy.java class VehicleBasedPricingStrategy (line 8) | public class VehicleBasedPricingStrategy implements PricingStrategy { method calculateFare (line 16) | @Override FILE: solutions/java/src/snakeandladdergame/Game.java class Game (line 13) | public class Game { method Game (line 20) | private Game(Builder builder) { method play (line 27) | public void play() { method takeTurn (line 52) | private void takeTurn(Player player) { class Builder (line 91) | public static class Builder { method setBoard (line 96) | public Builder setBoard(int boardSize, List boardEntiti... method setPlayers (line 101) | public Builder setPlayers(List playerNames) { method setDice (line 109) | public Builder setDice(Dice dice) { method build (line 114) | public Game build() { FILE: solutions/java/src/snakeandladdergame/SnakeAndLadderDemo.java class SnakeAndLadderDemo (line 11) | public class SnakeAndLadderDemo { method main (line 12) | public static void main(String[] args) { FILE: solutions/java/src/snakeandladdergame/enums/GameStatus.java type GameStatus (line 3) | public enum GameStatus { FILE: solutions/java/src/snakeandladdergame/models/Board.java class Board (line 7) | public class Board { method Board (line 11) | public Board(int size, List entities) { method getSize (line 20) | public int getSize() { method getFinalPosition (line 24) | public int getFinalPosition(int position) { FILE: solutions/java/src/snakeandladdergame/models/BoardEntity.java class BoardEntity (line 3) | public abstract class BoardEntity { method BoardEntity (line 7) | public BoardEntity(int start, int end) { method getStart (line 12) | public int getStart() { method getEnd (line 16) | public int getEnd() { FILE: solutions/java/src/snakeandladdergame/models/Dice.java class Dice (line 3) | public class Dice { method Dice (line 7) | public Dice(int minValue, int maxValue) { method roll (line 12) | public int roll() { FILE: solutions/java/src/snakeandladdergame/models/Ladder.java class Ladder (line 3) | public class Ladder extends BoardEntity { method Ladder (line 4) | public Ladder(int start, int end) { FILE: solutions/java/src/snakeandladdergame/models/Player.java class Player (line 3) | public class Player { method Player (line 7) | public Player(String name) { method getName (line 12) | public String getName() { method getPosition (line 16) | public int getPosition() { method setPosition (line 20) | public void setPosition(int position) { FILE: solutions/java/src/snakeandladdergame/models/Snake.java class Snake (line 3) | public class Snake extends BoardEntity { method Snake (line 4) | public Snake(int start, int end) { FILE: solutions/java/src/socialnetworkingservice/SocialNetworkDemo.java class SocialNetworkDemo (line 8) | public class SocialNetworkDemo { method main (line 9) | public static void main(String[] args) { method printFeed (line 48) | private static void printFeed(List feed) { FILE: solutions/java/src/socialnetworkingservice/SocialNetworkFacade.java class SocialNetworkFacade (line 12) | public class SocialNetworkFacade { method SocialNetworkFacade (line 17) | public SocialNetworkFacade() { method createUser (line 25) | public User createUser(String name, String email) { method addFriend (line 29) | public void addFriend(String userId1, String userId2) { method createPost (line 33) | public Post createPost(String authorId, String content) { method addComment (line 38) | public void addComment(String userId, String postId, String content) { method likePost (line 43) | public void likePost(String userId, String postId) { method getNewsFeed (line 48) | public List getNewsFeed(String userId) { FILE: solutions/java/src/socialnetworkingservice/model/Comment.java class Comment (line 5) | public class Comment extends CommentableEntity { method Comment (line 6) | public Comment(User author, String content) { method getReplies (line 10) | public List getReplies() { FILE: solutions/java/src/socialnetworkingservice/model/CommentableEntity.java class CommentableEntity (line 6) | public abstract class CommentableEntity { method CommentableEntity (line 14) | public CommentableEntity(User author, String content) { method addLike (line 21) | public void addLike(User user) { method addComment (line 25) | public void addComment(Comment comment) { method getId (line 29) | public String getId() { return id; } method getAuthor (line 30) | public User getAuthor() { return author; } method getContent (line 31) | public String getContent() { return content; } method getTimestamp (line 32) | public LocalDateTime getTimestamp() { return timestamp; } method getComments (line 33) | public List getComments() { return comments; } method getLikes (line 34) | public Set getLikes() { FILE: solutions/java/src/socialnetworkingservice/model/Post.java class Post (line 3) | public class Post extends CommentableEntity { method Post (line 4) | public Post(User author, String content) { FILE: solutions/java/src/socialnetworkingservice/model/User.java class User (line 5) | public class User { method User (line 12) | public User(String name, String email) { method addFriend (line 18) | public void addFriend(User friend) { method addPost (line 22) | public void addPost(Post post) { method getId (line 26) | public String getId() { return id; } method getName (line 27) | public String getName() { return name; } method getFriends (line 28) | public Set getFriends() { return friends; } method getPosts (line 29) | public List getPosts() { return posts; } FILE: solutions/java/src/socialnetworkingservice/observer/PostObserver.java type PostObserver (line 7) | public interface PostObserver { method onPostCreated (line 8) | void onPostCreated(Post post); method onLike (line 9) | void onLike(Post post, User user); method onComment (line 10) | void onComment(Post post, Comment comment); FILE: solutions/java/src/socialnetworkingservice/observer/UserNotifier.java class UserNotifier (line 7) | public class UserNotifier implements PostObserver { method onPostCreated (line 8) | @Override method onLike (line 16) | @Override method onComment (line 22) | @Override FILE: solutions/java/src/socialnetworkingservice/repository/PostRepository.java class PostRepository (line 8) | public class PostRepository { method PostRepository (line 12) | private PostRepository() {} method getInstance (line 14) | public static PostRepository getInstance() { return INSTANCE; } method save (line 16) | public void save(Post post) { method findById (line 20) | public Post findById(String id) { FILE: solutions/java/src/socialnetworkingservice/repository/UserRepository.java class UserRepository (line 8) | public class UserRepository { method UserRepository (line 12) | private UserRepository() {} method getInstance (line 14) | public static UserRepository getInstance() { method save (line 18) | public void save(User user) { method findById (line 22) | public User findById(String id) { FILE: solutions/java/src/socialnetworkingservice/service/NewsFeedService.java class NewsFeedService (line 10) | public class NewsFeedService { method NewsFeedService (line 13) | public NewsFeedService() { method setStrategy (line 17) | public void setStrategy(NewsFeedGenerationStrategy strategy) { method getNewsFeed (line 21) | public List getNewsFeed(User user) { FILE: solutions/java/src/socialnetworkingservice/service/PostService.java class PostService (line 12) | public class PostService { method addObserver (line 16) | public void addObserver(PostObserver observer) { observers.add(observe... method createPost (line 18) | public Post createPost(User author, String content) { method likePost (line 26) | public void likePost(User user, String postId) { method addComment (line 32) | public void addComment(User author, String commentableId, String conte... FILE: solutions/java/src/socialnetworkingservice/service/UserService.java class UserService (line 6) | public class UserService { method createUser (line 9) | public User createUser(String name, String email) { method addFriend (line 15) | public void addFriend(String userId1, String userId2) { method getUserById (line 23) | public User getUserById(String userId) { FILE: solutions/java/src/socialnetworkingservice/strategy/ChronologicalStrategy.java class ChronologicalStrategy (line 10) | public class ChronologicalStrategy implements NewsFeedGenerationStrategy { method generateFeed (line 11) | @Override FILE: solutions/java/src/socialnetworkingservice/strategy/NewsFeedGenerationStrategy.java type NewsFeedGenerationStrategy (line 8) | public interface NewsFeedGenerationStrategy { method generateFeed (line 9) | List generateFeed(User user); FILE: solutions/java/src/splitwise/SplitwiseDemo.java class SplitwiseDemo (line 15) | public class SplitwiseDemo { method main (line 16) | public static void main(String[] args) { FILE: solutions/java/src/splitwise/SplitwiseService.java class SplitwiseService (line 8) | public class SplitwiseService { method SplitwiseService (line 13) | private SplitwiseService() {} method getInstance (line 15) | public static synchronized SplitwiseService getInstance() { method addUser (line 23) | public User addUser(String name, String email) { method addGroup (line 29) | public Group addGroup(String name, List members) { method getUser (line 35) | public User getUser(String id) { return users.get(id); } method getGroup (line 36) | public Group getGroup(String id) { return groups.get(id); } method createExpense (line 39) | public synchronized void createExpense(Expense.ExpenseBuilder builder) { method settleUp (line 55) | public synchronized void settleUp(String payerId, String payeeId, doub... method showBalanceSheet (line 65) | public void showBalanceSheet(String userId) { method simplifyGroupDebts (line 70) | public List simplifyGroupDebts(String groupId) { FILE: solutions/java/src/splitwise/entities/BalanceSheet.java class BalanceSheet (line 6) | public class BalanceSheet { method BalanceSheet (line 15) | public BalanceSheet(User owner) { method getBalances (line 19) | public Map getBalances() { method adjustBalance (line 23) | public synchronized void adjustBalance(User otherUser, double amount) { method showBalances (line 30) | public void showBalances() { FILE: solutions/java/src/splitwise/entities/Expense.java class Expense (line 8) | public class Expense { method Expense (line 16) | private Expense(ExpenseBuilder builder) { method getId (line 28) | public String getId() { return id; } method getDescription (line 29) | public String getDescription() { return description; } method getAmount (line 30) | public double getAmount() { return amount; } method getPaidBy (line 31) | public User getPaidBy() { return paidBy; } method getSplits (line 32) | public List getSplits() { return splits; } class ExpenseBuilder (line 35) | public static class ExpenseBuilder { method setId (line 44) | public ExpenseBuilder setId(String id) { this.id = id; return this; } method setDescription (line 45) | public ExpenseBuilder setDescription(String description) { this.desc... method setAmount (line 46) | public ExpenseBuilder setAmount(double amount) { this.amount = amoun... method setPaidBy (line 47) | public ExpenseBuilder setPaidBy(User paidBy) { this.paidBy = paidBy;... method setParticipants (line 48) | public ExpenseBuilder setParticipants(List participants) { thi... method setSplitStrategy (line 49) | public ExpenseBuilder setSplitStrategy(SplitStrategy splitStrategy) ... method setSplitValues (line 50) | public ExpenseBuilder setSplitValues(List splitValues) { thi... method build (line 52) | public Expense build() { FILE: solutions/java/src/splitwise/entities/Group.java class Group (line 7) | public class Group { method Group (line 12) | public Group(String name, List members) { method getId (line 18) | public String getId() { method getName (line 22) | public String getName() { method getMembers (line 26) | public List getMembers() { FILE: solutions/java/src/splitwise/entities/Split.java class Split (line 3) | public class Split { method Split (line 7) | public Split(User user, double amount) { method getUser (line 12) | public User getUser() { return user; } method getAmount (line 13) | public double getAmount() { return amount; } FILE: solutions/java/src/splitwise/entities/Transaction.java class Transaction (line 3) | public class Transaction { method Transaction (line 8) | public Transaction(User from, User to, double amount) { method toString (line 14) | @Override FILE: solutions/java/src/splitwise/entities/User.java class User (line 5) | public class User { method User (line 11) | public User(String name, String email) { method getId (line 18) | public String getId() { method getName (line 22) | public String getName() { method getBalanceSheet (line 26) | public BalanceSheet getBalanceSheet() { FILE: solutions/java/src/splitwise/strategy/EqualSplitStrategy.java class EqualSplitStrategy (line 9) | public class EqualSplitStrategy implements SplitStrategy { method calculateSplits (line 10) | @Override FILE: solutions/java/src/splitwise/strategy/ExactSplitStrategy.java class ExactSplitStrategy (line 9) | public class ExactSplitStrategy implements SplitStrategy { method calculateSplits (line 10) | @Override FILE: solutions/java/src/splitwise/strategy/PercentageSplitStrategy.java class PercentageSplitStrategy (line 9) | public class PercentageSplitStrategy implements SplitStrategy { method calculateSplits (line 10) | @Override FILE: solutions/java/src/splitwise/strategy/SplitStrategy.java type SplitStrategy (line 8) | public interface SplitStrategy { method calculateSplits (line 9) | List calculateSplits(double totalAmount, User paidBy, List searchQuestions(List strategies) { method getUser (line 65) | public User getUser(String userId) { method findPostById (line 69) | private Post findPostById(String postId) { FILE: solutions/java/src/stackoverflow/entities/Answer.java class Answer (line 5) | public class Answer extends Post { method Answer (line 8) | public Answer(String body, User author) { method setAccepted (line 12) | public void setAccepted(boolean accepted) { method isAccepted (line 16) | public boolean isAccepted() { return isAccepted; } FILE: solutions/java/src/stackoverflow/entities/Comment.java class Comment (line 5) | public class Comment extends Content { method Comment (line 6) | public Comment(String body, User author) { FILE: solutions/java/src/stackoverflow/entities/Content.java class Content (line 5) | public abstract class Content { method Content (line 11) | public Content(String id, String body, User author) { method getId (line 17) | public String getId() { return id; } method getBody (line 18) | public String getBody() { return body; } method getAuthor (line 19) | public User getAuthor() { return author; } FILE: solutions/java/src/stackoverflow/entities/Event.java class Event (line 5) | public class Event { method Event (line 10) | public Event(EventType type, User actor, Post targetPost) { method getType (line 16) | public EventType getType() { return type; } method getActor (line 17) | public User getActor() { return actor; } method getTargetPost (line 18) | public Post getTargetPost() { return targetPost; } FILE: solutions/java/src/stackoverflow/entities/Post.java class Post (line 14) | public abstract class Post extends Content { method Post (line 20) | public Post(String id, String body, User author) { method addObserver (line 24) | public void addObserver(PostObserver observer) { method notifyObservers (line 28) | protected void notifyObservers(Event event) { method vote (line 32) | public synchronized void vote(User user, VoteType voteType) { FILE: solutions/java/src/stackoverflow/entities/Question.java class Question (line 7) | public class Question extends Post { method Question (line 13) | public Question(String title, String body, User author, Set tags) { method addAnswer (line 19) | public void addAnswer(Answer answer) { this.answers.add(answer); } method acceptAnswer (line 21) | public synchronized void acceptAnswer(Answer answer) { method getTitle (line 29) | public String getTitle() { return title; } method getTags (line 30) | public Set getTags() { return tags; } method getAnswers (line 31) | public List getAnswers() { return answers; } FILE: solutions/java/src/stackoverflow/entities/Tag.java class Tag (line 3) | public class Tag { method Tag (line 6) | public Tag(String name) { this.name = name; } method getName (line 8) | public String getName() { return name; } FILE: solutions/java/src/stackoverflow/entities/User.java class User (line 6) | public class User { method User (line 11) | public User(String name) { method updateReputation (line 17) | public void updateReputation(int change) { method getId (line 21) | public String getId() { return id; } method getName (line 22) | public String getName() { return name; } method getReputation (line 23) | public int getReputation() { return reputation.get(); } FILE: solutions/java/src/stackoverflow/enums/EventType.java type EventType (line 3) | public enum EventType { FILE: solutions/java/src/stackoverflow/enums/VoteType.java type VoteType (line 3) | public enum VoteType { FILE: solutions/java/src/stackoverflow/observer/PostObserver.java type PostObserver (line 5) | public interface PostObserver { method onPostEvent (line 6) | void onPostEvent(Event event); FILE: solutions/java/src/stackoverflow/observer/ReputationManager.java class ReputationManager (line 6) | public class ReputationManager implements PostObserver { method onPostEvent (line 13) | @Override FILE: solutions/java/src/stackoverflow/strategy/KeywordSearchStrategy.java class KeywordSearchStrategy (line 8) | public class KeywordSearchStrategy implements SearchStrategy { method KeywordSearchStrategy (line 11) | public KeywordSearchStrategy(String keyword) { method filter (line 15) | @Override FILE: solutions/java/src/stackoverflow/strategy/SearchStrategy.java type SearchStrategy (line 7) | public interface SearchStrategy { method filter (line 8) | List filter(List questions); FILE: solutions/java/src/stackoverflow/strategy/TagSearchStrategy.java class TagSearchStrategy (line 9) | public class TagSearchStrategy implements SearchStrategy { method TagSearchStrategy (line 12) | public TagSearchStrategy(Tag tag) { method filter (line 16) | @Override FILE: solutions/java/src/stackoverflow/strategy/UserSearchStrategy.java class UserSearchStrategy (line 9) | public class UserSearchStrategy implements SearchStrategy { method UserSearchStrategy (line 12) | public UserSearchStrategy(User user) { method filter (line 16) | @Override FILE: solutions/java/src/taskmanagementsystem/TaskManagementSystem.java class TaskManagementSystem (line 18) | public class TaskManagementSystem { method TaskManagementSystem (line 24) | private TaskManagementSystem() { method getInstance (line 30) | public static synchronized TaskManagementSystem getInstance() { method createUser (line 37) | public User createUser(String name, String email) { method createTaskList (line 43) | public TaskList createTaskList(String listName) { method createTask (line 49) | public Task createTask(String title, String description, LocalDate due... method listTasksByUser (line 68) | public List listTasksByUser(String userId) { method listTasksByStatus (line 75) | public List listTasksByStatus(TaskStatus status) { method deleteTask (line 81) | public void deleteTask(String taskId) { method searchTasks (line 85) | public List searchTasks(String keyword, TaskSortStrategy sorting... FILE: solutions/java/src/taskmanagementsystem/TaskManagementSystemDemo.java class TaskManagementSystemDemo (line 13) | public class TaskManagementSystemDemo { method main (line 14) | public static void main(String[] args) { FILE: solutions/java/src/taskmanagementsystem/enums/TaskPriority.java type TaskPriority (line 3) | public enum TaskPriority { FILE: solutions/java/src/taskmanagementsystem/enums/TaskStatus.java type TaskStatus (line 3) | public enum TaskStatus { FILE: solutions/java/src/taskmanagementsystem/models/ActivityLog.java class ActivityLog (line 5) | public class ActivityLog { method ActivityLog (line 9) | public ActivityLog(String description) { method toString (line 14) | @Override FILE: solutions/java/src/taskmanagementsystem/models/Comment.java class Comment (line 6) | public class Comment { method Comment (line 12) | public Comment(String content, User author) { method getAuthor (line 19) | public User getAuthor() { FILE: solutions/java/src/taskmanagementsystem/models/Tag.java class Tag (line 3) | public class Tag { method Tag (line 6) | public Tag(String name) { this.name = name; } method getName (line 8) | public String getName() { return name; } FILE: solutions/java/src/taskmanagementsystem/models/Task.java class Task (line 12) | public class Task { method Task (line 27) | private Task(TaskBuilder builder) { method setAssignee (line 44) | public synchronized void setAssignee(User user) { method updatePriority (line 50) | public synchronized void updatePriority(TaskPriority priority) { method addComment (line 55) | public synchronized void addComment(Comment comment) { method addSubtask (line 61) | public synchronized void addSubtask(Task subtask) { method setState (line 68) | public void setState(TaskState state) { method startProgress (line 73) | public void startProgress() { currentState.startProgress(this); } method completeTask (line 74) | public void completeTask() { currentState.completeTask(this); } method reopenTask (line 75) | public void reopenTask() { currentState.reopenTask(this); } method addObserver (line 78) | public void addObserver(TaskObserver observer) { observers.add(observe... method removeObserver (line 79) | public void removeObserver(TaskObserver observer) { observers.remove(o... method notifyObservers (line 80) | public void notifyObservers(String changeType) { method addLog (line 85) | public void addLog(String logDescription) { method isComposite (line 89) | public boolean isComposite() { return !subtasks.isEmpty(); } method display (line 91) | public void display(String indent) { method getId (line 101) | public String getId() { method getTitle (line 104) | public String getTitle() { method getDescription (line 107) | public String getDescription() { method getPriority (line 110) | public TaskPriority getPriority() { method getDueDate (line 113) | public LocalDate getDueDate() { method getAssignee (line 116) | public User getAssignee() { method setTitle (line 119) | public void setTitle(String title) { method setDescription (line 122) | public void setDescription(String description) { method getStatus (line 126) | public TaskStatus getStatus() { class TaskBuilder (line 131) | public static class TaskBuilder { method TaskBuilder (line 141) | public TaskBuilder(String title) { method description (line 146) | public TaskBuilder description(String description) { this.descriptio... method dueDate (line 147) | public TaskBuilder dueDate(LocalDate dueDate) { this.dueDate = dueDa... method priority (line 148) | public TaskBuilder priority(TaskPriority priority) { this.priority =... method assignee (line 149) | public TaskBuilder assignee(User assignee) { this.assignee = assigne... method createdBy (line 150) | public TaskBuilder createdBy(User createdBy) { this.createdBy = crea... method tags (line 151) | public TaskBuilder tags(Set tags) { this.tags = tags; return th... method build (line 153) | public Task build() { FILE: solutions/java/src/taskmanagementsystem/models/TaskList.java class TaskList (line 8) | public class TaskList { method TaskList (line 13) | public TaskList(String name) { method addTask (line 19) | public void addTask(Task task) { method getTasks (line 23) | public List getTasks() { method getId (line 28) | public String getId() { return id; } method getName (line 29) | public String getName() { return name; } method display (line 31) | public void display() { FILE: solutions/java/src/taskmanagementsystem/models/User.java class User (line 5) | public class User { method User (line 10) | public User(String name, String email) { method getId (line 17) | public String getId() { method getEmail (line 21) | public String getEmail() { method getName (line 25) | public String getName() { FILE: solutions/java/src/taskmanagementsystem/observer/ActivityLogger.java class ActivityLogger (line 5) | public class ActivityLogger implements TaskObserver { method update (line 6) | @Override FILE: solutions/java/src/taskmanagementsystem/observer/TaskObserver.java type TaskObserver (line 5) | public interface TaskObserver { method update (line 6) | void update(Task task, String changeType); FILE: solutions/java/src/taskmanagementsystem/state/DoneState.java class DoneState (line 6) | public class DoneState implements TaskState { method startProgress (line 7) | @Override method completeTask (line 11) | @Override method reopenTask (line 15) | @Override method getStatus (line 19) | @Override FILE: solutions/java/src/taskmanagementsystem/state/InProgressState.java class InProgressState (line 6) | public class InProgressState implements TaskState { method startProgress (line 7) | @Override method completeTask (line 11) | @Override method reopenTask (line 15) | @Override method getStatus (line 19) | @Override FILE: solutions/java/src/taskmanagementsystem/state/TaskState.java type TaskState (line 6) | public interface TaskState { method startProgress (line 7) | void startProgress(Task task); method completeTask (line 8) | void completeTask(Task task); method reopenTask (line 9) | void reopenTask(Task task); method getStatus (line 10) | TaskStatus getStatus(); FILE: solutions/java/src/taskmanagementsystem/state/TodoState.java class TodoState (line 6) | public class TodoState implements TaskState { method startProgress (line 7) | @Override method completeTask (line 11) | @Override method reopenTask (line 15) | @Override method getStatus (line 19) | @Override FILE: solutions/java/src/taskmanagementsystem/strategy/SortByDueDate.java class SortByDueDate (line 8) | public class SortByDueDate implements TaskSortStrategy { method sort (line 9) | @Override FILE: solutions/java/src/taskmanagementsystem/strategy/SortByPriority.java class SortByPriority (line 8) | public class SortByPriority implements TaskSortStrategy { method sort (line 9) | @Override FILE: solutions/java/src/taskmanagementsystem/strategy/TaskSortStrategy.java type TaskSortStrategy (line 7) | public interface TaskSortStrategy { method sort (line 8) | void sort(List tasks); FILE: solutions/java/src/tictactoe/Game.java class Game (line 16) | public class Game extends GameSubject { method Game (line 26) | public Game(Player player1, Player player2) { method makeMove (line 40) | public void makeMove(Player player, int row, int col) { method checkWinner (line 44) | public boolean checkWinner(Player player) { method switchPlayer (line 53) | public void switchPlayer() { method getBoard (line 57) | public Board getBoard() { return board; } method getCurrentPlayer (line 58) | public Player getCurrentPlayer() { return currentPlayer; } method getWinner (line 59) | public Player getWinner() { return winner; } method setWinner (line 60) | public void setWinner(Player winner) { this.winner = winner; } method getStatus (line 61) | public GameStatus getStatus() { return status; } method setState (line 62) | public void setState(GameState state) { this.state = state; } method setStatus (line 63) | public void setStatus(GameStatus status) { FILE: solutions/java/src/tictactoe/TicTacToeDemo.java class TicTacToeDemo (line 6) | public class TicTacToeDemo { method main (line 7) | public static void main(String[] args) { FILE: solutions/java/src/tictactoe/TicTacToeSystem.java class TicTacToeSystem (line 7) | public class TicTacToeSystem { method TicTacToeSystem (line 12) | private TicTacToeSystem() { method getInstance (line 16) | public static synchronized TicTacToeSystem getInstance() { method createGame (line 23) | public void createGame(Player player1, Player player2) { method makeMove (line 31) | public void makeMove(Player player, int row, int col) { method printBoard (line 49) | public void printBoard() { method printScoreBoard (line 53) | public void printScoreBoard() { FILE: solutions/java/src/tictactoe/enums/GameStatus.java type GameStatus (line 3) | public enum GameStatus { FILE: solutions/java/src/tictactoe/enums/Symbol.java type Symbol (line 3) | public enum Symbol { method Symbol (line 10) | Symbol(char symbol) { method getChar (line 14) | public char getChar() { FILE: solutions/java/src/tictactoe/exceptions/InvalidMoveException.java class InvalidMoveException (line 3) | public class InvalidMoveException extends RuntimeException { method InvalidMoveException (line 4) | public InvalidMoveException(String message) { FILE: solutions/java/src/tictactoe/models/Board.java class Board (line 6) | public class Board { method Board (line 11) | public Board(int size) { method initializeBoard (line 18) | private void initializeBoard() { method placeSymbol (line 26) | public boolean placeSymbol(int row, int col, Symbol symbol) { method getCell (line 38) | public Cell getCell(int row, int col) { method isFull (line 45) | public boolean isFull() { method printBoard (line 49) | public void printBoard() { method getSize (line 61) | public int getSize() { FILE: solutions/java/src/tictactoe/models/Cell.java class Cell (line 5) | public class Cell { method Cell (line 8) | public Cell() { method getSymbol (line 12) | public Symbol getSymbol() { method setSymbol (line 16) | public void setSymbol(Symbol symbol) { FILE: solutions/java/src/tictactoe/models/Player.java class Player (line 5) | public class Player { method Player (line 9) | public Player(String name, Symbol symbol) { method getName (line 14) | public String getName() { method getSymbol (line 18) | public Symbol getSymbol() { FILE: solutions/java/src/tictactoe/observer/GameObserver.java type GameObserver (line 5) | public interface GameObserver { method update (line 6) | void update(Game game); FILE: solutions/java/src/tictactoe/observer/GameSubject.java class GameSubject (line 8) | public abstract class GameSubject { method addObserver (line 11) | public void addObserver(GameObserver observer) { method removeObserver (line 15) | public void removeObserver(GameObserver observer) { method notifyObservers (line 19) | public void notifyObservers() { FILE: solutions/java/src/tictactoe/observer/Scoreboard.java class Scoreboard (line 8) | public class Scoreboard implements GameObserver { method Scoreboard (line 11) | public Scoreboard() { method update (line 15) | @Override method printScores (line 25) | public void printScores() { FILE: solutions/java/src/tictactoe/state/DrawState.java class DrawState (line 7) | public class DrawState implements GameState { method handleMove (line 8) | @Override FILE: solutions/java/src/tictactoe/state/GameState.java type GameState (line 6) | public interface GameState { method handleMove (line 7) | void handleMove(Game game, Player player, int row, int col); FILE: solutions/java/src/tictactoe/state/InProgressState.java class InProgressState (line 9) | public class InProgressState implements GameState { method handleMove (line 10) | @Override FILE: solutions/java/src/tictactoe/state/WinnerState.java class WinnerState (line 7) | public class WinnerState implements GameState { method handleMove (line 8) | @Override FILE: solutions/java/src/tictactoe/strategy/ColumnWinningStrategy.java class ColumnWinningStrategy (line 6) | public class ColumnWinningStrategy implements WinningStrategy { method checkWinner (line 7) | @Override FILE: solutions/java/src/tictactoe/strategy/DiagonalWinningStrategy.java class DiagonalWinningStrategy (line 6) | public class DiagonalWinningStrategy implements WinningStrategy { method checkWinner (line 7) | @Override FILE: solutions/java/src/tictactoe/strategy/RowWinningStrategy.java class RowWinningStrategy (line 6) | public class RowWinningStrategy implements WinningStrategy { method checkWinner (line 7) | @Override FILE: solutions/java/src/tictactoe/strategy/WinningStrategy.java type WinningStrategy (line 6) | public interface WinningStrategy { method checkWinner (line 7) | boolean checkWinner(Board board, Player player); FILE: solutions/java/src/trafficsignalcontrolsystem/IntersectionController.java class IntersectionController (line 13) | public class IntersectionController implements Runnable { method IntersectionController (line 22) | private IntersectionController(int id, Map tr... method getId (line 31) | public int getId() { return id; } method getGreenDuration (line 32) | public long getGreenDuration() { return greenDuration; } method getYellowDuration (line 33) | public long getYellowDuration() { return yellowDuration; } method getLight (line 34) | public TrafficLight getLight(Direction direction) { return trafficLigh... method setState (line 36) | public void setState(IntersectionState state) { method start (line 40) | public void start() { method stop (line 44) | public void stop() { method run (line 48) | @Override class Builder (line 62) | public static class Builder { method Builder (line 68) | public Builder(int id) { method withDurations (line 72) | public Builder withDurations(long green, long yellow) { method addObserver (line 78) | public Builder addObserver(TrafficObserver observer) { method build (line 83) | public IntersectionController build() { FILE: solutions/java/src/trafficsignalcontrolsystem/TrafficControlSystem.java class TrafficControlSystem (line 11) | public class TrafficControlSystem { method TrafficControlSystem (line 16) | private TrafficControlSystem() {} method getInstance (line 18) | public static TrafficControlSystem getInstance() { method addIntersection (line 22) | public void addIntersection(int intersectionId, int greenDuration, int... method startSystem (line 30) | public void startSystem() { method stopSystem (line 40) | public void stopSystem() { FILE: solutions/java/src/trafficsignalcontrolsystem/TrafficLight.java class TrafficLight (line 13) | public class TrafficLight { method TrafficLight (line 21) | public TrafficLight(int intersectionId, Direction direction) { method startGreen (line 29) | public void startGreen() { method transition (line 35) | public void transition() { method setColor (line 40) | public void setColor(LightColor color) { method setNextState (line 47) | public void setNextState(SignalState state) { method getCurrentColor (line 51) | public LightColor getCurrentColor() { method getDirection (line 55) | public Direction getDirection() { method addObserver (line 60) | public void addObserver(TrafficObserver observer) { method removeObserver (line 64) | public void removeObserver(TrafficObserver observer) { method notifyObservers (line 68) | private void notifyObservers() { FILE: solutions/java/src/trafficsignalcontrolsystem/TrafficSystemDemo.java class TrafficSystemDemo (line 5) | public class TrafficSystemDemo { method main (line 6) | public static void main(String[] args) { FILE: solutions/java/src/trafficsignalcontrolsystem/enums/Direction.java type Direction (line 3) | public enum Direction { FILE: solutions/java/src/trafficsignalcontrolsystem/enums/LightColor.java type LightColor (line 3) | public enum LightColor { FILE: solutions/java/src/trafficsignalcontrolsystem/observer/CentralMonitor.java class CentralMonitor (line 6) | public class CentralMonitor implements TrafficObserver { method update (line 7) | @Override FILE: solutions/java/src/trafficsignalcontrolsystem/observer/TrafficObserver.java type TrafficObserver (line 6) | public interface TrafficObserver { method update (line 7) | void update(int intersectionId, Direction direction, LightColor color); FILE: solutions/java/src/trafficsignalcontrolsystem/states/intersection/EastWestGreenState.java class EastWestGreenState (line 7) | public class EastWestGreenState implements IntersectionState { method handle (line 8) | @Override FILE: solutions/java/src/trafficsignalcontrolsystem/states/intersection/IntersectionState.java type IntersectionState (line 5) | public interface IntersectionState { method handle (line 6) | void handle(IntersectionController context) throws InterruptedException; FILE: solutions/java/src/trafficsignalcontrolsystem/states/intersection/NorthSouthGreenState.java class NorthSouthGreenState (line 7) | public class NorthSouthGreenState implements IntersectionState { method handle (line 8) | @Override FILE: solutions/java/src/trafficsignalcontrolsystem/states/light/GreenState.java class GreenState (line 6) | public class GreenState implements SignalState { method handle (line 7) | @Override FILE: solutions/java/src/trafficsignalcontrolsystem/states/light/RedState.java class RedState (line 6) | public class RedState implements SignalState { method handle (line 7) | @Override FILE: solutions/java/src/trafficsignalcontrolsystem/states/light/SignalState.java type SignalState (line 5) | public interface SignalState { method handle (line 6) | void handle(TrafficLight context); FILE: solutions/java/src/trafficsignalcontrolsystem/states/light/YellowState.java class YellowState (line 6) | public class YellowState implements SignalState { method handle (line 7) | @Override FILE: solutions/java/src/vendingmachine/VendingMachine.java class VendingMachine (line 8) | public class VendingMachine { method VendingMachine (line 15) | public VendingMachine() { method getInstance (line 19) | public static VendingMachine getInstance() { method insertCoin (line 23) | public void insertCoin(Coin coin) { method addItem (line 27) | public Item addItem(String code, String name, int price, int quantity) { method selectItem (line 33) | public void selectItem(String code) { method dispense (line 37) | public void dispense() { method dispenseItem (line 41) | public void dispenseItem() { method refundBalance (line 55) | public void refundBalance() { method reset (line 60) | public void reset() { method addBalance (line 65) | public void addBalance(int value) { method getSelectedItem (line 69) | public Item getSelectedItem() { method setSelectedItemCode (line 73) | public void setSelectedItemCode(String code) { method setState (line 77) | public void setState(VendingMachineState vendingMachineState) { method getInventory (line 82) | public Inventory getInventory() { return inventory; } method getBalance (line 83) | public int getBalance() { return balance; } FILE: solutions/java/src/vendingmachine/VendingMachineDemo.java class VendingMachineDemo (line 5) | public class VendingMachineDemo { method main (line 6) | public static void main(String[] args) { FILE: solutions/java/src/vendingmachine/entity/Inventory.java class Inventory (line 6) | public class Inventory { method addItem (line 10) | public void addItem(String code, Item item, int quantity) { method getItem (line 15) | public Item getItem(String code) { method isAvailable (line 19) | public boolean isAvailable(String code) { method reduceStock (line 23) | public void reduceStock(String code) { FILE: solutions/java/src/vendingmachine/entity/Item.java class Item (line 3) | public class Item { method Item (line 8) | public Item(String code, String name, int price) { method getName (line 14) | public String getName() { method getPrice (line 18) | public int getPrice() { FILE: solutions/java/src/vendingmachine/enums/Coin.java type Coin (line 3) | public enum Coin { method Coin (line 11) | Coin(int value) { method getValue (line 15) | public int getValue() { FILE: solutions/java/src/vendingmachine/state/DispensingState.java class DispensingState (line 6) | public class DispensingState extends VendingMachineState { method DispensingState (line 7) | public DispensingState(VendingMachine machine) { method insertCoin (line 11) | @Override method selectItem (line 16) | @Override method dispense (line 21) | @Override method refund (line 26) | @Override FILE: solutions/java/src/vendingmachine/state/HasMoneyState.java class HasMoneyState (line 6) | public class HasMoneyState extends VendingMachineState { method HasMoneyState (line 7) | public HasMoneyState(VendingMachine machine) { method insertCoin (line 11) | @Override method selectItem (line 16) | @Override method dispense (line 21) | @Override method refund (line 27) | @Override FILE: solutions/java/src/vendingmachine/state/IdleState.java class IdleState (line 6) | public class IdleState extends VendingMachineState { method IdleState (line 7) | public IdleState(VendingMachine machine) { method insertCoin (line 11) | @Override method selectItem (line 16) | @Override method dispense (line 27) | @Override method refund (line 32) | @Override FILE: solutions/java/src/vendingmachine/state/ItemSelectedState.java class ItemSelectedState (line 6) | public class ItemSelectedState extends VendingMachineState { method ItemSelectedState (line 7) | public ItemSelectedState(VendingMachine machine) { method insertCoin (line 11) | @Override method selectItem (line 22) | @Override method dispense (line 27) | @Override method refund (line 32) | @Override FILE: solutions/java/src/vendingmachine/state/VendingMachineState.java class VendingMachineState (line 6) | public abstract class VendingMachineState { method VendingMachineState (line 9) | VendingMachineState(VendingMachine machine) { method insertCoin (line 13) | public abstract void insertCoin(Coin coin); method selectItem (line 14) | public abstract void selectItem(String code); method dispense (line 15) | public abstract void dispense(); method refund (line 16) | public abstract void refund(); FILE: solutions/java/src/votingsystem/Candidate.java class Candidate (line 3) | class Candidate { method Candidate (line 8) | public Candidate(String id, String name, String party) { method getId (line 14) | public String getId() { method getName (line 18) | public String getName() { FILE: solutions/java/src/votingsystem/VoteRecord.java class VoteRecord (line 5) | class VoteRecord { method VoteRecord (line 10) | public VoteRecord(String voterId, String candidateId, long timestamp) { method toString (line 16) | @Override FILE: solutions/java/src/votingsystem/Voter.java class Voter (line 3) | class Voter { method Voter (line 8) | public Voter(String id, String name, String password) { method getId (line 14) | public String getId() { method getName (line 18) | public String getName() { FILE: solutions/java/src/votingsystem/VotingSystem.java class VotingSystem (line 9) | public class VotingSystem { method VotingSystem (line 19) | private VotingSystem() { method getInstance (line 29) | public static VotingSystem getInstance() { method registerVoter (line 41) | public void registerVoter(String voterId, String name, String password) { method registerCandidate (line 46) | public void registerCandidate(String candidateId, String name, String ... method startVoting (line 52) | public void startVoting() { method endVoting (line 62) | public void endVoting() { method castVote (line 72) | public boolean castVote(String voterId, String candidateId) { method getCurrentResults (line 103) | public Map getCurrentResults() { method getAuditLog (line 117) | public List getAuditLog() { FILE: solutions/java/src/votingsystem/VotingSystemDemo.java class VotingSystemDemo (line 6) | public class VotingSystemDemo { method run (line 7) | public static void run() { FILE: solutions/java/test/coffeevendingmachine/CoffeeVendingMachineTest.java class CoffeeVendingMachineTest (line 13) | public class CoffeeVendingMachineTest { method setUp (line 19) | @BeforeEach method testSelectCoffee (line 30) | @Test method testInvalidCoffeeSelection (line 40) | @Test method testDispenseCoffee (line 53) | @Test method testInsufficientPayment (line 65) | @Test method testIngredientConsumption (line 82) | @Test method testIngredientRefill (line 102) | @Test FILE: solutions/typescript/src/CoffeeVendingMachine/CoffeeRecipe.ts class CoffeeRecipe (line 1) | class CoffeeRecipe { method constructor (line 6) | constructor(name: string, price: number, recipe: Map) { method getName (line 12) | public getName(): string { method getPrice (line 16) | public getPrice(): number { method getRecipe (line 20) | public getRecipe() { FILE: solutions/typescript/src/CoffeeVendingMachine/CoffeeVendingMachine.ts class CoffeeVendingMachine (line 7) | class CoffeeVendingMachine { method constructor (line 14) | private constructor() { method addDefaultRecipes (line 22) | private addDefaultRecipes(): void { method getInstance (line 60) | public static getInstance(): CoffeeVendingMachine { method displayMenu (line 67) | public displayMenu(): void { method selectCoffee (line 74) | public selectCoffee(coffeeName: string): CoffeeRecipe { method dispenseCoffee (line 81) | public dispenseCoffee(recipe: CoffeeRecipe, payment: Payment): void { method refillIngredient (line 106) | public refillIngredient(ingredient: string, quantity: number): void { method showIngredients (line 110) | public showIngredients(): void { FILE: solutions/typescript/src/CoffeeVendingMachine/CoffeeVendingMachineDemo.ts class CoffeeVendingMachineDemo (line 4) | class CoffeeVendingMachineDemo { method run (line 5) | static run() { FILE: solutions/typescript/src/CoffeeVendingMachine/Dispenser.ts class Dispenser (line 3) | class Dispenser { method prepareDrink (line 4) | public prepareDrink(recipe: CoffeeRecipe): void { FILE: solutions/typescript/src/CoffeeVendingMachine/IngredientStore.ts class IngredientStore (line 1) | class IngredientStore { method constructor (line 4) | constructor() { method refill (line 8) | public refill(ingredient: string, quantity: number): void { method hasEnoughIngredient (line 15) | public hasEnoughIngredient(required: Map): boolean { method consume (line 22) | public consume(required: Map): void { method getLevel (line 32) | public getLevel(ingredient: string): number { method getAllIngredients (line 36) | public getAllIngredients(): Map { FILE: solutions/typescript/src/CoffeeVendingMachine/Payment.ts class Payment (line 1) | class Payment { method constructor (line 4) | constructor(amount: number) { method getAmount (line 8) | public getAmount(): number { FILE: solutions/typescript/src/CoffeeVendingMachine/PaymentProcessor.ts class PaymentProcessor (line 1) | class PaymentProcessor { method process (line 2) | public process(price: number, paid: number): number { FILE: solutions/typescript/src/LoggingFramework/Appender/ConsoleLogAppender.ts class ConsoleLogAppender (line 5) | class ConsoleLogAppender implements LogAppender { method constructor (line 8) | constructor(formatter: LogFormatter) { method append (line 12) | append(logMessage: LogMessage) { FILE: solutions/typescript/src/LoggingFramework/Appender/FileLogAppender.ts class FileLogAppender (line 7) | class FileLogAppender implements LogAppender { method constructor (line 11) | constructor(filePath: string, formatter: LogFormatter) { method append (line 26) | public append(logMessage: LogMessage): void { FILE: solutions/typescript/src/LoggingFramework/Appender/LogAppender.ts type LogAppender (line 3) | interface LogAppender { FILE: solutions/typescript/src/LoggingFramework/LogFormatter/LogFormatter.ts type LogFormatter (line 3) | interface LogFormatter { FILE: solutions/typescript/src/LoggingFramework/LogFormatter/SimpleLogFormatter.ts class SimpleLogFormatter (line 4) | class SimpleLogFormatter implements LogFormatter { method format (line 5) | format(message: LogMessage): string { FILE: solutions/typescript/src/LoggingFramework/LogLevel.ts type LogLevelEnum (line 1) | enum LogLevelEnum { function isAsSevereAs (line 9) | function isAsSevereAs( FILE: solutions/typescript/src/LoggingFramework/LogManager.ts class LogManager (line 8) | class LogManager { method getLogger (line 11) | static getLogger() { method setLevel (line 28) | setLevel(level: LogLevelEnum): this { method addAppender (line 33) | addAppender(appender: LogAppender): this { method build (line 38) | build(): Logger { FILE: solutions/typescript/src/LoggingFramework/LogMessage.ts class LogMessage (line 3) | class LogMessage { method constructor (line 8) | constructor(logLevel: LogLevelEnum, message: string) { method getMessage (line 14) | getMessage() { method getLogLevel (line 18) | getLogLevel() { method getTimeStamp (line 22) | getTimeStamp() { method toString (line 26) | toString() { FILE: solutions/typescript/src/LoggingFramework/Logger.ts class Logger (line 5) | class Logger { method constructor (line 9) | public constructor(minLevel: LogLevelEnum, appenders: LogAppender[]) { method log (line 14) | log(level: LogLevelEnum, msg: string) { method setMinLevel (line 20) | setMinLevel(minLevel: LogLevelEnum) { method debug (line 24) | debug(message: string) { method info (line 27) | info(message: string) { method warn (line 30) | warn(message: string) { method error (line 33) | error(message: string) { method fatal (line 36) | fatal(message: string) { FILE: solutions/typescript/src/LoggingFramework/LoggingFrameworkDemo.ts class LogginFrameworkDemo (line 4) | class LogginFrameworkDemo { method run (line 5) | static run() { FILE: solutions/typescript/src/ParkingLot/Floor.ts type carWiseSpot (line 5) | type carWiseSpot = Record class ParkingFloor (line 8) | class ParkingFloor { method constructor (line 12) | constructor(floor: string) { method addSpot (line 17) | addSpot(spot: ParkingSpot) { method reportAvailability (line 21) | reportAvailability(): carWiseSpot { method findAvailableSpot (line 36) | findAvailableSpot(vehicle: AbstractVehicle): ParkingSpot | null { FILE: solutions/typescript/src/ParkingLot/ParkingLot.ts class ParkingLot (line 5) | class ParkingLot { method constructor (line 11) | constructor(name: string){ method getInstance (line 17) | static getInstance(name: string = "Default"): ParkingLot{ method parkCar (line 24) | parkCar(vehicle: AbstractVehicle): void{ method unparkCar (line 35) | unparkCar(vehicle: AbstractVehicle){ method spotAvailability (line 44) | spotAvailability(){ method addFloor (line 51) | addFloor(floor : ParkingFloor){ FILE: solutions/typescript/src/ParkingLot/Spot.ts class ParkingSpot (line 4) | class ParkingSpot { method constructor (line 9) | constructor(spotName: string, type: carType) { method isAvailable (line 14) | get isAvailable(): boolean { method canFit (line 18) | canFit(car: AbstractVehicle): boolean { method parkCar (line 22) | parkCar(car: AbstractVehicle): void { method unparkCar (line 35) | unparkCar(): void { method getVehicle (line 39) | getVehicle(): AbstractVehicle | null { method getSpotType (line 43) | get getSpotType(): carType { FILE: solutions/typescript/src/ParkingLot/Vehicle.ts type Vehicle (line 3) | interface Vehicle { method constructor (line 13) | constructor(number: string, type: carType) { method getNumber (line 18) | getNumber(): string { method getType (line 22) | getType(): carType { class Car (line 27) | class Car extends AbstractVehicle { method constructor (line 28) | constructor(number: string) { class Bike (line 33) | class Bike extends AbstractVehicle { method constructor (line 34) | constructor(number: string) { class Truck (line 39) | class Truck extends AbstractVehicle { method constructor (line 40) | constructor(number: string) { FILE: solutions/typescript/src/ParkingLot/types.ts type carType (line 1) | type carType = "Car" | "Truck" | "Bike"; FILE: solutions/typescript/src/StackOverflow/Answer.ts class Answer (line 11) | class Answer implements Votable, Commentable { method constructor (line 21) | constructor(author: User, question: Question, content: string) { method vote (line 32) | vote(voter: User, type: VoteTypeEnum) { method getVoteCount (line 44) | getVoteCount() { method addComment (line 48) | addComment(comment: Comment) { method getComments (line 52) | getComments() { method getQuestion (line 56) | getQuestion() { method markAsAccepted (line 60) | markAsAccepted() { method getId (line 68) | getId() { method getAuthor (line 71) | getAuthor() { method getContent (line 74) | getContent() { method getIsAccepted (line 77) | getIsAccepted() { FILE: solutions/typescript/src/StackOverflow/Comment.ts class Comment (line 4) | class Comment { method constructor (line 10) | constructor(author: User, content: string) { method getId (line 17) | getId() { method getAuthor (line 20) | getAuthor() { method getContent (line 23) | getContent() { FILE: solutions/typescript/src/StackOverflow/Commentable.ts type Commentable (line 3) | interface Commentable { FILE: solutions/typescript/src/StackOverflow/Question.ts class Question (line 10) | class Question { method constructor (line 22) | constructor(author: User, title: string, content: string, tags: Tag[]) { method addAnswer (line 35) | addAnswer(answer: Answer) { method acceptAnswer (line 39) | acceptAnswer(answer: Answer) { method vote (line 43) | vote(voter: User, type: VoteTypeEnum) { method getVoteCount (line 56) | getVoteCount() { method addComment (line 60) | addComment(comment: Comment) { method getComments (line 64) | getComments() { method getId (line 68) | getId() { method getAuthor (line 71) | getAuthor() { method getTitle (line 74) | getTitle() { method getContent (line 77) | getContent() { method getTags (line 80) | getTags() { FILE: solutions/typescript/src/StackOverflow/ReputationType.ts type ReputationTypeEnum (line 1) | enum ReputationTypeEnum { FILE: solutions/typescript/src/StackOverflow/StackOverflow.ts class StackOverflow (line 10) | class StackOverflow { method constructor (line 17) | private constructor() { method getInstance (line 24) | static getInstance() { method createUser (line 31) | createUser(username: string, email: string) { method postQuestion (line 37) | postQuestion( method postAnswer (line 59) | postAnswer(userId: string, questionId: string, content: string) { method getUser (line 70) | getUser(userId: string) { method addComment (line 77) | addComment(userId: string, commentable: Commentable, content: string) { method vote (line 84) | vote(userId: string, votable: Votable, voteType: VoteTypeEnum) { method acceptAnswer (line 89) | acceptAnswer(answerId: string) { method searchQuestions (line 98) | searchQuestions(query: string) { method getQuestionsByUser (line 109) | getQuestionsByUser(userId: string) { FILE: solutions/typescript/src/StackOverflow/StackOverflowDemo.ts class StackOverflowDemo (line 4) | class StackOverflowDemo { method run (line 5) | static run() { FILE: solutions/typescript/src/StackOverflow/Tag.ts class Tag (line 3) | class Tag { method constructor (line 7) | constructor(name: string) { method getId (line 12) | getId() { method getName (line 15) | getName() { FILE: solutions/typescript/src/StackOverflow/User.ts class User (line 3) | class User { method constructor (line 9) | constructor(name: string, email: string) { method updateReputation (line 16) | updateReputation(value: number) { method getUserId (line 23) | getUserId() { method getName (line 26) | getName() { method getReputation (line 29) | getReputation() { method getEmail (line 32) | getEmail() { FILE: solutions/typescript/src/StackOverflow/Votable.ts type Votable (line 4) | interface Votable { FILE: solutions/typescript/src/StackOverflow/Vote.ts class Vote (line 4) | class Vote { method constructor (line 8) | constructor(voter: User, type: VoteTypeEnum) { method getVoter (line 13) | getVoter() { method getVoteType (line 17) | getVoteType() { FILE: solutions/typescript/src/StackOverflow/VoteTypeEnum.ts type VoteTypeEnum (line 1) | enum VoteTypeEnum { FILE: solutions/typescript/src/TaskManagement/ActivityLog.ts class ActivityLog (line 4) | class ActivityLog { method constructor (line 10) | constructor(action: string, performedBy: User) { FILE: solutions/typescript/src/TaskManagement/Comment.ts class Comment (line 4) | class Comment { method constructor (line 10) | constructor(content: string, author: User) { method getAuthor (line 17) | getAuthor() { FILE: solutions/typescript/src/TaskManagement/SortingStrategy/SortByDueDate.ts class SortByDueDate (line 4) | class SortByDueDate implements TaskSortingStrategy { method sort (line 5) | sort(tasks: Task[]) { FILE: solutions/typescript/src/TaskManagement/SortingStrategy/SortByPriority.ts class SortByPriority (line 4) | class SortByPriority implements TaskSortingStrategy { method sort (line 12) | sort(tasks: Task[]): void { FILE: solutions/typescript/src/TaskManagement/SortingStrategy/TaskSortingStrategy.ts type TaskSortingStrategy (line 3) | interface TaskSortingStrategy { FILE: solutions/typescript/src/TaskManagement/Task.ts class Task (line 8) | class Task { method constructor (line 22) | constructor( method addComment (line 44) | addComment(comment: Comment) { method addSubtask (line 49) | addSubtask(subtask: Task) { method logActivity (line 54) | logActivity(action: string) { method updateStatus (line 58) | updateStatus(status: TaskStatusEnum) { method updatePriority (line 63) | updatePriority(priority: TaskPriorityEnum) { method assignUser (line 68) | assignUser(user: User) { method getId (line 73) | getId() { method getTitle (line 77) | getTitle() { method getPriority (line 81) | getPriority() { method getDueDate (line 85) | getDueDate() { method getAssignedTo (line 89) | getAssignedTo() { method getCreatedBy (line 93) | getCreatedBy() { method getDescription (line 97) | getDescription() { method getStatus (line 101) | getStatus() { FILE: solutions/typescript/src/TaskManagement/TaskList.ts class TaskList (line 4) | class TaskList { method constructor (line 9) | constructor(name: string) { method addTask (line 15) | addTask(task: Task) { method getTasks (line 19) | getTasks() { method getId (line 23) | getId() { method getName (line 27) | getName() { FILE: solutions/typescript/src/TaskManagement/TaskManagementSystem.ts class TaskManagementSystem (line 9) | class TaskManagementSystem { method constructor (line 15) | private constructor() { method getInstance (line 21) | static getInstance() { method createUser (line 28) | createUser(name: string, email: string) { method createTaskList (line 34) | createTaskList(listName: string) { method createTask (line 40) | createTask( method getTaskById (line 61) | getTaskById(taskId: string) { method updateTaskStatus (line 69) | updateTaskStatus(taskId: string, status: TaskStatusEnum) { method updateTaskPriority (line 73) | updateTaskPriority(taskId: string, priority: TaskPriorityEnum) { method assignTask (line 77) | assignTask(taskId: string, userId: string) { method addComment (line 83) | addComment(taskId: string, commentText: string, author: User) { method listTasksByUser (line 88) | listTasksByUser(userId: string) { method listTasksByStatus (line 94) | listTasksByStatus(status: TaskStatusEnum) { method deleteTask (line 100) | deleteTask(taskId: string) { method searchTasks (line 104) | searchTasks(keyword: string, sortingStrategy: TaskSortingStrategy) { FILE: solutions/typescript/src/TaskManagement/TaskManagementSystemDemo.ts class TaskManagementDemo (line 6) | class TaskManagementDemo { method run (line 7) | static run() { FILE: solutions/typescript/src/TaskManagement/TaskPriorityEnum.ts type TaskPriorityEnum (line 1) | enum TaskPriorityEnum { FILE: solutions/typescript/src/TaskManagement/TaskStatusEnum.ts type TaskStatusEnum (line 1) | enum TaskStatusEnum { FILE: solutions/typescript/src/TaskManagement/User.ts class User (line 3) | class User { method constructor (line 8) | constructor(name: string, email: string) { method getName (line 14) | getName() { method getId (line 18) | getId() { method getEmail (line 22) | getEmail() { FILE: solutions/typescript/src/TrafficSignalSystem/Direction.ts type DirectionEnum (line 1) | enum DirectionEnum { FILE: solutions/typescript/src/TrafficSignalSystem/Intersection.ts class Intersection (line 5) | class Intersection { method constructor (line 11) | constructor( method start (line 22) | start(startDirection: DirectionEnum) { method manualOverride (line 26) | manualOverride(direction: DirectionEnum) { method getSignal (line 31) | getSignal(direction: DirectionEnum) { FILE: solutions/typescript/src/TrafficSignalSystem/SignalState/GreenState.ts class GreenState (line 7) | class GreenState implements SignalState { method handle (line 8) | handle( method getName (line 23) | getName() { FILE: solutions/typescript/src/TrafficSignalSystem/SignalState/RedState.ts class RedState (line 7) | class RedState implements SignalState { method handle (line 8) | handle( method getName (line 26) | getName() { FILE: solutions/typescript/src/TrafficSignalSystem/SignalState/SignalState.ts type SignalState (line 5) | interface SignalState { FILE: solutions/typescript/src/TrafficSignalSystem/SignalState/YellowState.ts class YellowState (line 7) | class YellowState implements SignalState { method handle (line 8) | handle( method getName (line 23) | getName() { FILE: solutions/typescript/src/TrafficSignalSystem/TrafficLight.ts class TrafficLight (line 6) | class TrafficLight { method constructor (line 10) | constructor(direction: DirectionEnum) { method setState (line 15) | setState(state: SignalState) { method getState (line 19) | getState() { method getDirection (line 23) | getDirection() { method handle (line 27) | handle(controller: TrafficSignalController) { FILE: solutions/typescript/src/TrafficSignalSystem/TrafficSignalController.ts class TrafficSignalController (line 6) | class TrafficSignalController { method constructor (line 10) | constructor( method start (line 18) | start(startDirection: DirectionEnum) { method scheduleStateChange (line 25) | scheduleStateChange( method getSignalDuration (line 37) | getSignalDuration(direction: DirectionEnum, state: SignalState) { method getNextDirection (line 41) | getNextDirection(current: DirectionEnum): DirectionEnum { method getTrafficLight (line 47) | getTrafficLight(direction: DirectionEnum) { method manualOverride (line 53) | manualOverride(direction: DirectionEnum) { FILE: solutions/typescript/src/TrafficSignalSystem/TrafficSignalSystemDemo.ts class TrafficSignalSystemDemo (line 5) | class TrafficSignalSystemDemo { method run (line 6) | static run() { FILE: solutions/typescript/src/VendingMachine/Coin.ts type Coin (line 1) | enum Coin { FILE: solutions/typescript/src/VendingMachine/Inventory.ts class Inventory (line 3) | class Inventory { method constructor (line 7) | constructor() { method addItem (line 12) | addItem(code: string, item: Item, quantity: number) { method getItem (line 17) | getItem(code: string) { method isAvailable (line 21) | isAvailable(code: string) { method reduceStock (line 25) | reduceStock(code: string) { FILE: solutions/typescript/src/VendingMachine/Item.ts class Item (line 1) | class Item { method constructor (line 6) | constructor(code: string, name: string, price: number) { method getName (line 12) | getName() { method getPrice (line 16) | getPrice() { FILE: solutions/typescript/src/VendingMachine/VendingMachine.ts class VendingMachine (line 10) | class VendingMachine { method constructor (line 23) | private constructor() { method getInstance (line 34) | static getInstance() { method insertCoin (line 41) | insertCoin(coin: Coin) { method addItem (line 45) | addItem(code: string, name: string, price: number, quantity: number) { method selectItem (line 51) | selectItem(code: string) { method dispense (line 55) | dispense() { method dispenseItem (line 59) | dispenseItem() { method refundBalance (line 81) | refundBalance() { method resetToIdleState (line 86) | resetToIdleState() { method addBalance (line 91) | addBalance(value: number) { method getIdleState (line 96) | getIdleState() { method getItemSelectedState (line 100) | getItemSelectedState() { method getHasMoneyState (line 104) | getHasMoneyState() { method getDispensingState (line 108) | getDispensingState() { method getInventory (line 112) | getInventory() { method getSelectedItem (line 116) | getSelectedItem() { method setSelectedItemCode (line 123) | setSelectedItemCode(code: string) { method getBalance (line 127) | getBalance() { method setState (line 131) | setState(state: VendingMachineState) { FILE: solutions/typescript/src/VendingMachine/VendingMachineDemo.ts class VendingMachineDemo (line 4) | class VendingMachineDemo{ method run (line 5) | static run(){ FILE: solutions/typescript/src/VendingMachine/VendingMachineState/DispensingState.ts class DispensingState (line 4) | class DispensingState implements VendingMachineState { method constructor (line 7) | constructor(machine: VendingMachine) { method insertCoin (line 11) | insertCoin(): void { method selectItem (line 15) | selectItem() { method dispense (line 19) | dispense() { method refund (line 23) | refund() { FILE: solutions/typescript/src/VendingMachine/VendingMachineState/HasMoneyState.ts class HasMoneyState (line 4) | class HasMoneyState implements VendingMachineState { method constructor (line 7) | constructor(machine: VendingMachine) { method insertCoin (line 11) | insertCoin() { method selectItem (line 15) | selectItem() { method dispense (line 19) | dispense() { method refund (line 24) | refund() { FILE: solutions/typescript/src/VendingMachine/VendingMachineState/IdleState.ts class IdleState (line 4) | class IdleState implements VendingMachineState { method constructor (line 7) | constructor(machine: VendingMachine) { method selectItem (line 11) | selectItem(code: string): void { method insertCoin (line 22) | insertCoin(): void { method dispense (line 26) | dispense(): void { method refund (line 30) | refund(): void { FILE: solutions/typescript/src/VendingMachine/VendingMachineState/ItemSelectedState.ts class ItemSelectedState (line 5) | class ItemSelectedState implements VendingMachineState { method constructor (line 8) | constructor(machine: VendingMachine) { method insertCoin (line 12) | insertCoin(coin: Coin) { method selectItem (line 27) | selectItem() { method dispense (line 31) | dispense() { method refund (line 35) | refund() { FILE: solutions/typescript/src/VendingMachine/VendingMachineState/VendingMachineState.ts type VendingMachineState (line 3) | interface VendingMachineState {