Calculate my tuition fee in a semester, doing under OOP Java.
Calculate semester tuition fee in a .csv
file.
- Make sure you have at least Java JDK 8.
- This program use command-line arguments, takes
.csv
input and output format.
git clone
The .csv input file should looks like this:
class name | class credit | lab credit |
---|---|---|
Object Oriented Programming | 3 | 1 |
Java Programming | 3 | 1 |
Calculus 1 | 3 | 0 |
Calculus 1 (Lab) | 0 | 1 |
... | ... | ... |
-
Rename
tuition-fee-calc.config.example
totuition-fee-calc.config
:cp tuition-fee-calc.config.example tuition-fee-calc.config
-
Edit
tuition-fee-calc.config
:tuition-fee-calc.class=COST_OF_ONE_CLASS_CREDIT tuition-fee-calc.lab=COST_OF_ONE_LAB_CREDIT
Replace
COST_OF_ONE_CLASS_CREDIT
with cost of class credit,COST_OF_ONE_LAB_CREDIT
with cost of lab credit.
java src/Main.java <INPUT_FILE.csv> <OUTPUT_FILE.csv>
-
Rename
run.sh.example
:cp run.sh.example run.sh
-
Grant permissions:
chmod 0700 run.sh
-
Edit
run.sh
-
Run:
./run.sh
-
Testing:
cp test.sh.example test.sh sudo chmod 0700 test.sh ./test.sh