Skip to content

Software Engineering Methods Coursework Project - Group 3

License

Notifications You must be signed in to change notification settings

2004seraph/SET08103

Repository files navigation

SET08103 - Software Engineering Methods

ENU Badge

Team 3 Project Repository

GitHub Workflow Status (master) GitHub Workflow Status (develop) LICENSE Releases codecov

Usage

Important

You may want to read this if you're an examiner.

Note

Assume common UNIX-like CLI tool behaviour

These commands assume a Windows or Linux environment, with Docker, JDK 11 and Maven installed.

  1. Package the app: mvn -DskipTests package

  2. Start the database Docker container using a config which allows the app to be run outside it's Docker container:

    docker compose -f docker-compose.yml -f docker-compose.dev.linux.yml up db

    Or if you want to run on a Windows environment:

    docker compose -f docker-compose.yml -f docker-compose.windows.linux.yml up db

  3. Open an interactive REPL prompt: MYSQL_ROOT_PASSWORD=root java -jar target/pop.jar (ensuring zero arguments)

  4. Ask for help with the commands: help

  5. Run your query and see the output! You will be able to fulfil any requirement (and more!) using the commands in the prompt.

You can also directly evaluate commands from the shell by passing them to the package as command line arguments:

~ $ MYSQL_ROOT_PASSWORD=root java -jar target/pop.jar total --in world
Successfully connected to MySQL database: world

Population of World: 6078749450

Any command that takes a specific place as an argument may have either a name or a primary key supplied (Numeric ID for cities, or country code for countries). If a name is supplied, the place with the highest population will be used in the event of multiple matches.

Places with spaces in their name may be referenced with underscores, so to select the region "Southern Europe", you can use southern_europe. You can also just type "europe" and it will select the place with the higher population.

All commands are case insensitive, including arguments.

Refer to the requirements screenshots for usage examples.

Requirements

32 requirements of 32 have been implemented, which is 100%.

Evidence

Note

Very long results have been reduced to the beginning and ending dozen or so.

Note

The command has been included for you to reproduce each screenshot. Bear in mind they were all ran in the package's interactive REPL mode.

ID Name Met Screenshot
1 All the countries in the world organised by largest population to smallest. Yes Screenshot of terminal
Screenshot of terminal
2 All the countries in a continent organised by largest population to smallest. Yes Screenshot of terminal
Screenshot of terminal
3 All the countries in a region organised by largest population to smallest. Yes Screenshot of terminal
4 The top N populated countries in the world where N is provided by the user. Yes Screenshot of terminal
5 The top N populated countries in a continent where N is provided by the user. Yes Screenshot of terminal
6 The top N populated countries in a region where N is provided by the user. Yes Screenshot of terminal
7 All the cities in the world organised by largest population to smallest. Yes Screenshot of terminal
Screenshot of terminal
8 All the cities in a continent organised by largest population to smallest. Yes Screenshot of terminal
Screenshot of terminal
9 All the cities in a region organised by largest population to smallest. Yes Screenshot of terminal
Screenshot of terminal
10 All the cities in a country organised by largest population to smallest. Yes Screenshot of terminal
Screenshot of terminal
11 All the cities in a district organised by largest population to smallest. Yes Screenshot of terminal
12 The top N populated cities in the world where N is provided by the user. Yes Screenshot of terminal
13 The top N populated cities in a continent where N is provided by the user. Yes Screenshot of terminal
14 The top N populated cities in a region where N is provided by the user. Yes Screenshot of terminal
15 The top N populated cities in a country where N is provided by the user. Yes Screenshot of terminal
16 The top N populated cities in a district where N is provided by the user. Yes Screenshot of terminal
17 All the capital cities in the world organised by largest population to smallest. Yes Screenshot of terminal
Screenshot of terminal
18 All the capital cities in a continent organised by largest population to smallest. Yes Screenshot of terminal
Screenshot of terminal
19 All the capital cities in a region organised by largest to smallest. Yes Screenshot of terminal
20 The top N populated capital cities in the world where N is provided by the user. Yes Screenshot of terminal
21 The top N populated capital cities in a continent where N is provided by the user. Yes Screenshot of terminal
22 The top N populated capital cities in a region where N is provided by the user. Yes Screenshot of terminal
23 The population of people, people living in cities, and people not living in cities in each continent. Yes Screenshot of terminal
24 The population of people, people living in cities, and people not living in cities in each region. Yes Screenshot of terminal
25 The population of people, people living in cities, and people not living in cities in each country. Yes Screenshot of terminal
Screenshot of terminal
26 The population of the world. Yes Screenshot of terminal
27 The population of a continent. Yes Screenshot of terminal
28 The population of a region. Yes Screenshot of terminal
29 The population of a country. Yes Screenshot of terminal
30 The population of a district. Yes Screenshot of terminal
31 The population of a city. Yes Screenshot of terminal
32 The number of people who speak Chinese, English, Hindi, Spanish, and Arabic, from greatest to smallest, including the percentage of the world population Yes Screenshot of terminal

Coverage

Each square is a file, color-coded to how much of it is being tested.

Grid map of code coverage

Dev Notes

  • The .env file stores some repeated variables for the build process for the docker containers
  • The ./build.sh file simply builds the Maven project, then builds the docker containers
    • You can run the file from your command line by typing ./build.sh
  • The ./start.sh file starts the entire project, it works similarly to above, and will build the project if it needs to, but if you edit it, you will need to rerun ./build.sh
  • To completely reset all the docker containers, run: docker compose rm, and select "Yes"
  • Changing MYSQL_ROOT_PASSWORD requires docker compose rm to be run

About

Software Engineering Methods Coursework Project - Group 3

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Contributors 5

Languages