Giter Site home page Giter Site logo

command's Introduction

Hands on Command

Each student in our university has got 4 gold opportunities:

  1. to go to academival leave

  2. to return from academical leave

  3. to pass exam

  4. to fail the exam

Suppose we have a switch that regulates the leaving/returning, failing/pasing. The Command just an executor of this command - it changes states from "0" to "1" and in opposite.

Task

Create two classes that are responsible for (1) Academical leave and (2) Exam passing.

Each of these classes has exactly 2 methods: one for describing state "0" and another one for state "1".

  • when the student goes to the academical leave, the console should display the meassage "Student left to the Academical leave";

  • when the student returns from the academical leave, the console should display the meassage "Student returned from the Academical leave";

  • when the student passes the exam, the console should display the message "Student succesfully passed the exam"

  • when the student fails the exam, the console should display the message "Student failed and goes to retake"

Task

Implement Switch such that Command can be executed for state "0" (flipUp) or "1" (flipDown)

Task

Realise 4 classes for each of 4 states (passed, failed, acadevical leave, return from leave). Each class has constructor and a sigle execute method to change the state

Task

Test your implementation

command's People

Contributors

uralmashfox avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.