Skip to content

Commit 8932650

Browse files
committed
update
1 parent f75ada9 commit 8932650

File tree

3 files changed

+156
-29
lines changed

3 files changed

+156
-29
lines changed

Design Report.pdf

-360 KB
Binary file not shown.

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2019 Kennard Wang
3+
Copyright (c) 2019 Yuyang Wang (Kennard)
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 155 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,173 @@
11
# University-Grade-Management-System
2+
3+
> After attending the course LP002, Kennard completed a challengeable coursework,
4+
> with helping his instructor Henry Hong-Ning Dai to design a software for grade management.
5+
6+
------
7+
28
### Software Demo
3-
![UGMS](https://kennardwang.github.io/ImageSource/Project/UGMS.png)
9+
10+
![UGMS](https://kennardwang.github.io/ImageSource/University-Grade-Management-System/UGMS.png)
411

512
------
13+
614
### Development Environment
7-
+ System : **Windows 10 64bits**
8-
+ Language : **Java**
9-
+ JDK : **8u202**
10-
+ IDE : **Eclipse 2018-12 (4.10.0)**
11-
------
12-
### Download
13-
+ [Release](https://github.com/KennardWang/UGMS_GUI/releases)
15+
16+
| Description | Specification |
17+
|:---:|:---:|
18+
| System | Windows 10 |
19+
| Language | Java |
20+
| JDK | 8u202 |
21+
| IDE | Eclipse 2018-12 (4.10.0) |
22+
1423
------
15-
### Usage ( ***for Windows*** )
24+
25+
### User Manual
1626
+ Installation
27+
> 1. [Download](https://github.com/KennardWang/University-Grade-Management-System/releases) **jdk 8u202** and install.
28+
> 2. [Download](https://github.com/KennardWang/University-Grade-Management-System/releases) **UGMS_v2.1.jar**.
29+
> 3. Does not need other external plugins. You can execute jar file by `java -jar UGMS_v2.1.jar`.
1730
18-
1. Install JDK ( ***8u202 has been released*** )
19-
2. This project doesn't need other external plugins. You can import my java code into java IDE to run, or launch the `UGMS.GUI._2.1.jar` directly.
2031
+ Sort
32+
> 1. Click the **File** and choose **Open File** option.
33+
> 2. Choose a ***.txt*** course file and select the sort approach.
34+
> 3. Click the **Display** button.
35+
>
36+
> **P.S.** Before using GPA sort, please import required files first !
2137
22-
> 1. Click the `File` and choose `Open File` option.
23-
> 2. Choose a `.txt` course file and select the sort approach.
24-
> 3. Click the `Display` button.
25-
26-
> **P.S. GPA sort needs to import required files first !**
2738
+ Query
39+
> 1. Click the **File** and choose **Import File** option.
40+
> 2. Import all the ***.txt*** course files which you need and then select the query approach.
41+
> 3. Remember to input the corresponding query message.
42+
> Here is an example :
43+
> + ID : **1X09853X-X011-XXXX**
44+
> + Surname : **Weng**
45+
> + WildCard(surname) : **W, We, We, Weng ...** ( The first letter must be upper case )
46+
> + GPA Ranging: **> 3.0**, **= 3.0**, **< 3.0**, **>= 3,0**, **<= 3.0** ( Need space between the operator and the number )
47+
> 4. Click the **Query** button.
2848
29-
> 1. Click the `File` and choose `Import File` option.
30-
> 2. Import all the `.txt` course files which you need by this way and then select the query approach.
31-
> 3. Remember to input the corresponding query message. ( ***Example*** )
32-
> + ID : `1X09853X-X011-XXXX`
33-
> + Surname : `Weng`
34-
> + WildCard(surname) : `W, We, We, Weng ...` ( ***First letter must be upper case*** )
35-
> + GPA Ranging: `> 3.0`, `= 3.0`, `< 3.0`, `>= 3,0`, `<= 3.0` ( ***Need white space between the operator and the number*** )
36-
> 4. Click the `Query` button.
3749
------
38-
### Software Details
39-
+ [Design Report](https://github.com/KennardWang/UGMS_GUI/blob/master/Design%20Report.pdf)
50+
51+
### Design
52+
53+
![general](https://kennardwang.github.io/ImageSource/University-Grade-Management-System/general.png)
54+
55+
+ Student Class
56+
57+
![student](https://kennardwang.github.io/ImageSource/University-Grade-Management-System/Student.png)
58+
59+
+ Course Class
60+
61+
![course](https://kennardwang.github.io/ImageSource/University-Grade-Management-System/Course.png)
62+
63+
+ SortAlgorithms Class
64+
65+
![sort](https://kennardwang.github.io/ImageSource/University-Grade-Management-System/Sort.png)
66+
67+
+ GUI Class
68+
69+
![gui](https://kennardwang.github.io/ImageSource/University-Grade-Management-System/GUI.png)
70+
4071
------
72+
73+
### Data Structure
74+
+ Student Class
75+
76+
| Variable / Function Name | Data Structure | Description |
77+
|:---:|:---:|:---:|
78+
| sur/giv/id/score/Grade/GPA | Basic type (String/int/double) | The basic info of each student including surname, given name, id, score, Grade, GPA and so on |
79+
| credit | 2-dimension array | The student's real credit of every course. ( Parsed by Grade ) |
80+
| takecourse | String array | All the courses that the student takes |
81+
| courseCredit | Int array | Corresponding credit of each taken course |
82+
| Student() | / | Constructor |
83+
| getsur(), getgiv(), getid(), getscore(), getGrade(), getStuData() | / | Methods to read data from the source file and return corresponding value |
84+
| Grade2Credit() | / | Parse Grade to credit |
85+
| Credit2Grade() | / | Parse credit to Grade |
86+
| computeGPA() | / | Using credit/takecourse/courseCredit to compute the total GPA |
87+
88+
+ Course Class
89+
90+
| Variable / Function Name | Data Structure | Description |
91+
|:---:|:---:|:---:|
92+
| course/coName/credit/num | Basic type (String/int) |Basic info of a course|
93+
| GraCount | Int array | Count the number of students of each Grade |
94+
| highscore/lowscore/averscore | Int/double | Store the highest/lowest/average score of each course |
95+
| Course() | / | Constructor |
96+
| gerCourseData() | / | Read data from the source file and return corresponding value |
97+
98+
+ SortAlgorithms Class
99+
100+
| Variable / Function Name | Data Structure | Description |
101+
|:---:|:---:|:---:|
102+
| exchange() | / | Exchange two elements in an array|
103+
| less() | / |Compare two elements ( if former < latter then return true )|
104+
| sort() |/| Main sort algorithm |
105+
| sortField() | / | Sort data in one aspect |
106+
| sortWay() | Stack | Using stack to implement descent order |
107+
108+
+ GUI Class
109+
110+
| Variable / Function Name | Data Structure | Description |
111+
|:---:|:---:|:---:|
112+
| contentPane | JPanel |The JFrame window |
113+
| fr |JFrame |The Frame|
114+
| ReqInput | JTextField | The input of query |
115+
| CourseInput | JTextField | The input of course name |
116+
| Screen |JTextArea | The main screen |
117+
| CourseList| JTextArea| The list of course |
118+
| RadioButton 1&2 | JRadioButton | The ascending & descending button |
119+
| lblCredit | JLabel |The credit label |
120+
| lblNumberOfStudents | JLabel | The label of the student number |
121+
| AddButton&DeleteButton | JButton | Add&Delete course |
122+
| Choice_1 | JComboBox\<String> | Sort choice |
123+
| MenuBar | JMenuBar | Menu bar |
124+
| File | JMenu | Menu name |
125+
| closeItem/openItem/importItem | JMenuItem | Menu item |
126+
| openDia | FileDialog | File dialog |
127+
| sta | Stack | Store the course |
128+
| stu | Stack | Store the Student element |
129+
| index | int | Used to store course name |
130+
| num | int | Index of choice 1 |
131+
| num2 | int | Index of choice 2 |
132+
| main() | / | Start of the whole program |
133+
| myEvent() | void | Operation of the file |
134+
| GUI() | / | Constructor ( contains GUI components ) |
135+
| IsDifferent() | / | Judge whether the new element is repetitive or not |
136+
| IsDifferent(override) | / | Judge whether the new element is repetitive or not |
137+
| readtxt() | String array | Read the raw data and split it into groups |
138+
| display() | / | Reveal the data |
139+
| SortAndOutput() | / | Execute sort and display method |
140+
| Query() | / | Based on ReqInput, search for detailed data |
141+
142+
------
143+
144+
### Core Algorithm
145+
+ Sorting
146+
> Selection Sort, the complexity is O(N^2).
147+
148+
+ Searching
149+
> Sequential Search, search by each inputted course individually, the complexity is O(N^2).
150+
151+
+ Analysis
152+
> This program is based on once-input store, which means each time you input a course, the UGMS stores data of all the students who take this course at the same time. The number of one file data is less than 1000, so it is reasonable for a normal PC to execute for/while loop within 1 second ( Totally about 10^6, and 10^8 times per second for normal PC ).
153+
154+
------
155+
156+
### Feature
157+
1. Implement user-friendly GUI.
158+
2. Nice output format ( using JTable ).
159+
3. Implement some advanced query functions ( such as Surname Wild Card, GPA ranging ).
160+
4. Allow the user to add and delete courses according to their requirement.
161+
5. Can execute without other plugins and environment except JRE.
162+
6. The UGMS would prompt you sometimes by showing a message window or a check box.
163+
7. Unnecessary to worry about time consumption of sorting ( < 1 sec ).
164+
165+
------
166+
41167
### License
42-
+ [MIT License](https://github.com/KennardWang/UGMS_GUI/blob/master/LICENSE)
168+
+ [MIT License](https://github.com/KennardWang/University-Grade-Management-System/blob/master/LICENSE)
169+
43170
------
171+
44172
### Author
45173
+ Kennard Wang ( 2019.11.5 )
46-
------

0 commit comments

Comments
 (0)