GithubHelp home page GithubHelp logo

sukora-stas / javaadvanced_mentoring Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 331 KB

Global Java Mentoring Program: Advanced contains a set of modules aimed to enrich the expertise of senior level engineers in Java technologies stack.

Java 89.24% HTML 10.76%

javaadvanced_mentoring's Introduction

Java 8 and 9, 10, 11+ Modul Practical Task

Necessary Tools

Java Development Kit 11+

Apache Maven 3.6.0+

Git 2.24+

Task

(1-2 stars)

  1. Create maven project with 5 modules (see Java 9 modules) :
- jmp-bank-api
- jmp-service-api
- jmp-cloud-bank-impl
- jmp-cloud-service-impl
- jmp-dto
  1. Create the fallowing classes under jmp-dto module :
- [User]
    String name;
    String surname;
    LocalDate birthday;


- [BankCard]
    String number;
    User user;


- [Subscription]
    String bankcard;
    LocalDate startDate;
  1. Extend BankCard class with :
- CreditBankCard
- DebitBankCard
  1. Create enum :
- [BankCardType]
    CREDIT
    DEBIT
  1. Add Bank interface to jmp-bank-api with :
- BankCard createBankCard(User, BankCardType);
  1. Add module-info.java which :
- requires jmp-dto
- export Bank interface
  1. Implement Bank into jmp-cloud-bank-impl. Method should create a new class depending on the type:
  2. Add module-info.java which :
- requires transitive module with Bank interface
- requires jmp-dto
- exports implementation of Bank interface
  1. Add Service interface to jmp-service-api with :
- void subscribe(BankCard)
- Optional<Subscription> getSubscriptionByBankCardNumber(String)
- List<User> getAllUsers();
  1. Add module-info.java which :
- requires jmp-dto
- export Service interface
  1. Implement Service into jmp-cloud-service-impl. User Stream API, You can use Memory/DB for data storing :
  2. Add module-info.java which :
- requires transitive module with Service interface
- requires jmp-dto
- exports implementation of Service interface
  1. Use var for definition of local variables wherever it’s applicable.
  2. Use lambdas and Java 8 features wherever it’s applicable.
  3. Create application module.
  4. Add module-info.java which :
- use interfaces
- requires module with Bank implementation
- requires module with Service implementation
- requires jmp.dto;
  1. Demonstrate functionality of created classes. (3-4 stars)
  2. Add a new default method for Service interface, which uses getAllUsers. Use LocalDate.now(), ChronoUnit и mapToLong.
- double getAverageUsersAge();
  1. Add a new static method for Service interface, which returns true, if the user is over 18 years old.
- boolean isPayableUser(User);
  1. Use Collectors.toUnmodifiableList() and method reference it’s applicable. (5 stars)
  2. Create Exception class which will be used into orElseThrow for Optional from getSubscriptionByBankCardNumber().
  3. Add a new method for Service interface and implement it. Demonstrate this method ino application module:
- List<Subscription> getAllSubscriptionsByCondition(Predicate<Subscription>);
  1. Reimplement createBankCard with method reference (ex: CreditBankCard::new).
  2. Add to module-info jar for each implementation module :
- provides [interface] with [implementation]
  1. Add a module with Service implementation. Try to use ServiceLoader.load() for module loading.

References

javaadvanced_mentoring's People

Watchers

 avatar  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.