Answer To: Laboratory 13: Law of Demeter Java API Javadoc for EasyGridBag In this lab, you will be designing...
Vidhi answered on Dec 04 2020
Completed Solution/a.JPG
Completed Solution/b.JPG
Completed Solution/Law of Demeter.zip
Law of Demeter/build.xml
Builds, tests, and runs the project Law of Demeter.
Law of Demeter/build/classes/.netbeans_automatic_build
Law of Demeter/build/classes/.netbeans_update_resources
Law of Demeter/build/classes/CenterFrame$1.class
synchronized class CenterFrame$1 extends java.awt.event.WindowAdapter {
void CenterFrame$1(CenterFrame);
public void windowClosing(java.awt.event.WindowEvent);
}
Law of Demeter/build/classes/CenterFrame.class
public abstract synchronized class CenterFrame extends javax.swing.JFrame {
public void CenterFrame(int, int, String);
private void center(int, int);
}
Law of Demeter/build/classes/EasyGridBag.class
public synchronized class EasyGridBag extends java.awt.GridBagLayout {
private java.awt.GridBagConstraints c;
private int rows;
private int columns;
private java.awt.Container cont;
public void EasyGridBag(int, int, java.awt.Container);
public void fillCellCenterWithinCell(int, int, java.awt.Component);
public void fillCellAlignWithinCell(int, int, int, java.awt.Component);
public void fillCellWithRowColSpan(int, int, int, int, int, java.awt.Component);
public void fillCellWithOffsets(int, int, int, int, int, int, int, java.awt.Component);
public void setRowWeight(int, double);
public void setColumnWeight(int, double);
}
Law of Demeter/build/classes/Lab.class
public synchronized class Lab {
private char grade;
private int partnerID;
public void Lab(char, int);
public void Lab();
public boolean isPresent();
public void setGrade(char);
public char getGrade();
public void setPartnerID(int);
public int getPartnerID();
}
Law of Demeter/build/classes/LabManagerDriver.class
public synchronized class LabManagerDriver {
public void LabManagerDriver();
public static void main(String[]);
}
Law of Demeter/build/classes/LabManagerView$1.class
synchronized class LabManagerView$1 extends java.awt.event.WindowAdapter {
void LabManagerView$1(LabManagerView);
public void windowClosing(java.awt.event.WindowEvent);
}
Law of Demeter/build/classes/LabManagerView$2.class
synchronized class LabManagerView$2 {
}
Law of Demeter/build/classes/LabManagerView$LabManagerController.class
synchronized class LabManagerView$LabManagerController implements java.awt.event.ActionListener {
private void LabManagerView$LabManagerController(LabManagerView);
public void actionPerformed(java.awt.event.ActionEvent);
}
Law of Demeter/build/classes/LabManagerView.class
public synchronized class LabManagerView extends CenterFrame {
private javax.swing.JComboBox cboSections;
private javax.swing.JComboBox cboLabs;
private javax.swing.JComboBox cboStudents;
private javax.swing.JComboBox cboGrades;
private Sections sections;
private javax.swing.JTextArea txtPartners;
private javax.swing.JTextField txtStudentInfo;
private javax.swing.JButton btnAddLab;
private javax.swing.JButton btnInactive;
private javax.swing.JButton btnNotPresent;
private javax.swing.JButton btnQuit;
private javax.swing.JButton btnPartnerList;
private javax.swing.JButton btnSave;
private javax.swing.JButton btnSetGrade;
private javax.swing.JLabel lblGrade;
private LabManagerView$LabManagerController lmc;
private void processGrade();
private void fillStudents();
private void fillLabs();
private void processSection();
private void processInactive();
private void processNotPresent();
private void fillTextArea();
private void processWriteFiles();
private void processQuit();
private void fillTextBox();
private void processPartnerList();
private void processAddLab();
public void LabManagerView(int, int, String, int, double[], int);
private javax.swing.JButton processButton(String, java.awt.Font, LabManagerView$LabManagerController);
}
Law of Demeter/build/classes/Labs.class
public synchronized class Labs {
private java.util.ArrayList labs;
public void Labs();
public int getNumLabs();
public void addLab(char, int);
public void addLab();
public void setGrade(int, char);
public char getGrade(int);
public void setPartnerID(int, int);
public int getPartnerID(int);
public boolean isPresent(int);
public char computeFinalGrade(double[]);
}
Law of Demeter/build/classes/Random.class
public synchronized class Random {
private static Random random;
private java.util.Random rand;
private void Random();
public static Random getRandomNumberGenerator();
public int randomInt(int, int);
public double randomFloat(int, int);
static void ();
}
Law of Demeter/build/classes/Section.class
public synchronized class Section {
private int sectionID;
private Students students;
private String file;
public void Section(int, int);
public int getSectionID();
public void setSectionID(int);
public Students getStudents();
public void setStudents(Students);
public String getFile();
public void setFile(String);
public void computePartners(Random);
public void writeFile(double[], int);
}
Law of Demeter/build/classes/section1.txt
1,Amon Amarth,Y,2,A,1,B,5,B,12
2,Arch Enemy,Y,2,A,15,A,4,C,5
3,Before The Dawn,Y,2,A,5,C,3,A,4
4,Behemoth,Y,2,A,14,A,2,A,3
5,Crionics,Y,2,A,3,B,1,C,2
6,Gorod,Y,1,C,10,B,9,F,0
7,Illdisposed,Y,1,A,8,C,11,B,11
8,Kalmah,Y,1,A,7,A,12,D,9
9,Kataklysm,Y,1,A,12,B,6,D,8
10,Neuraxis,N,1,C,6
11,Nile,Y,1,A,13,C,7,B,7
12,Obscura,Y,1,A,9,A,8,B,1
13,Omnium Gatherum,Y,1,A,11,C,15,C,14
14,Quo Vadis,Y,1,A,4,F,0,C,13
15,Testament,Y,1,A,2,C,13,F,0
Law of Demeter/build/classes/section2.txt
1,Anata,Y,2,A,11,F,0,A,11
2,Blind Stare,Y,2,A,7,F,0,A,0
3,Dark Tranquillity,Y,2,A,10,B,5,B,5
4,Detonation,Y,2,A,13,B,8,C,8
5,Dimension Zero,Y,2,C,16,B,3,B,3
6,Eternal Lies,Y,2,B,12,C,7,A,7
7,Fragments of Unbecoming,Y,2,A,2,C,6,A,6
8,Gates of Ishtar,Y,2,F,0,B,4,C,4
9,Graveworm,Y,1,A,14,C,15,B,16
10,In Thy Dreams,Y,1,A,3,C,14,A,14
11,Insomnium,Y,1,A,1,B,12,A,1
12,Immolation,Y,1,B,6,B,11,B,15
13,Impious,Y,1,A,4,C,16,F,0
14,Mors Principium Est,Y,1,A,9,C,10,A,10
15,Swallow The Sun,Y,1,F,0,C,9,B,12
16,Trauma,Y,1,C,5,C,13,B,9
Law of Demeter/build/classes/Sections.class
public synchronized class Sections {
private java.util.ArrayList sections;
private double[] grade_constants;
private int total_num_labs;
private Random rand;
public void Sections(int, double[], int);
public int getNumSections();
public int getNumStudents(int);
public int getNumLabs(int);
public int getNumLabs(int, int);
public int getPartnerID(int, int, int);
public String getStudentName(int, int);
public boolean isPresent(int, int, int);
public String studentInfo(int, int);
public String partnerList(int, int);
public void setInactive(int, int);
public void setNotPresent(int, int, int);
public void setGrade(int, int, int, char);
public void addLab(int);
public boolean isActive(int, int);
public void computePartners(int);
public void writeFiles();
}
Law of Demeter/build/classes/Student.class
public synchronized class Student {
private int studentID;
private String name;
private int rank;
private Labs labs;
private boolean active;
private boolean hasPartner;
public void Student(int, String, boolean, int, Labs);
public int getStudentID();
public void setStudentID(int);
public String getName();
public void setName(String);
public int getRank();
public void setRank(int);
public Labs getLabs();
public void setLabs(Labs);
public boolean isActive();
public void setActive(boolean);
public boolean hasPartner();
public void setHasPartner(boolean);
public boolean isPresent(int);
public int getNumLabs();
public void setPartnerID(int);
public char computeFinalGrade(double[]);
public String toString();
}
Law of Demeter/build/classes/Students.class
public synchronized class Students {
private java.util.ArrayList students;
private int current_labID;
private int max_rank;
public void Students(String, int);
private int determineCurrentLabNumber();
public java.util.ArrayList getStudents();
public void setStudents(java.util.ArrayList);
public String partnerList(int);
private int determineMaxRank();
public String getStudentName(int);
public String studentInfo(int);
public int getGrade(int, int);
private java.util.ArrayList getAvailableStudentsOfSpecificRank(int, Random);
private void checkAndCorrectForOdd(int, java.util.ArrayList, Random);
private int getRandomPartnerID(int, java.util.ArrayList, Random);
public void computePartners(Random);
private java.util.ArrayList readFile(String, int);
public void writeFile(String, double[], int);
private static String spaces(int);
}
Law of Demeter/manifest.mf
Manifest-Version: 1.0
X-COMMENT: Main-Class will be added automatically by build
Law of Demeter/nbproject/build-impl.xml
Must set src.dir
Must set test.src.dir
Must set build.dir
Must set dist.dir
Must set build.classes.dir
Must set dist.javadoc.dir
Must set build.test.classes.dir
Must set build.test.results.dir
Must set build.classes.excludes
Must set dist.jar
Must set javac.includes
No tests executed.
Must set JVM to use for profiling in profiler.info.jvm
Must set profiler agent JVM arguments in profiler.info.jvmargs.agent
Must select some files in the IDE or set javac.includes
To run this application from the command line without Ant, try:
java -jar "${dist.jar.resolved}"
Must select one file in the IDE or set run.class
Must select one file in the IDE or set run.class
...