ComputerScienceExpert

(11)

$18/per page/

About ComputerScienceExpert

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Applied Sciences,Calculus See all
Applied Sciences,Calculus,Chemistry,Computer Science,Environmental science,Information Systems,Science Hide all
Teaching Since: Apr 2017
Last Sign in: 103 Weeks Ago, 4 Days Ago
Questions Answered: 4870
Tutorials Posted: 4863

Education

  • MBA IT, Mater in Science and Technology
    Devry
    Jul-1996 - Jul-2000

Experience

  • Professor
    Devry University
    Mar-2010 - Oct-2016

Category > Programming Posted 22 May 2017 My Price 8.00

Fulton Schools of Engineering

Draw a UML diagram (with correct dependency, aggregation, composition, inheritance etc.) for the Java program listed below:

Note: I know this code is bad and should be using inheritence etc. I just need opinions on how it all fits together as it is now. Don't worry about showing the method names and data members. I just need to see how the classes relate to eachother.

----------------------------------------------------------------------------------------

public class university
{ public static void main(String[] args)
{
     School engSchool = new School("Fulton Schools of Engineering");

   Student s = new Student("John", "William", "Freshman", "CS/CSE", 3.5);
   Faculty f = new Faculty("Janaka", "Balasooriya", "CIDSE", "SOA", false, 1000.00, 0);
   OfficeStaff os= new OfficeStaff("Nancy", "Wilfred", true , 0, 20.00);
   TechnicalSupportStaff ts = new TechnicalSupportStaff("Chris", "Kevin" , "Database", false, 12000.50, 0);

   engSchool.addstudent(s);
   engSchool.addfaculty(f);
   engSchool.addofficeStaff(os);
   engSchool.addTSS(ts);

   engSchool.displaySchoolInfo();
}
}

----------------------------------------------------------------------------------------

public class School
{

private String schoolName;
private ArrayList <Student> students;
private ArrayList <Faculty> faculty;
private ArrayList <OfficeStaff> o_staff;
private ArrayList <TechnicalSupportStaff> ts_staff;

public School(String name)
{

schoolName = name;
students = new ArrayList();
faculty = new ArrayList();
o_staff = new ArrayList();
ts_staff = new ArrayList();

}

----------------------------------------------------------------------------------------

public class Faculty
{

private String firstName;
private String lastName;
private String department;
private String researchArea;
private double monthly_salary;
private boolean hourlyPaid;
private double hourlyRate;

public Faculty(String fName, String lName, String dep, String res, boolean hp, double ms, double hr)
{
firstName= fName;
lastName = lName;
department = dep;
researchArea = res;
hourlyPaid = hp;
monthly_salary = ms;
hourlyRate = hr;

}
public void viewFaculty()
{

System.out.println();
System.out.println("First Name:" + firstName);
System.out.println("Last Name:" + lastName);
System.out.println("Department:" + department);
System.out.println("Research Area:" + researchArea);
if(hourlyPaid)
   System.out.println("Hourly Rate:" + hourlyRate);
else
   System.out.println("Monthly Salary:" + monthly_salary);
}
}

----------------------------------------------------------------------------------------

Office Staff, Student, and TechnicalSupport all have the same methods as 'Faculty'.

Answers

(11)
Status NEW Posted 22 May 2017 02:05 AM My Price 8.00

-----------

Attachments

file 1495419392-Solutions file 2.docx preview (51 words )
H-----------ell-----------o S-----------ir/-----------Mad-----------am ----------- Th-----------ank----------- yo-----------u f-----------or -----------you-----------r i-----------nte-----------res-----------t a-----------nd -----------buy-----------ing----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n. -----------Ple-----------ase----------- pi-----------ng -----------me -----------on -----------cha-----------t I----------- am----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I w-----------ill----------- be----------- qu-----------ick-----------ly -----------onl-----------ine----------- an-----------d g-----------ive----------- yo-----------u e-----------xac-----------t f-----------ile----------- an-----------d t-----------he -----------sam-----------e f-----------ile----------- is----------- al-----------so -----------sen-----------t t-----------o y-----------our----------- em-----------ail----------- th-----------at -----------is -----------reg-----------ist-----------ere-----------d o-----------n -----------THI-----------S W-----------EBS-----------ITE-----------. ----------- Th-----------ank----------- yo-----------u -----------
Not Rated(0)