Find Us On: Facebook Twitter Rss Feed Blog
Need To Register? Sign Up Login

Java Program

Hambeno
Hambeno 


Please help completing program. Attachments Tags
Clarifications

Answers

Advance Pay

sudheer488
sudheer488 



Advance Pay Attachments
Screenshots
Purchase Answer

Solution for the Grade Book

mariobeka
mariobeka 



Below you will find the fully implemented classes to run the program. All the classes are implemented as described in the uml diagram, also formatted with comments as required.
A screenshot of the program running is also provided.
Attachments
GradeBook.zip (9 K) Download
Preview
final int NUM_EXAMS = 2; public static

Preview
then sorts the roster * by last name. */ public Roster readGradebook() { Roster roster = readRoster(); roster.sortRoster(); return roster; } /** * Reads the homework scores for a Student. */ private void readHomework(Student pStudent) { for (int n = 0; n < CourseConstants.NUM_HOMEWORKS; ++n) { pStudent.addHomework(mIn.nextInt()); } } /**

Preview
GradebookWriter inherits from PrintWriter and writes the gradebook info to the file name passed to the ctor. */ public class GradebookWriter extends PrintWriter { /** * Default constructor which calls the * super

Preview
from "gradebook.txt". private Roster mRoster; // A reference to the View object. private View mView; /** * This is where execution starts. Instantiate a Main object and then call run(). */ public static void main(String[] pArgs) { Main main = new Main(); SwingUtilities.invokeLater(new Runnable() { @Override public void run() {

Preview
* Accessor method for mStudentList. */ public ArrayList<Student> getStudentList() { return mStudentList; } /** * setStudentList() * Mutator method for mStudentList. */ public void setStudentList(ArrayList<Student> pStudentList) { mStudentList = pStudentList; } /** * Sorts the student list in an ascending order by their last name. */ public void sortRoster() {

Preview
by his/her last name. * * @param mStudentList The student list. * @param pLastName The last name of the student. * @return The index of the student in the student list if the student is found, * or -1 if the student is not found. */ public static int

Preview
left++; right--; } } // the pivot position is where right points right now, so swap the pivot value there swap(pList, pFromIdx, right); // right contains the pivot value return right; } /** * Implements the quick sort algorithm in a recursive way. * * @param pList The student list.

Preview
@param pScore The new score. */ public void addHomework(int pScore) { mHomeworkList.add(pScore); } /** * Compares two Student objects by their last name. * * @param o The other student. * @return <code>-1</code> if the last name of this Student is < the last name of pStudent<br> * <code>0</code> if

Preview
mExamText[i] = new JTextField(5); panelExam.add(mExamText[i]); } // PSEUDOCODE: // Create a JPanel named panelButtons using FlowLayout. // Create the Clear button mClearButton. // Make this View the action listener for mClearButton. // Add the Clear button to the panel. // Repeat the three above statements for the Save button. //

Screen Shot 2015-11-17 at 15.06.51.png (50 K) Download Preview

gradebook.txt (1 K) Download Preview
15 17 22 18 80 60 Jetson George 20 21 22 23 70 83 Muntz Nelson 20 15 10 5 60 70 Simpson Lisa 25 25

Screenshots
Screenshot
Purchase Answer