Starting from:

$24.99

COP3330 Project 3 Solution


Note:
1) Projects can be completed in groups (max 4 per group) but submission onto WebCourses is individual. Once again, don’t copy anybody’s work nor give your code to anybody unless you seriously worked together on the project.



2) Please Submit one .java file. It should look like this:

public class Project2 {

public static void main(String[] args){
//Test code goes here
}

}

//--------------------------- class Abc{

}

//--------------------------- class Xyz{

}









3) If you work with a classmate(s), your .java file must contain the following comment:

/*
- Project 3
*/

Example:
/*
- Project 3
- Hatim Boustique, Ericka Edwards and Jamal Dubois
*/
public class Project3 {

public static void main(String[] args){
//Test code goes here
}

}
//--------------------------- inteface Int1 {

}
//---------------------------

class Abc{

}

//--------------------------- class Xyz{

}

Project 3 statement

Please read this entire statement carefully before you start doing anything…


For each of any class data member, your program must include the getters and the setters, and each class must include at least two constructors. The goal of this Project is to demonstrate the use of inheritance, abstract classes or interfaces, abstract methods and method overriding.


Student class has:
- Full name
- ID
- Gpa
- Number of credit hours currently taken


Faculty class has:
- Full name
- ID
- Department (mathematics, engineering, arts and science) - Rank (professor, adjunct)


Both classes Faculty and Student inherit from the abstract class Person. The abstract class Person has what’s common to both Faculty and Student, and it is left to you (the programmer) to come out with an abstract method that you implement in your classes Faculty and Student, say void printInfo();


Your code should handle any Input Mismatch Exceptions. In addition, you code must have a user-defined exception called IdException that handles the faculty and student ids entered by the user. Note that any id has to be of the form LetterLetterDigitDigitDigitDigit like el7894. See sample run below.

Test your code with one array of size 100 (or ArrayList) of type Person. The sample run below should give you a clear idea about how your code should run. The user’s entry is marked in bold so you can tell what your code should display to the screen and what the user enters.


Please note well that:
2) When asked to enter the enter the faulty department, matheMatics and MathematiCs are considered to be the same, and your program should display mathematics if faculty information is to be displayed to the screen. However, if the user enters Mathematics department, then this is an invalid entry.


Welcome to my Personal Management Program

Choose one of the options:
1- Add a new Faculty member
2- Add a new Student
3- Print tuition invoice for a student
4- Print information of a faculty
5- Exit Program
Enter your selection: 2

Enter the student’s info:
Name of Student: Julia Alvarez
ID: ju1254
Gpa: 3.26 Credit hours: 7
Thanks!

Choose one of the options:
1. Add a new Faculty member
2. Add a new Student
3. Print tuition invoice for a student
4. Print information of a faculty
5. Exit Program Enter your selection: 2

Enter the student’s info:
Name of Student: Matt Jones
ID: ma0258
Gpa: 2.78 Credit hours: 0 Thanks!
1- Add a new Faculty member
2- Add a new Student
3- Print tuition invoice for a student
4- Print information of a faculty
5- Exit Program
Enter your selection: a
Invalid entry- please try again

1- Add a new Faculty member
2- Add a new Student
3- Print tuition invoice for a student
4- Print information of a faculty
5- Exit Program
Enter your selection: 1



Enter the faculty’s info:
Name of the faculty: John Miller
ID: jo7894
Rank: Professor Department: Engineering
Thanks!

1- Add a new Faculty member
2- Add a new Student
3- Print tuition invoice for a student
4- Print information of a faculty
5- Exit Program
Enter your selection: 3

Enter the student’s id: ju1254
Here is the tuition invoice for Julia Alvarez :

---------------------------------------------------------------------------
Julia Alvarez ju1254
Credit Hours:7 ($236.45/credit hour)
Fees: $52

Total payment: $1,707.15 ($0 discount applied)

1- Add a new Faculty member
2- Add a new Student
3- Print tuition invoice for a student
4- Print information of a faculty
5- Exit Program
Enter your selection: 3

Enter the student’s id: eri856
Sorry-student not found!

1- Add a new Faculty member
2- Add a new Student
3- Print tuition invoice for a student
4- Print information of a faculty
5- Exit Program
Enter your selection: 4
Enter the faculty’s id: jo8578
Sorry jo8578 doesn’t exist
1- Add a new Faculty member
2- Add a new Student
3- Print tuition invoice for a student
4- Print information of a faculty
5- Exit Program
Enter your selection: 4
Enter the faculty’s id: JO7894
Faculty found:
---------------------------------------------------------------------------
John Miller
Engineering Department, Professor
---------------------------------------------------------------------------
1- Add a new Faculty member
2- Add a new Student
3- Print tuition invoice for a student
4- Print information of a faculty
5- Exit Program
Enter your selection: 1

Enter the faculty’s info:
Name of the faculty: Erika J. Jones
ID: e7894
Sorry Invalid id format-It has to be LetterLetterDigitDigitDigitDigit

1- Add a new Faculty member
2- Add a new Student
3- Print tuition invoice for a student
4- Print information of a faculty
5- Exit Program
Enter your selection: 5

Goodbye!


class Faculty extends Person implements SomeInterface class Student extends Person implements SomeInterface

But the issue is how can you have one array to manage both the Faculty and Student objects? If you are interested, please give me a call (321) 900-1696 and we’ll chat about a possible solution.

More products