Skip to content

Files

Latest commit

7b5629c · Apr 26, 2023

History

History

src

v1.0

  • add README file for this laboratory work
  • make colection package with all classes
  • make default sorting implementing Comparable interface, overriding compareTo method
  • Make comparator for City objects using Comparator interface
  • Think of logical project structure
  • Make sure that you separate user from server for next lab

  • create CSVManager
  • create CollectionManager
  • create Managers interface
  • create .csv file
  • make serialization from TreeSet collection to .csv (for save command)
    • create write method in Managers interface
    • create write method in CollectionManager
    • create write method in CSVManager
  • make deserialization from .csv to TreeSet collection (for show and add commandManagers)
    • create read method in Managers interface
    • create read method in CollectionManager
    • create read method in CSVManager

  • create userManager
    • create working workflow
    • complete it

  • make commandManagers
    • make help command
    • make info command
    • make show command
    • make add element command
      • make createNewCityByUser method in UserManager
      • make requestEnum method in UserManager
    • make update_id command
    • make remove_by_id command
    • make clear command
      • make backup file for default data in .csv
    • make save command
    • make execute_script file_name command
      • make scriptFile.txt
    • make exit command
    • make add_if_min command
    • make remove_greater command
    • make history command
    • make sum_of_meters_above_sea_level command
    • make print_descending command
    • make print_field_descending_meters_above_sea_level command

  • Make id
    • Make id generated automatically
    • Make id unique

  • create checking for ^D and other unexpected symbols in std:in
    • ^D symbol causes EOF, so what should I do?)
  • Make sure the execute_script in execute_script doesn't run indefinitely
    • check recursion when file1 reference file2, which also references file1
  • make UML diagram using plantUML
  • generate javadoc for everything
  • make report in .docx and .pdf

  • generate lab5.jar file
  • upload it to helios via scp command

v2.0

  • create validators for each City argument in collectionManagers.validators
    • create Validator interface
    • create NameValidator
    • create CoordinateXValidator
    • create CoordinateYValidator
    • create AreaValidator
    • create PopulationValidator
    • create MetersAboveSeaLevelValidator
    • create ClimateValidator
    • create GovernmentValidator
    • create StandardOfLivingValidator
    • create HumanValidator
    • create InputValidator
  • use those validators in CSVManager

  • create userMode and nonUserMode packages in colectionManagers.handlers

    • create CityNonCLIManager in nonUserMode
    • create CityCLIManager in userMode
      • create CoordinatesCLIManager in userMode
      • create HumanCLIManager in userMode
      • create ClimateCLIManager in userMode
      • create GovernmentCLIManager
      • create StandardOfLivingCLIManager in userMode
    • write working code in both
  • create createCityObject() method in

  • create interfaces for handlers

  • create 2 modes: user and nonuser

    • make CommandMode enum for creating this 2 modes
    • make ModuleHandler for creating objects based on given CommandMode mode
    • add it to CommandManager constructor
    • based on mode, give scanner to nonCLI and nothing to CLI handler
    • give every command, that could ask for nonuser mode just created handler object
    • store all commandManagers in LinkedHashMap for normal storing order, not just HashMap

  • IdManager class
    • rename CityIdChecker to IdManager
    • create generateId method
    • create checkCityById method
    • create checking for numeric
    • create validation for user input

  • Add iteration of enums validation to enumValidators instead of checking for null values

  • rewrite new UserManager class

    • delete isWorking in Main and in UserManager.
    • It takes input stream and command mode (not hardcoded System.in, like before)
    • checks if next line is empty or not in while() loop
    • if not it calls executeCommand method in CommandManager
  • make executeCommand in CommandManager, not in userManager

    • executeCommand check for every possible exception and than calls .execute method from Command interface
    • throw all those exceptions to later handle them in

  • Make readFromFile method in CSV Manager return not only City-like object, but csvParser object (say no to hardcode!)
  • Then, make loadCityCollection method in CityManager iterate through fields like readFromFile method before

  • create getDescription for each command
  • make help command not just sout String, but iterate through getDescription method of each command in CommandManager and write it's description
  • exit command now uses system.exit(0)
  • add command uses CityCLI or nonCLI managers for createCityObject() method using CollectionHandler interface

v2.1

  • delete enum validators, because there is nothing to check
  • create CLIManagerUtility for handy enum creation managing

  • Create structure for catching any exception, that could be thrown
    • implement BuildObjectException everywhere
    • implement other Exceptions eveywhere
  • beautify and make good writing and loading in CSVManager and CityManager

?

  1. system.exit(1)? (2)? other numbers?
  2. serr vs sout