If it is not explicitly told in following recipe, setting up services are described for Ubuntu 20.04 server, but applications are described for Xubuntu 20.04 workstation. If you use different Ubuntu version or Linux distribution, settings as well as content, names and places of configuration files may be different!
Got it.

Extra 11: Java 8

  1. Ensure you are using Eclipse 4.x.
  2. Review package jtm.extra11 and class RandomPerson in package jtm.activity03.
  3. Add new methods into PersonMatcher interface:
    1. method Stream<RandomPerson> getPersonStream()
    2. default method Stream<RandomPerson> getMatchedPersonStream() with parameters:

      • Stream<RandomPerson> persons,
      • boolean isFemale,
      • int ageFrom,
      • int ageTo,
      • float weightFrom,
      • float weightTo

      This method should return Stream of passed persons filtered out according to passed gender, range of age and range of weight (including). Hint: you may use stream filter pattern.

    3. static method List<RandomPerson> getPersonList(Stream<RandomPerson> persons)
    4. static method PersonMatcher getPersonManager()
    5. Implement default and static methods in PersonMatcher interface.
  4. Create class PersonMatcherImpl which implements PersonMatcher interface and implement unimplemented methods for it:
    1. public constructor PersonMatcherImpl()
    2. public void addPerson(RandomPerson person)
    3. public List<RandomPerson> getPersonList()
    4. public Stream<RandomPerson> getPersonStream()
      Hint: you may use Stream.Builder.

  5. Check that unit test is passing for jtm.extra11 package.
  6. Check that unit tests are not failing for other packages (can fail if deprecated API of Java 7 was used in some implementation).

  

Created by Valdis Vītoliņš on 2018-03-28 10:45
Last modified by Valdis Vītoliņš on 2023-05-02 13:52
 
Xwiki Powered
Creative Commons Attribution 3.0 Unported License