Giter Club home page Giter Club logo

java-text-based-program's Introduction

Java-Text-Based-Program-Project

Implement a text-based program using Java language and OOP techniques.

Video Demonstration: https://youtu.be/mXBVpvW7YEs

Local Environment Setup

  • This part is intended to guide RMIT grading staff to set up their local environment to host our application correctly for grading purposes, as requested by our instructor @TriDang. Ignore this part if it is not applicable to you.
  • Please make sure that you have IntelliJ IDEA version 2021.1 installed on your system. No other software or libraries are required.
  • Your work will be tested on a Windows 10 64-bit machine, using Java 16 JVM
  • The following files are required: source code and supported files. Your source code should be organized according to your package structure
  • Don't put the git folder into your submission
  • The entry point of our program is Main.java.
  • Note:
  • There is a README file on the root directory of your submission. It needs to contain contribution information, the GitHub repo URL of your project, and the link to your video demonstration (your video should be uploaded to YouTube - the uploaded time is used to check for late submission)

Class Diagram

  • Java-Text-Based-Program-Class-Diagram

Requirements

1. Three Main Parts

  • OOP design and implementation: you need to design and implement a class hierarchy to make your program flexible and easy to maintain
  • Problem-solving tasks: you need to apply control statements, algorithms, data structures, etc. to solve particular tasks
  • Video demonstration: you need to create a short video (less than 10 minutes) consisting of 2 parts. Part 1 explains how you analyze, design, and implement the system. Part 2 shows a working demo of your system

2. Background

The COVID-19 pandemic is becoming worse over time. Although not having a firm background in medicine and health, you want to contribute to the community in fighting this battle. By reading science articles, you know that health decision-makers need to process a lot of data to make informed and insightful decisions. Possessing several RMIT programming–related courses' HD under your belt (even though your lecturer deliberately limits the number of HDs to just around 10%), you know that you can create an intensive data processing and analytics tool that may be beneficial to policymakers.

3. General Requirements

The most important weapon you need for this project is data. Fortunately, pandemic data is made available by many organizations. The data file used in this project is provided by WHO. It's a CSV file. However, it has been deleted some unused columns. The column names are straightforward, as well as the data. You can get the data here. (https://raw.githubusercontent.com/TriDang/cosc2081/main/assignments/project/covid-data.csv)

Note: Dr. Tri has not checked the data thoroughly. From what I learn so far, the data is sorted by country, then by date. The dates are consecutive without any gaps. If there are any missing dates (i.e., there are gaps), you can treat the missing dates as they contain all zero)

4. Specific Requirements

You will use the OOP paradigm to design and develop this project. There are 3 main object hierarchies in this project.

a. Data: each data object has a geographic area, which can be either a country (e.g., Vietnam) or a continent (e.g., Asia), and a time range. The time range can be specified as one of the following:

  • A pair of start date and end dates (inclusive) (e.g., 1/1/2021 and 8/1/2021)
  • A number of days or weeks from a particular date (e.g., 2 days from 1/20/2021 means there are 3 days 1/20/2021, 1/21/2021, and 1/22/2021)
  • A number of days or weeks to a particular date (e.g., 1 week to 1/8/2021 means there are 8 days from 1/1/2021 to 1/8/2021)

b. Summary: this is the data after processed and ready to display. To create summary data, original data are grouped (b.1), a metric is chosen (b.2), and a result is calculated (b.3).

Original data are grouped (b.1)

The possible ways of specifying groupings are (explanation of b.1):

No grouping: each day is a separate group.

Number of groups: a number is specified, and you must divide your data into that number of groups. You need to divide your data as equally as possible. For example, if your data consist of 10 days (day 1 to day 10) and 3 groups are needed, then you can divide your data into either

[day 1 to day 3] [day 4 to day 6] [day 7 to day 10]
[day 1 to day 3] [day 4 to day 7] [day 8 to day 10]
[day 1 to day 4] [day 5 to day 7] [day 8 to day 10]

Note that you can only put consecutive days into a group. In other words, putting day 1, day 2, and day 4 into a group is invalid.

** number of days:** a number is specified and you divide your data into groups so that each group contains that number of days. For this grouping, if it is not possible to divide groups equally, raise an error telling the caller about that. For example, if your data consist of 10 days (day 1 to day 10) and 5 days per group are needed, you can divide your data into 2 groups. "Number of days" like 3 or 4 are invalid in this case.

A metric is chosen (b.2)

After specifying a grouping method, a metric is chosen. There are 3 possible metrics (explanation of b.2): positive cases, deaths, and people vaccinated.

A result is calculated (b.3)

Finally, users of your program can choose one of the following result types (explanation of 2.3)

  • New Total: total new cases/new deaths/new vaccinated people in a group.

Note: the vaccinated column contains the accumulated values up to a date, not new data for each date as new cases and new deaths columns. So, you can calculate vaccinated2 – vaccinated1 to get the new vaccinated after day 1 up today 2

  • Up To: total cases/deaths/vaccinated from the beginning up to the last date of a group

c. Display: summary data is displayed to viewers. There are 2 ways to display data

Tabular display:
  • Display summary data in a table. There are 2 columns: the first column named "Range" and the second column named "Value." In the table, display a row for each group.
  • For each group, the "Range" column shows "date1 – date2," where date1 and date2 are the first dates and last dates of a group, respectively. If a group contains just 1 date, it shows that date only. The "Value" column of a group shows the calculated value (New Total or Up To) described above.
RANGE VALUE
[b.1] [b.3]
Chart display:
  • Display summary data in a textual chart. The chart area consists of 24 rows x 80 cols.
  • The x-coordinate direction is left to right, and the they-coordinate direction is from bottom to top. The x-coordinate represents the groups, and the they-coordinate represents the calculated summary results.
  • You should position the groups as equally as possible on the x-coordinate. And you should use the minimum and maximum result values to position a result on the y-coordinate linearly (RATIO).
  • The left-most column should display all | (pipe) characters, while the bottom-most row should display all _ (underscore) characters. (That means you have 23 rows and 79 columns left to display data points).
  • Each summary data point is represented as an asterisk *.
User interface

Your program should show a menu that lets users choose data (area and range), summary (grouping condition, metric, and way of calculation), and Display (tabular or chart). Users can continue as many times as they want. They can choose to end the program when they finish.


Implementation

2. Coding styles & conventions

IntelliJ IDEA

Java

eg:

  • Class Name: (n) Student, ThuJavaClass
  • Interface Name (adj) Runable, Serializable
  • Constructor: Abc()
  • Variable name: sname, stockprice
  • Method: (v) abc(), run(), actionPerformed()
  • Constant: DENSITY, MIN_PRICE

Scrum Guide

Git Guide

Gitflow

3. Key people


java-text-based-program's People

Contributors

imgbotapp avatar lacnham avatar linh-0v0 avatar nhatnguyen3001 avatar tnathu-ai avatar

Watchers

 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.