Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix delete-bug for the wildcard, surname, id #2

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 25 additions & 21 deletions Source File/GUI.java
Original file line number Diff line number Diff line change
Expand Up @@ -1486,7 +1486,7 @@ public void actionPerformed(ActionEvent arg0) {
lblNewLabel.setBounds(31, 149, 81, 21);
contentPane.add(lblNewLabel);

//Ĭ��ģʽΪ FileDialog.LOAD
//Ĭ��ģʽΪ FileDialog.LOAD
openDia = new FileDialog(fr,"My Opening",FileDialog.LOAD);
myEvent();

Expand Down Expand Up @@ -1779,18 +1779,20 @@ public static void Query(int num2){
case 1:
if(ReqInput.getText().equals(st[i].id)) {

String str = st[i].sur + "," + st[i].giv + " " + st[i].id + "\n\n" + "Taken Course: \n";
String str = "";

// for jth course
for(int j = 0; j < st[i].takecourse.length; ++j) {

if(st[i].takecourse[j] == null) {continue;} // skip the empty course
str += st[i].takecourse[j] + ": " + st[i].Credit2Grade(st[i], j) + "\n";
if(st[i].takecourse[j] != null) {
str = st[i].sur + "," + st[i].giv + " " + st[i].id + "\n\n" + "Taken Course: \n";
str += st[i].takecourse[j] + ": " + st[i].Credit2Grade(st[i], j) + "\n";
str += "\nGPA: " + st[i].GPA;
}

}

str += "\nGPA: " + st[i].GPA;


JOptionPane.showMessageDialog(null, str); // output the message
}
break;
Expand All @@ -1806,19 +1808,17 @@ public static void Query(int num2){

if(ReqInput.getText().equals(st[i].sur)) {

++t2; // number of outcome +1

str2 += st[i].sur + "," + st[i].giv + " " + st[i].id + "\n" + "Taken Course: \n";

for(int j = 0; j < st[i].takecourse.length; ++j) {

if(st[i].takecourse[j] == null) {continue;} // skip the empty course
str2 += st[i].takecourse[j] + ": " + st[i].Credit2Grade(st[i], j) + "\n";

if(st[i].takecourse[j] != null) {
++t2; // number of outcome +1
str2 += st[i].sur + "," + st[i].giv + " " + st[i].id + "\n" + "Taken Course: \n";
str2 += st[i].takecourse[j] + ": " + st[i].Credit2Grade(st[i], j) + "\n";
str2 += "GPA: " + st[i].GPA + "\n\n";
}

}

str2 += "GPA: " + st[i].GPA + "\n\n";


}
break;

Expand All @@ -1837,16 +1837,20 @@ public static void Query(int num2){
}

if(r.matcher(st[i].sur).matches()) {
str3 += st[i].sur + "," + st[i].giv + " " + st[i].id + "\n" + "Taken Course: \n";

for(int j = 0; j < st[i].takecourse.length; ++j) {

if(st[i].takecourse[j] == null) {continue;} // skip the empty course
str3 += st[i].takecourse[j] + ": " + st[i].Credit2Grade(st[i], j) + "\n";
if(st[i].takecourse[j] != null) {
str3 += st[i].sur + "," + st[i].giv + " " + st[i].id + "\n" + "Taken Course: \n";
str3 += st[i].takecourse[j] + ": " + st[i].Credit2Grade(st[i], j) + "\n";
str3 += "GPA: " + st[i].GPA + "\n\n";
++t;
}


}

str3 += "GPA: " + st[i].GPA + "\n\n";
++t;


}

Expand Down