From fae15542fbd227a57aed975b319c6b081b00706a Mon Sep 17 00:00:00 2001 From: rebenely Date: Fri, 23 Mar 2018 15:25:44 +0800 Subject: [PATCH] comments added --- .../com/cs192/upcc/InputSubjectFragment.java | 15 +++++++-- .../upcc/MySubjectRecyclerViewAdapter.java | 6 +--- .../src/main/java/com/cs192/upcc/Student.java | 32 +++++++++++++++++-- 3 files changed, 43 insertions(+), 10 deletions(-) diff --git a/Android Studio Files/app/src/main/java/com/cs192/upcc/InputSubjectFragment.java b/Android Studio Files/app/src/main/java/com/cs192/upcc/InputSubjectFragment.java index 9311f76..a1f5e85 100644 --- a/Android Studio Files/app/src/main/java/com/cs192/upcc/InputSubjectFragment.java +++ b/Android Studio Files/app/src/main/java/com/cs192/upcc/InputSubjectFragment.java @@ -587,6 +587,18 @@ public boolean onLongClick(View view) { return v; } + /* + * Name: createDivider + * Creation Date: 2/19/18 + * Purpose: creates a divider + * Arguments: + * none + * Other Requirements: + * none + * Return Value: View - the divider v + * + * vipul mittal. https://stackoverflow.com/questions/21098618/how-to-make-horizontal-line-in-android-programmatically. Last Accessed: 1/28/18 + */ private View createDivider() { View v_d = new View(v.getContext()); v_d.setLayoutParams(new LinearLayout.LayoutParams( @@ -598,9 +610,6 @@ private View createDivider() { return v_d; } - private void onClickMisc(View view) { - - } /* * Name: setClickEffect diff --git a/Android Studio Files/app/src/main/java/com/cs192/upcc/MySubjectRecyclerViewAdapter.java b/Android Studio Files/app/src/main/java/com/cs192/upcc/MySubjectRecyclerViewAdapter.java index 62707f7..bed5f03 100644 --- a/Android Studio Files/app/src/main/java/com/cs192/upcc/MySubjectRecyclerViewAdapter.java +++ b/Android Studio Files/app/src/main/java/com/cs192/upcc/MySubjectRecyclerViewAdapter.java @@ -35,11 +35,7 @@ import java.util.List; -/** - * {@link RecyclerView.Adapter} that can display a {@link DummyItem} and makes a call to the - * specified {@link OnListFragmentInteractionListener}. - * TODO: Replace the implementation with code for your data type. - */ + public class MySubjectRecyclerViewAdapter extends RecyclerView.Adapter { private final List mValues; //loaded values diff --git a/Android Studio Files/app/src/main/java/com/cs192/upcc/Student.java b/Android Studio Files/app/src/main/java/com/cs192/upcc/Student.java index eaccd4d..827db0d 100644 --- a/Android Studio Files/app/src/main/java/com/cs192/upcc/Student.java +++ b/Android Studio Files/app/src/main/java/com/cs192/upcc/Student.java @@ -479,13 +479,31 @@ public StringBuffer viewSubject(){ } return buffer; } - + /* + * Name: setStanding + * Creation Date: 3/23/18 + * Purpose: updates student standing + * Arguments: + * aStanding + * Other Requirements: + * none + * Return Value: void + */ public void setStanding(int aStanding){ this.standing = aStanding; } - + /* + * Name: updateStanding + * Creation Date: 3/23/18 + * Purpose: updates student standing + * Arguments: + * aStanding + * Other Requirements: + * none + * Return Value: void + */ public void updateStanding(){ if( totalUnits >= unitsPerYear[1] ){ setStanding(UPCC.STUDENT_SOPHOMORE); @@ -498,6 +516,16 @@ public void updateStanding(){ setStanding(UPCC.STUDENT_SENIOR); } } + /* + * Name: getStanding + * Creation Date: 3/23/18 + * Purpose: gets student standing + * Arguments: + * none + * Other Requirements: + * none + * Return Value: int + */ public int getStanding(){ return this.standing; }