(3 Marks) You Have Main Function Which Is Saved On Folder Named Q1 Already. Use These
(3 Marks) You Have Main Function Which Is Saved On Folder Named Q1 Already. Use These
Question 1:
(3 marks) You have main function which is saved on folder named Q1 already. Use these
classes and functions to test all your operations in this question, DO NOT EDIT ANY CODE in
main function. You can add more operations/classes/interfaces to be able to answer the below
question.
Design and code a class named Person that holds information about a Person. Information of a
Person includes:
A string describes the name of a Person.
Design and code a deriving class named Worker from Person class that holds information about
a Worker. Information of a Worker includes:
A double-value holding working hours of a Worker.
A double-value holding the payment rate for a Worker.
Question 2:
(4 marks) You have main function which is saved on folder named Q2 already. Use these
classes and function to test all your operations in this question, DO NOT EDIT ANY CODE in
main. You can add more operations/classes/interfaces to be able to answer the below questions.
We had provided you:
1. Interface – IStudent which will declare some operations for an Student – DO NOT EDIT this
one.
2. You only need to complete the code in class MyStudent and Student.
Design and code a class named Student that holds information about an Student. Information of a
Student includes:
A string describing name of a Student.
A string describing major of a Student
Design and code a class named MyStudent which will implement interface IStudent and
complete 2 methods which were declared in IStudent (assume that number of Students in
list “s” is always greater than 2).
List<Student> f1(List<Student> s) –. Firstly, sort the list of Student “s” ascending by student name
(alphabet order), finally return the list of 2 first students in the list “s”. The sorting must ignores
the case during comparison.
int f2(ArrayList<Student> s) – count and return the number of students in the list “s” who are in
major of “SE”.
3 of 4 Paper No: 1
Question 3:
(3 marks) You have main function which is saved on folder named Q3 already. Use these
classes and functions to test all your operations in this question, DO NOT EDIT ANY CODE in
main function. You can add more operations/classes/interfaces to be able to answer the below
question.
Design and code a class named Flight, that holds information of a Flight, including:
A string describes route of a flight as the format of “departure–destination”, for example
HAN-MNL or CDG-SGN…
A whole number describes fare of a flight.
1
1 of 4 Paper No: 2
Question 1:
(3 marks) You have main function which is saved on folder named Q1 already. Use these
classes and functions to test all your operations in this question, DO NOT EDIT ANY CODE in
main function. You can add more operations/classes/interfaces to be able to answer the below
question.
Design and code a class named Person that holds information about a Person. Information of a
Person includes:
A string describes the name of a Person.
Design and code a deriving class named Worker from Person class that holds information about
a Worker. Information of a Worker includes:
A double-value holding working hours of a Worker.
A double-value holding the payment rate for a Worker.
Question 2:
(4 marks) You have main function which is saved on folder named Q2 already. Use these
classes and function to test all your operations in this question, DO NOT EDIT ANY CODE in
main. You can add more operations/classes/interfaces to be able to answer the below questions.
We had provided you:
1. Interface – IStudent which will declare some operations for an Student – DO NOT EDIT this
one.
2. You only need to complete the code in class MyStudent and Student.
Design and code a class named Student that holds information about an Student. Information of a
Student includes:
A string describing name of a Student.
A string describing major of a Student
Design and code a class named MyStudent which will implement interface IStudent and
complete 2 methods which were declared in IStudent (assume that number of Students in
list “s” is always greater than 2).
List<Student> f1(List<Student> s) –. Firstly, sort the list of Student “s” ascending by student name
(alphabet order), finally return the list of 2 first students in the list “s”. The sorting must ignores
the case during comparison.
int f2(ArrayList<Student> s) – count and return the number of students in the list “s” who are in
major of “SE”.
3 of 4 Paper No: 2
Question 3:
(3 marks) You have main function which is saved on folder named Q3 already. Use these
classes and functions to test all your operations in this question, DO NOT EDIT ANY CODE in
main function. You can add more operations/classes/interfaces to be able to answer the below
question.
Design and code a class named Flight, that holds information of a Flight, including:
A string describes route of a flight as the format of “departure–destination”, for example
HAN-MNL or CDG-SGN…
A whole number describes fare of a flight.
1
1 of 4 Paper No: 3
Question 1:
(3 marks) You have main function which is saved on folder named Q1 already. Use these
classes and functions to test all your operations in this question, DO NOT EDIT ANY CODE in
main function. You can add more operations/classes/interfaces to be able to answer the below
question.
Design and code a class named Person that holds information about a Person. Information of a
Person includes:
A string describes the name of a Person.
Design and code a deriving class named Worker from Person class that holds information about
a Worker. Information of a Worker includes:
A double-value holding working hours of a Worker.
A double-value holding the payment rate for a Worker.
Question 2:
(4 marks) You have main function which is saved on folder named Q2 already. Use these
classes and function to test all your operations in this question, DO NOT EDIT ANY CODE in
main. You can add more operations/classes/interfaces to be able to answer the below questions.
We had provided you:
1. Interface – IStudent which will declare some operations for an Student – DO NOT EDIT this
one.
2. You only need to complete the code in class MyStudent and Student.
Design and code a class named Student that holds information about an Student. Information of a
Student includes:
A string describing name of a Student.
A string describing major of a Student
Design and code a class named MyStudent which will implement interface IStudent and
complete 2 methods which were declared in IStudent (assume that number of Students in
list “s” is always greater than 2).
List<Student> f1(List<Student> s) –. Firstly, sort the list of Student “s” ascending by student name
(alphabet order), finally return the list of 2 first students in the list “s”. The sorting must ignores
the case during comparison.
int f2(ArrayList<Student> s) – count and return the number of students in the list “s” who are in
major of “SE”.
3 of 4 Paper No: 3
Question 3:
(3 marks) You have main function which is saved on folder named Q3 already. Use these
classes and functions to test all your operations in this question, DO NOT EDIT ANY CODE in
main function. You can add more operations/classes/interfaces to be able to answer the below
question.
Design and code a class named Flight, that holds information of a Flight, including:
A string describes route of a flight as the format of “departure–destination”, for example
HAN-MNL or CDG-SGN…
A whole number describes fare of a flight.
1
1 of 4 Paper No: 4
Question 1:
(3 marks) You have main function which is saved on folder named Q1 already. Use these
classes and functions to test all your operations in this question, DO NOT EDIT ANY CODE in
main function. You can add more operations/classes/interfaces to be able to answer the below
question.
Design and code a class named Person that holds information about a Person. Information of a
Person includes:
A string describes the name of a Person.
Design and code a deriving class named Worker from Person class that holds information about
a Worker. Information of a Worker includes:
A double-value holding working hours of a Worker.
A double-value holding the payment rate for a Worker.
Question 2:
(4 marks) You have main function which is saved on folder named Q2 already. Use these
classes and function to test all your operations in this question, DO NOT EDIT ANY CODE in
main. You can add more operations/classes/interfaces to be able to answer the below questions.
We had provided you:
1. Interface – IStudent which will declare some operations for an Student – DO NOT EDIT this
one.
2. You only need to complete the code in class MyStudent and Student.
Design and code a class named Student that holds information about an Student. Information of a
Student includes:
A string describing name of a Student.
A string describing major of a Student
Design and code a class named MyStudent which will implement interface IStudent and
complete 2 methods which were declared in IStudent (assume that number of Students in
list “s” is always greater than 2).
List<Student> f1(List<Student> s) –. Firstly, sort the list of Student “s” ascending by student name
(alphabet order), finally return the list of 2 first students in the list “s”. The sorting must ignores
the case during comparison.
int f2(ArrayList<Student> s) – count and return the number of students in the list “s” who are in
major of “SE”.
3 of 4 Paper No: 4
Question 3:
(3 marks) You have main function which is saved on folder named Q3 already. Use these
classes and functions to test all your operations in this question, DO NOT EDIT ANY CODE in
main function. You can add more operations/classes/interfaces to be able to answer the below
question.
Design and code a class named Flight, that holds information of a Flight, including:
A string describes route of a flight as the format of “departure–destination”, for example
HAN-MNL or CDG-SGN…
A whole number describes fare of a flight.
1
1 of 4 Paper No: 5
Question 1:
(3 marks) You have main function which is saved on folder named Q1 already. Use these
classes and functions to test all your operations in this question, DO NOT EDIT ANY CODE in
main function. You can add more operations/classes/interfaces to be able to answer the below
question.
Design and code a class named Person that holds information about a Person. Information of a
Person includes:
A string describes the name of a Person.
Design and code a deriving class named Worker from Person class that holds information about
a Worker. Information of a Worker includes:
A double-value holding working hours of a Worker.
A double-value holding the payment rate for a Worker.
Question 2:
(4 marks) You have main function which is saved on folder named Q2 already. Use these
classes and function to test all your operations in this question, DO NOT EDIT ANY CODE in
main. You can add more operations/classes/interfaces to be able to answer the below questions.
We had provided you:
1. Interface – IStudent which will declare some operations for an Student – DO NOT EDIT this
one.
2. You only need to complete the code in class MyStudent and Student.
Design and code a class named Student that holds information about an Student. Information of a
Student includes:
A string describing name of a Student.
A string describing major of a Student
Design and code a class named MyStudent which will implement interface IStudent and
complete 2 methods which were declared in IStudent (assume that number of Students in
list “s” is always greater than 2).
List<Student> f1(List<Student> s) –. Firstly, sort the list of Student “s” ascending by student name
(alphabet order), finally return the list of 2 first students in the list “s”. The sorting must ignores
the case during comparison.
int f2(ArrayList<Student> s) – count and return the number of students in the list “s” who are in
major of “SE”.
3 of 4 Paper No: 5
Question 3:
(3 marks) You have main function which is saved on folder named Q3 already. Use these
classes and functions to test all your operations in this question, DO NOT EDIT ANY CODE in
main function. You can add more operations/classes/interfaces to be able to answer the below
question.
Design and code a class named Flight, that holds information of a Flight, including:
A string describes route of a flight as the format of “departure–destination”, for example
HAN-MNL or CDG-SGN…
A whole number describes fare of a flight.
1
1 of 4 Paper No: 6
Question 1:
(3 marks) You have main function which is saved on folder named Q1 already. Use these
classes and functions to test all your operations in this question, DO NOT EDIT ANY CODE in
main function. You can add more operations/classes/interfaces to be able to answer the below
question.
Design and code a class named Person that holds information about a Person. Information of a
Person includes:
A string describes the name of a Person.
Design and code a deriving class named Worker from Person class that holds information about
a Worker. Information of a Worker includes:
A double-value holding working hours of a Worker.
A double-value holding the payment rate for a Worker.
Question 2:
(4 marks) You have main function which is saved on folder named Q2 already. Use these
classes and function to test all your operations in this question, DO NOT EDIT ANY CODE in
main. You can add more operations/classes/interfaces to be able to answer the below questions.
We had provided you:
1. Interface – IStudent which will declare some operations for an Student – DO NOT EDIT this
one.
2. You only need to complete the code in class MyStudent and Student.
Design and code a class named Student that holds information about an Student. Information of a
Student includes:
A string describing name of a Student.
A string describing major of a Student
Design and code a class named MyStudent which will implement interface IStudent and
complete 2 methods which were declared in IStudent (assume that number of Students in
list “s” is always greater than 2).
List<Student> f1(List<Student> s) –. Firstly, sort the list of Student “s” ascending by student name
(alphabet order), finally return the list of 2 first students in the list “s”. The sorting must ignores
the case during comparison.
int f2(ArrayList<Student> s) – count and return the number of students in the list “s” who are in
major of “SE”.
3 of 4 Paper No: 6
Question 3:
(3 marks) You have main function which is saved on folder named Q3 already. Use these
classes and functions to test all your operations in this question, DO NOT EDIT ANY CODE in
main function. You can add more operations/classes/interfaces to be able to answer the below
question.
Design and code a class named Flight, that holds information of a Flight, including:
A string describes route of a flight as the format of “departure–destination”, for example
HAN-MNL or CDG-SGN…
A whole number describes fare of a flight.
1
1 of 4 Paper No: 7
Question 1:
(3 marks) You have main function which is saved on folder named Q1 already. Use these
classes and functions to test all your operations in this question, DO NOT EDIT ANY CODE in
main function. You can add more operations/classes/interfaces to be able to answer the below
question.
Design and code a class named Person that holds information about a Person. Information of a
Person includes:
A string describes the name of a Person.
Design and code a deriving class named Worker from Person class that holds information about
a Worker. Information of a Worker includes:
A double-value holding working hours of a Worker.
A double-value holding the payment rate for a Worker.
Question 2:
(4 marks) You have main function which is saved on folder named Q2 already. Use these
classes and function to test all your operations in this question, DO NOT EDIT ANY CODE in
main. You can add more operations/classes/interfaces to be able to answer the below questions.
We had provided you:
1. Interface – IStudent which will declare some operations for an Student – DO NOT EDIT this
one.
2. You only need to complete the code in class MyStudent and Student.
Design and code a class named Student that holds information about an Student. Information of a
Student includes:
A string describing name of a Student.
A string describing major of a Student
Design and code a class named MyStudent which will implement interface IStudent and
complete 2 methods which were declared in IStudent (assume that number of Students in
list “s” is always greater than 2).
List<Student> f1(List<Student> s) –. Firstly, sort the list of Student “s” ascending by student name
(alphabet order), finally return the list of 2 first students in the list “s”. The sorting must ignores
the case during comparison.
int f2(ArrayList<Student> s) – count and return the number of students in the list “s” who are in
major of “SE”.
3 of 4 Paper No: 7
Question 3:
(3 marks) You have main function which is saved on folder named Q3 already. Use these
classes and functions to test all your operations in this question, DO NOT EDIT ANY CODE in
main function. You can add more operations/classes/interfaces to be able to answer the below
question.
Design and code a class named Flight, that holds information of a Flight, including:
A string describes route of a flight as the format of “departure–destination”, for example
HAN-MNL or CDG-SGN…
A whole number describes fare of a flight.
1
1 of 4 Paper No: 8
Question 1:
(3 marks) You have main function which is saved on folder named Q1 already. Use these
classes and functions to test all your operations in this question, DO NOT EDIT ANY CODE in
main function. You can add more operations/classes/interfaces to be able to answer the below
question.
Design and code a class named Person that holds information about a Person. Information of a
Person includes:
A string describes the name of a Person.
Design and code a deriving class named Worker from Person class that holds information about
a Worker. Information of a Worker includes:
A double-value holding working hours of a Worker.
A double-value holding the payment rate for a Worker.
Question 2:
(4 marks) You have main function which is saved on folder named Q2 already. Use these
classes and function to test all your operations in this question, DO NOT EDIT ANY CODE in
main. You can add more operations/classes/interfaces to be able to answer the below questions.
We had provided you:
1. Interface – IStudent which will declare some operations for an Student – DO NOT EDIT this
one.
2. You only need to complete the code in class MyStudent and Student.
Design and code a class named Student that holds information about an Student. Information of a
Student includes:
A string describing name of a Student.
A string describing major of a Student
Design and code a class named MyStudent which will implement interface IStudent and
complete 2 methods which were declared in IStudent (assume that number of Students in
list “s” is always greater than 2).
List<Student> f1(List<Student> s) –. Firstly, sort the list of Student “s” ascending by student name
(alphabet order), finally return the list of 2 first students in the list “s”. The sorting must ignores
the case during comparison.
int f2(ArrayList<Student> s) – count and return the number of students in the list “s” who are in
major of “SE”.
3 of 4 Paper No: 8
Question 3:
(3 marks) You have main function which is saved on folder named Q3 already. Use these
classes and functions to test all your operations in this question, DO NOT EDIT ANY CODE in
main function. You can add more operations/classes/interfaces to be able to answer the below
question.
Design and code a class named Flight, that holds information of a Flight, including:
A string describes route of a flight as the format of “departure–destination”, for example
HAN-MNL or CDG-SGN…
A whole number describes fare of a flight.
1
1 of 4 Paper No: 9
Question 1:
(3 marks) You have main function which is saved on folder named Q1 already. Use these
classes and functions to test all your operations in this question, DO NOT EDIT ANY CODE in
main function. You can add more operations/classes/interfaces to be able to answer the below
question.
Design and code a class named Person that holds information about a Person. Information of a
Person includes:
A string describes the name of a Person.
Design and code a deriving class named Worker from Person class that holds information about
a Worker. Information of a Worker includes:
A double-value holding working hours of a Worker.
A double-value holding the payment rate for a Worker.
Question 2:
(4 marks) You have main function which is saved on folder named Q2 already. Use these
classes and function to test all your operations in this question, DO NOT EDIT ANY CODE in
main. You can add more operations/classes/interfaces to be able to answer the below questions.
We had provided you:
1. Interface – IStudent which will declare some operations for an Student – DO NOT EDIT this
one.
2. You only need to complete the code in class MyStudent and Student.
Design and code a class named Student that holds information about an Student. Information of a
Student includes:
A string describing name of a Student.
A string describing major of a Student
Design and code a class named MyStudent which will implement interface IStudent and
complete 2 methods which were declared in IStudent (assume that number of Students in
list “s” is always greater than 2).
List<Student> f1(List<Student> s) –. Firstly, sort the list of Student “s” ascending by student name
(alphabet order), finally return the list of 2 first students in the list “s”. The sorting must ignores
the case during comparison.
int f2(ArrayList<Student> s) – count and return the number of students in the list “s” who are in
major of “SE”.
3 of 4 Paper No: 9
Question 3:
(3 marks) You have main function which is saved on folder named Q3 already. Use these
classes and functions to test all your operations in this question, DO NOT EDIT ANY CODE in
main function. You can add more operations/classes/interfaces to be able to answer the below
question.
Design and code a class named Flight, that holds information of a Flight, including:
A string describes route of a flight as the format of “departure–destination”, for example
HAN-MNL or CDG-SGN…
A whole number describes fare of a flight.
1
1 of 4 Paper No: 10
Question 1:
(3 marks) You have main function which is saved on folder named Q1 already. Use these
classes and functions to test all your operations in this question, DO NOT EDIT ANY CODE in
main function. You can add more operations/classes/interfaces to be able to answer the below
question.
Design and code a class named Person that holds information about a Person. Information of a
Person includes:
A string describes the name of a Person.
Design and code a deriving class named Worker from Person class that holds information about
a Worker. Information of a Worker includes:
A double-value holding working hours of a Worker.
A double-value holding the payment rate for a Worker.
Question 2:
(4 marks) You have main function which is saved on folder named Q2 already. Use these
classes and function to test all your operations in this question, DO NOT EDIT ANY CODE in
main. You can add more operations/classes/interfaces to be able to answer the below questions.
We had provided you:
1. Interface – IStudent which will declare some operations for an Student – DO NOT EDIT this
one.
2. You only need to complete the code in class MyStudent and Student.
Design and code a class named Student that holds information about an Student. Information of a
Student includes:
A string describing name of a Student.
A string describing major of a Student
Design and code a class named MyStudent which will implement interface IStudent and
complete 2 methods which were declared in IStudent (assume that number of Students in
list “s” is always greater than 2).
List<Student> f1(List<Student> s) –. Firstly, sort the list of Student “s” ascending by student name
(alphabet order), finally return the list of 2 first students in the list “s”. The sorting must ignores
the case during comparison.
int f2(ArrayList<Student> s) – count and return the number of students in the list “s” who are in
major of “SE”.
3 of 4 Paper No: 10
Question 3:
(3 marks) You have main function which is saved on folder named Q3 already. Use these
classes and functions to test all your operations in this question, DO NOT EDIT ANY CODE in
main function. You can add more operations/classes/interfaces to be able to answer the below
question.
Design and code a class named Flight, that holds information of a Flight, including:
A string describes route of a flight as the format of “departure–destination”, for example
HAN-MNL or CDG-SGN…
A whole number describes fare of a flight.
1
1 of 4 Paper No: 11
Question 1:
(3 marks) You have main function which is saved on folder named Q1 already. Use these
classes and functions to test all your operations in this question, DO NOT EDIT ANY CODE in
main function. You can add more operations/classes/interfaces to be able to answer the below
question.
Design and code a class named Person that holds information about a Person. Information of a
Person includes:
A string describes the name of a Person.
Design and code a deriving class named Worker from Person class that holds information about
a Worker. Information of a Worker includes:
A double-value holding working hours of a Worker.
A double-value holding the payment rate for a Worker.
Question 2:
(4 marks) You have main function which is saved on folder named Q2 already. Use these
classes and function to test all your operations in this question, DO NOT EDIT ANY CODE in
main. You can add more operations/classes/interfaces to be able to answer the below questions.
We had provided you:
1. Interface – IStudent which will declare some operations for an Student – DO NOT EDIT this
one.
2. You only need to complete the code in class MyStudent and Student.
Design and code a class named Student that holds information about an Student. Information of a
Student includes:
A string describing name of a Student.
A string describing major of a Student
Design and code a class named MyStudent which will implement interface IStudent and
complete 2 methods which were declared in IStudent (assume that number of Students in
list “s” is always greater than 2).
List<Student> f1(List<Student> s) –. Firstly, sort the list of Student “s” ascending by student name
(alphabet order), finally return the list of 2 first students in the list “s”. The sorting must ignores
the case during comparison.
int f2(ArrayList<Student> s) – count and return the number of students in the list “s” who are in
major of “SE”.
3 of 4 Paper No: 11
Question 3:
(3 marks) You have main function which is saved on folder named Q3 already. Use these
classes and functions to test all your operations in this question, DO NOT EDIT ANY CODE in
main function. You can add more operations/classes/interfaces to be able to answer the below
question.
Design and code a class named Flight, that holds information of a Flight, including:
A string describes route of a flight as the format of “departure–destination”, for example
HAN-MNL or CDG-SGN…
A whole number describes fare of a flight.
1
1 of 4 Paper No: 12
Question 1:
(3 marks) You have main function which is saved on folder named Q1 already. Use these
classes and functions to test all your operations in this question, DO NOT EDIT ANY CODE in
main function. You can add more operations/classes/interfaces to be able to answer the below
question.
Design and code a class named Person that holds information about a Person. Information of a
Person includes:
A string describes the name of a Person.
Design and code a deriving class named Worker from Person class that holds information about
a Worker. Information of a Worker includes:
A double-value holding working hours of a Worker.
A double-value holding the payment rate for a Worker.
Question 2:
(4 marks) You have main function which is saved on folder named Q2 already. Use these
classes and function to test all your operations in this question, DO NOT EDIT ANY CODE in
main. You can add more operations/classes/interfaces to be able to answer the below questions.
We had provided you:
1. Interface – IStudent which will declare some operations for an Student – DO NOT EDIT this
one.
2. You only need to complete the code in class MyStudent and Student.
Design and code a class named Student that holds information about an Student. Information of a
Student includes:
A string describing name of a Student.
A string describing major of a Student
Design and code a class named MyStudent which will implement interface IStudent and
complete 2 methods which were declared in IStudent (assume that number of Students in
list “s” is always greater than 2).
List<Student> f1(List<Student> s) –. Firstly, sort the list of Student “s” ascending by student name
(alphabet order), finally return the list of 2 first students in the list “s”. The sorting must ignores
the case during comparison.
int f2(ArrayList<Student> s) – count and return the number of students in the list “s” who are in
major of “SE”.
3 of 4 Paper No: 12
Question 3:
(3 marks) You have main function which is saved on folder named Q3 already. Use these
classes and functions to test all your operations in this question, DO NOT EDIT ANY CODE in
main function. You can add more operations/classes/interfaces to be able to answer the below
question.
Design and code a class named Flight, that holds information of a Flight, including:
A string describes route of a flight as the format of “departure–destination”, for example
HAN-MNL or CDG-SGN…
A whole number describes fare of a flight.
1
1 of 4 Paper No: 13
Question 1:
(3 marks) You have main function which is saved on folder named Q1 already. Use these
classes and functions to test all your operations in this question, DO NOT EDIT ANY CODE in
main function. You can add more operations/classes/interfaces to be able to answer the below
question.
Design and code a class named Person that holds information about a Person. Information of a
Person includes:
A string describes the name of a Person.
Design and code a deriving class named Worker from Person class that holds information about
a Worker. Information of a Worker includes:
A double-value holding working hours of a Worker.
A double-value holding the payment rate for a Worker.
Question 2:
(4 marks) You have main function which is saved on folder named Q2 already. Use these
classes and function to test all your operations in this question, DO NOT EDIT ANY CODE in
main. You can add more operations/classes/interfaces to be able to answer the below questions.
We had provided you:
1. Interface – IStudent which will declare some operations for an Student – DO NOT EDIT this
one.
2. You only need to complete the code in class MyStudent and Student.
Design and code a class named Student that holds information about an Student. Information of a
Student includes:
A string describing name of a Student.
A string describing major of a Student
Design and code a class named MyStudent which will implement interface IStudent and
complete 2 methods which were declared in IStudent (assume that number of Students in
list “s” is always greater than 2).
List<Student> f1(List<Student> s) –. Firstly, sort the list of Student “s” ascending by student name
(alphabet order), finally return the list of 2 first students in the list “s”. The sorting must ignores
the case during comparison.
int f2(ArrayList<Student> s) – count and return the number of students in the list “s” who are in
major of “SE”.
3 of 4 Paper No: 13
Question 3:
(3 marks) You have main function which is saved on folder named Q3 already. Use these
classes and functions to test all your operations in this question, DO NOT EDIT ANY CODE in
main function. You can add more operations/classes/interfaces to be able to answer the below
question.
Design and code a class named Flight, that holds information of a Flight, including:
A string describes route of a flight as the format of “departure–destination”, for example
HAN-MNL or CDG-SGN…
A whole number describes fare of a flight.
1
1 of 4 Paper No: 14
Question 1:
(3 marks) You have main function which is saved on folder named Q1 already. Use these
classes and functions to test all your operations in this question, DO NOT EDIT ANY CODE in
main function. You can add more operations/classes/interfaces to be able to answer the below
question.
Design and code a class named Person that holds information about a Person. Information of a
Person includes:
A string describes the name of a Person.
Design and code a deriving class named Worker from Person class that holds information about
a Worker. Information of a Worker includes:
A double-value holding working hours of a Worker.
A double-value holding the payment rate for a Worker.
Question 2:
(4 marks) You have main function which is saved on folder named Q2 already. Use these
classes and function to test all your operations in this question, DO NOT EDIT ANY CODE in
main. You can add more operations/classes/interfaces to be able to answer the below questions.
We had provided you:
1. Interface – IStudent which will declare some operations for an Student – DO NOT EDIT this
one.
2. You only need to complete the code in class MyStudent and Student.
Design and code a class named Student that holds information about an Student. Information of a
Student includes:
A string describing name of a Student.
A string describing major of a Student
Design and code a class named MyStudent which will implement interface IStudent and
complete 2 methods which were declared in IStudent (assume that number of Students in
list “s” is always greater than 2).
List<Student> f1(List<Student> s) –. Firstly, sort the list of Student “s” ascending by student name
(alphabet order), finally return the list of 2 first students in the list “s”. The sorting must ignores
the case during comparison.
int f2(ArrayList<Student> s) – count and return the number of students in the list “s” who are in
major of “SE”.
3 of 4 Paper No: 14
Question 3:
(3 marks) You have main function which is saved on folder named Q3 already. Use these
classes and functions to test all your operations in this question, DO NOT EDIT ANY CODE in
main function. You can add more operations/classes/interfaces to be able to answer the below
question.
Design and code a class named Flight, that holds information of a Flight, including:
A string describes route of a flight as the format of “departure–destination”, for example
HAN-MNL or CDG-SGN…
A whole number describes fare of a flight.
1
1 of 4 Paper No: 15
Question 1:
(3 marks) You have main function which is saved on folder named Q1 already. Use these
classes and functions to test all your operations in this question, DO NOT EDIT ANY CODE in
main function. You can add more operations/classes/interfaces to be able to answer the below
question.
Design and code a class named Person that holds information about a Person. Information of a
Person includes:
A string describes the name of a Person.
Design and code a deriving class named Worker from Person class that holds information about
a Worker. Information of a Worker includes:
A double-value holding working hours of a Worker.
A double-value holding the payment rate for a Worker.
Question 2:
(4 marks) You have main function which is saved on folder named Q2 already. Use these
classes and function to test all your operations in this question, DO NOT EDIT ANY CODE in
main. You can add more operations/classes/interfaces to be able to answer the below questions.
We had provided you:
1. Interface – IStudent which will declare some operations for an Student – DO NOT EDIT this
one.
2. You only need to complete the code in class MyStudent and Student.
Design and code a class named Student that holds information about an Student. Information of a
Student includes:
A string describing name of a Student.
A string describing major of a Student
Design and code a class named MyStudent which will implement interface IStudent and
complete 2 methods which were declared in IStudent (assume that number of Students in
list “s” is always greater than 2).
List<Student> f1(List<Student> s) –. Firstly, sort the list of Student “s” ascending by student name
(alphabet order), finally return the list of 2 first students in the list “s”. The sorting must ignores
the case during comparison.
int f2(ArrayList<Student> s) – count and return the number of students in the list “s” who are in
major of “SE”.
3 of 4 Paper No: 15
Question 3:
(3 marks) You have main function which is saved on folder named Q3 already. Use these
classes and functions to test all your operations in this question, DO NOT EDIT ANY CODE in
main function. You can add more operations/classes/interfaces to be able to answer the below
question.
Design and code a class named Flight, that holds information of a Flight, including:
A string describes route of a flight as the format of “departure–destination”, for example
HAN-MNL or CDG-SGN…
A whole number describes fare of a flight.
1
1 of 4 Paper No: 16
Question 1:
(3 marks) You have main function which is saved on folder named Q1 already. Use these
classes and functions to test all your operations in this question, DO NOT EDIT ANY CODE in
main function. You can add more operations/classes/interfaces to be able to answer the below
question.
Design and code a class named Person that holds information about a Person. Information of a
Person includes:
A string describes the name of a Person.
Design and code a deriving class named Worker from Person class that holds information about
a Worker. Information of a Worker includes:
A double-value holding working hours of a Worker.
A double-value holding the payment rate for a Worker.
Question 2:
(4 marks) You have main function which is saved on folder named Q2 already. Use these
classes and function to test all your operations in this question, DO NOT EDIT ANY CODE in
main. You can add more operations/classes/interfaces to be able to answer the below questions.
We had provided you:
1. Interface – IStudent which will declare some operations for an Student – DO NOT EDIT this
one.
2. You only need to complete the code in class MyStudent and Student.
Design and code a class named Student that holds information about an Student. Information of a
Student includes:
A string describing name of a Student.
A string describing major of a Student
Design and code a class named MyStudent which will implement interface IStudent and
complete 2 methods which were declared in IStudent (assume that number of Students in
list “s” is always greater than 2).
List<Student> f1(List<Student> s) –. Firstly, sort the list of Student “s” ascending by student name
(alphabet order), finally return the list of 2 first students in the list “s”. The sorting must ignores
the case during comparison.
int f2(ArrayList<Student> s) – count and return the number of students in the list “s” who are in
major of “SE”.
3 of 4 Paper No: 16
Question 3:
(3 marks) You have main function which is saved on folder named Q3 already. Use these
classes and functions to test all your operations in this question, DO NOT EDIT ANY CODE in
main function. You can add more operations/classes/interfaces to be able to answer the below
question.
Design and code a class named Flight, that holds information of a Flight, including:
A string describes route of a flight as the format of “departure–destination”, for example
HAN-MNL or CDG-SGN…
A whole number describes fare of a flight.
1
1 of 4 Paper No: 17
Question 1:
(3 marks) You have main function which is saved on folder named Q1 already. Use these
classes and functions to test all your operations in this question, DO NOT EDIT ANY CODE in
main function. You can add more operations/classes/interfaces to be able to answer the below
question.
Design and code a class named Person that holds information about a Person. Information of a
Person includes:
A string describes the name of a Person.
Design and code a deriving class named Worker from Person class that holds information about
a Worker. Information of a Worker includes:
A double-value holding working hours of a Worker.
A double-value holding the payment rate for a Worker.
Question 2:
(4 marks) You have main function which is saved on folder named Q2 already. Use these
classes and function to test all your operations in this question, DO NOT EDIT ANY CODE in
main. You can add more operations/classes/interfaces to be able to answer the below questions.
We had provided you:
1. Interface – IStudent which will declare some operations for an Student – DO NOT EDIT this
one.
2. You only need to complete the code in class MyStudent and Student.
Design and code a class named Student that holds information about an Student. Information of a
Student includes:
A string describing name of a Student.
A string describing major of a Student
Design and code a class named MyStudent which will implement interface IStudent and
complete 2 methods which were declared in IStudent (assume that number of Students in
list “s” is always greater than 2).
List<Student> f1(List<Student> s) –. Firstly, sort the list of Student “s” ascending by student name
(alphabet order), finally return the list of 2 first students in the list “s”. The sorting must ignores
the case during comparison.
int f2(ArrayList<Student> s) – count and return the number of students in the list “s” who are in
major of “SE”.
3 of 4 Paper No: 17
Question 3:
(3 marks) You have main function which is saved on folder named Q3 already. Use these
classes and functions to test all your operations in this question, DO NOT EDIT ANY CODE in
main function. You can add more operations/classes/interfaces to be able to answer the below
question.
Design and code a class named Flight, that holds information of a Flight, including:
A string describes route of a flight as the format of “departure–destination”, for example
HAN-MNL or CDG-SGN…
A whole number describes fare of a flight.
1
1 of 4 Paper No: 18
Question 1:
(3 marks) You have main function which is saved on folder named Q1 already. Use these
classes and functions to test all your operations in this question, DO NOT EDIT ANY CODE in
main function. You can add more operations/classes/interfaces to be able to answer the below
question.
Design and code a class named Person that holds information about a Person. Information of a
Person includes:
A string describes the name of a Person.
Design and code a deriving class named Worker from Person class that holds information about
a Worker. Information of a Worker includes:
A double-value holding working hours of a Worker.
A double-value holding the payment rate for a Worker.
Question 2:
(4 marks) You have main function which is saved on folder named Q2 already. Use these
classes and function to test all your operations in this question, DO NOT EDIT ANY CODE in
main. You can add more operations/classes/interfaces to be able to answer the below questions.
We had provided you:
1. Interface – IStudent which will declare some operations for an Student – DO NOT EDIT this
one.
2. You only need to complete the code in class MyStudent and Student.
Design and code a class named Student that holds information about an Student. Information of a
Student includes:
A string describing name of a Student.
A string describing major of a Student
Design and code a class named MyStudent which will implement interface IStudent and
complete 2 methods which were declared in IStudent (assume that number of Students in
list “s” is always greater than 2).
List<Student> f1(List<Student> s) –. Firstly, sort the list of Student “s” ascending by student name
(alphabet order), finally return the list of 2 first students in the list “s”. The sorting must ignores
the case during comparison.
int f2(ArrayList<Student> s) – count and return the number of students in the list “s” who are in
major of “SE”.
3 of 4 Paper No: 18
Question 3:
(3 marks) You have main function which is saved on folder named Q3 already. Use these
classes and functions to test all your operations in this question, DO NOT EDIT ANY CODE in
main function. You can add more operations/classes/interfaces to be able to answer the below
question.
Design and code a class named Flight, that holds information of a Flight, including:
A string describes route of a flight as the format of “departure–destination”, for example
HAN-MNL or CDG-SGN…
A whole number describes fare of a flight.
1
1 of 4 Paper No: 19
Question 1:
(3 marks) You have main function which is saved on folder named Q1 already. Use these
classes and functions to test all your operations in this question, DO NOT EDIT ANY CODE in
main function. You can add more operations/classes/interfaces to be able to answer the below
question.
Design and code a class named Person that holds information about a Person. Information of a
Person includes:
A string describes the name of a Person.
Design and code a deriving class named Worker from Person class that holds information about
a Worker. Information of a Worker includes:
A double-value holding working hours of a Worker.
A double-value holding the payment rate for a Worker.
Question 2:
(4 marks) You have main function which is saved on folder named Q2 already. Use these
classes and function to test all your operations in this question, DO NOT EDIT ANY CODE in
main. You can add more operations/classes/interfaces to be able to answer the below questions.
We had provided you:
1. Interface – IStudent which will declare some operations for an Student – DO NOT EDIT this
one.
2. You only need to complete the code in class MyStudent and Student.
Design and code a class named Student that holds information about an Student. Information of a
Student includes:
A string describing name of a Student.
A string describing major of a Student
Design and code a class named MyStudent which will implement interface IStudent and
complete 2 methods which were declared in IStudent (assume that number of Students in
list “s” is always greater than 2).
List<Student> f1(List<Student> s) –. Firstly, sort the list of Student “s” ascending by student name
(alphabet order), finally return the list of 2 first students in the list “s”. The sorting must ignores
the case during comparison.
int f2(ArrayList<Student> s) – count and return the number of students in the list “s” who are in
major of “SE”.
3 of 4 Paper No: 19
Question 3:
(3 marks) You have main function which is saved on folder named Q3 already. Use these
classes and functions to test all your operations in this question, DO NOT EDIT ANY CODE in
main function. You can add more operations/classes/interfaces to be able to answer the below
question.
Design and code a class named Flight, that holds information of a Flight, including:
A string describes route of a flight as the format of “departure–destination”, for example
HAN-MNL or CDG-SGN…
A whole number describes fare of a flight.
1
1 of 4 Paper No: 20
Question 1:
(3 marks) You have main function which is saved on folder named Q1 already. Use these
classes and functions to test all your operations in this question, DO NOT EDIT ANY CODE in
main function. You can add more operations/classes/interfaces to be able to answer the below
question.
Design and code a class named Person that holds information about a Person. Information of a
Person includes:
A string describes the name of a Person.
Design and code a deriving class named Worker from Person class that holds information about
a Worker. Information of a Worker includes:
A double-value holding working hours of a Worker.
A double-value holding the payment rate for a Worker.
Question 2:
(4 marks) You have main function which is saved on folder named Q2 already. Use these
classes and function to test all your operations in this question, DO NOT EDIT ANY CODE in
main. You can add more operations/classes/interfaces to be able to answer the below questions.
We had provided you:
1. Interface – IStudent which will declare some operations for an Student – DO NOT EDIT this
one.
2. You only need to complete the code in class MyStudent and Student.
Design and code a class named Student that holds information about an Student. Information of a
Student includes:
A string describing name of a Student.
A string describing major of a Student
Design and code a class named MyStudent which will implement interface IStudent and
complete 2 methods which were declared in IStudent (assume that number of Students in
list “s” is always greater than 2).
List<Student> f1(List<Student> s) –. Firstly, sort the list of Student “s” ascending by student name
(alphabet order), finally return the list of 2 first students in the list “s”. The sorting must ignores
the case during comparison.
int f2(ArrayList<Student> s) – count and return the number of students in the list “s” who are in
major of “SE”.
3 of 4 Paper No: 20
Question 3:
(3 marks) You have main function which is saved on folder named Q3 already. Use these
classes and functions to test all your operations in this question, DO NOT EDIT ANY CODE in
main function. You can add more operations/classes/interfaces to be able to answer the below
question.
Design and code a class named Flight, that holds information of a Flight, including:
A string describes route of a flight as the format of “departure–destination”, for example
HAN-MNL or CDG-SGN…
A whole number describes fare of a flight.
1
1 of 4 Paper No: 21
Question 1:
(3 marks) You have main function which is saved on folder named Q1 already. Use these
classes and functions to test all your operations in this question, DO NOT EDIT ANY CODE in
main function. You can add more operations/classes/interfaces to be able to answer the below
question.
Design and code a class named Person that holds information about a Person. Information of a
Person includes:
A string describes the name of a Person.
Design and code a deriving class named Worker from Person class that holds information about
a Worker. Information of a Worker includes:
A double-value holding working hours of a Worker.
A double-value holding the payment rate for a Worker.
Question 2:
(4 marks) You have main function which is saved on folder named Q2 already. Use these
classes and function to test all your operations in this question, DO NOT EDIT ANY CODE in
main. You can add more operations/classes/interfaces to be able to answer the below questions.
We had provided you:
1. Interface – IStudent which will declare some operations for an Student – DO NOT EDIT this
one.
2. You only need to complete the code in class MyStudent and Student.
Design and code a class named Student that holds information about an Student. Information of a
Student includes:
A string describing name of a Student.
A string describing major of a Student
Design and code a class named MyStudent which will implement interface IStudent and
complete 2 methods which were declared in IStudent (assume that number of Students in
list “s” is always greater than 2).
List<Student> f1(List<Student> s) –. Firstly, sort the list of Student “s” ascending by student name
(alphabet order), finally return the list of 2 first students in the list “s”. The sorting must ignores
the case during comparison.
int f2(ArrayList<Student> s) – count and return the number of students in the list “s” who are in
major of “SE”.
3 of 4 Paper No: 21
Question 3:
(3 marks) You have main function which is saved on folder named Q3 already. Use these
classes and functions to test all your operations in this question, DO NOT EDIT ANY CODE in
main function. You can add more operations/classes/interfaces to be able to answer the below
question.
Design and code a class named Flight, that holds information of a Flight, including:
A string describes route of a flight as the format of “departure–destination”, for example
HAN-MNL or CDG-SGN…
A whole number describes fare of a flight.
1
1 of 4 Paper No: 22
Question 1:
(3 marks) You have main function which is saved on folder named Q1 already. Use these
classes and functions to test all your operations in this question, DO NOT EDIT ANY CODE in
main function. You can add more operations/classes/interfaces to be able to answer the below
question.
Design and code a class named Person that holds information about a Person. Information of a
Person includes:
A string describes the name of a Person.
Design and code a deriving class named Worker from Person class that holds information about
a Worker. Information of a Worker includes:
A double-value holding working hours of a Worker.
A double-value holding the payment rate for a Worker.
Question 2:
(4 marks) You have main function which is saved on folder named Q2 already. Use these
classes and function to test all your operations in this question, DO NOT EDIT ANY CODE in
main. You can add more operations/classes/interfaces to be able to answer the below questions.
We had provided you:
1. Interface – IStudent which will declare some operations for an Student – DO NOT EDIT this
one.
2. You only need to complete the code in class MyStudent and Student.
Design and code a class named Student that holds information about an Student. Information of a
Student includes:
A string describing name of a Student.
A string describing major of a Student
Design and code a class named MyStudent which will implement interface IStudent and
complete 2 methods which were declared in IStudent (assume that number of Students in
list “s” is always greater than 2).
List<Student> f1(List<Student> s) –. Firstly, sort the list of Student “s” ascending by student name
(alphabet order), finally return the list of 2 first students in the list “s”. The sorting must ignores
the case during comparison.
int f2(ArrayList<Student> s) – count and return the number of students in the list “s” who are in
major of “SE”.
3 of 4 Paper No: 22
Question 3:
(3 marks) You have main function which is saved on folder named Q3 already. Use these
classes and functions to test all your operations in this question, DO NOT EDIT ANY CODE in
main function. You can add more operations/classes/interfaces to be able to answer the below
question.
Design and code a class named Flight, that holds information of a Flight, including:
A string describes route of a flight as the format of “departure–destination”, for example
HAN-MNL or CDG-SGN…
A whole number describes fare of a flight.
1
1 of 4 Paper No: 23
Question 1:
(3 marks) You have main function which is saved on folder named Q1 already. Use these
classes and functions to test all your operations in this question, DO NOT EDIT ANY CODE in
main function. You can add more operations/classes/interfaces to be able to answer the below
question.
Design and code a class named Person that holds information about a Person. Information of a
Person includes:
A string describes the name of a Person.
Design and code a deriving class named Worker from Person class that holds information about
a Worker. Information of a Worker includes:
A double-value holding working hours of a Worker.
A double-value holding the payment rate for a Worker.
Question 2:
(4 marks) You have main function which is saved on folder named Q2 already. Use these
classes and function to test all your operations in this question, DO NOT EDIT ANY CODE in
main. You can add more operations/classes/interfaces to be able to answer the below questions.
We had provided you:
1. Interface – IStudent which will declare some operations for an Student – DO NOT EDIT this
one.
2. You only need to complete the code in class MyStudent and Student.
Design and code a class named Student that holds information about an Student. Information of a
Student includes:
A string describing name of a Student.
A string describing major of a Student
Design and code a class named MyStudent which will implement interface IStudent and
complete 2 methods which were declared in IStudent (assume that number of Students in
list “s” is always greater than 2).
List<Student> f1(List<Student> s) –. Firstly, sort the list of Student “s” ascending by student name
(alphabet order), finally return the list of 2 first students in the list “s”. The sorting must ignores
the case during comparison.
int f2(ArrayList<Student> s) – count and return the number of students in the list “s” who are in
major of “SE”.
3 of 4 Paper No: 23
Question 3:
(3 marks) You have main function which is saved on folder named Q3 already. Use these
classes and functions to test all your operations in this question, DO NOT EDIT ANY CODE in
main function. You can add more operations/classes/interfaces to be able to answer the below
question.
Design and code a class named Flight, that holds information of a Flight, including:
A string describes route of a flight as the format of “departure–destination”, for example
HAN-MNL or CDG-SGN…
A whole number describes fare of a flight.
1
1 of 4 Paper No: 24
Question 1:
(3 marks) You have main function which is saved on folder named Q1 already. Use these
classes and functions to test all your operations in this question, DO NOT EDIT ANY CODE in
main function. You can add more operations/classes/interfaces to be able to answer the below
question.
Design and code a class named Person that holds information about a Person. Information of a
Person includes:
A string describes the name of a Person.
Design and code a deriving class named Worker from Person class that holds information about
a Worker. Information of a Worker includes:
A double-value holding working hours of a Worker.
A double-value holding the payment rate for a Worker.
Question 2:
(4 marks) You have main function which is saved on folder named Q2 already. Use these
classes and function to test all your operations in this question, DO NOT EDIT ANY CODE in
main. You can add more operations/classes/interfaces to be able to answer the below questions.
We had provided you:
1. Interface – IStudent which will declare some operations for an Student – DO NOT EDIT this
one.
2. You only need to complete the code in class MyStudent and Student.
Design and code a class named Student that holds information about an Student. Information of a
Student includes:
A string describing name of a Student.
A string describing major of a Student
Design and code a class named MyStudent which will implement interface IStudent and
complete 2 methods which were declared in IStudent (assume that number of Students in
list “s” is always greater than 2).
List<Student> f1(List<Student> s) –. Firstly, sort the list of Student “s” ascending by student name
(alphabet order), finally return the list of 2 first students in the list “s”. The sorting must ignores
the case during comparison.
int f2(ArrayList<Student> s) – count and return the number of students in the list “s” who are in
major of “SE”.
3 of 4 Paper No: 24
Question 3:
(3 marks) You have main function which is saved on folder named Q3 already. Use these
classes and functions to test all your operations in this question, DO NOT EDIT ANY CODE in
main function. You can add more operations/classes/interfaces to be able to answer the below
question.
Design and code a class named Flight, that holds information of a Flight, including:
A string describes route of a flight as the format of “departure–destination”, for example
HAN-MNL or CDG-SGN…
A whole number describes fare of a flight.
1
1 of 4 Paper No: 25
Question 1:
(3 marks) You have main function which is saved on folder named Q1 already. Use these
classes and functions to test all your operations in this question, DO NOT EDIT ANY CODE in
main function. You can add more operations/classes/interfaces to be able to answer the below
question.
Design and code a class named Person that holds information about a Person. Information of a
Person includes:
A string describes the name of a Person.
Design and code a deriving class named Worker from Person class that holds information about
a Worker. Information of a Worker includes:
A double-value holding working hours of a Worker.
A double-value holding the payment rate for a Worker.
Question 2:
(4 marks) You have main function which is saved on folder named Q2 already. Use these
classes and function to test all your operations in this question, DO NOT EDIT ANY CODE in
main. You can add more operations/classes/interfaces to be able to answer the below questions.
We had provided you:
1. Interface – IStudent which will declare some operations for an Student – DO NOT EDIT this
one.
2. You only need to complete the code in class MyStudent and Student.
Design and code a class named Student that holds information about an Student. Information of a
Student includes:
A string describing name of a Student.
A string describing major of a Student
Design and code a class named MyStudent which will implement interface IStudent and
complete 2 methods which were declared in IStudent (assume that number of Students in
list “s” is always greater than 2).
List<Student> f1(List<Student> s) –. Firstly, sort the list of Student “s” ascending by student name
(alphabet order), finally return the list of 2 first students in the list “s”. The sorting must ignores
the case during comparison.
int f2(ArrayList<Student> s) – count and return the number of students in the list “s” who are in
major of “SE”.
3 of 4 Paper No: 25
Question 3:
(3 marks) You have main function which is saved on folder named Q3 already. Use these
classes and functions to test all your operations in this question, DO NOT EDIT ANY CODE in
main function. You can add more operations/classes/interfaces to be able to answer the below
question.
Design and code a class named Flight, that holds information of a Flight, including:
A string describes route of a flight as the format of “departure–destination”, for example
HAN-MNL or CDG-SGN…
A whole number describes fare of a flight.
1
1 of 4 Paper No: 26
Question 1:
(3 marks) You have main function which is saved on folder named Q1 already. Use these
classes and functions to test all your operations in this question, DO NOT EDIT ANY CODE in
main function. You can add more operations/classes/interfaces to be able to answer the below
question.
Design and code a class named Person that holds information about a Person. Information of a
Person includes:
A string describes the name of a Person.
Design and code a deriving class named Worker from Person class that holds information about
a Worker. Information of a Worker includes:
A double-value holding working hours of a Worker.
A double-value holding the payment rate for a Worker.
Question 2:
(4 marks) You have main function which is saved on folder named Q2 already. Use these
classes and function to test all your operations in this question, DO NOT EDIT ANY CODE in
main. You can add more operations/classes/interfaces to be able to answer the below questions.
We had provided you:
1. Interface – IStudent which will declare some operations for an Student – DO NOT EDIT this
one.
2. You only need to complete the code in class MyStudent and Student.
Design and code a class named Student that holds information about an Student. Information of a
Student includes:
A string describing name of a Student.
A string describing major of a Student
Design and code a class named MyStudent which will implement interface IStudent and
complete 2 methods which were declared in IStudent (assume that number of Students in
list “s” is always greater than 2).
List<Student> f1(List<Student> s) –. Firstly, sort the list of Student “s” ascending by student name
(alphabet order), finally return the list of 2 first students in the list “s”. The sorting must ignores
the case during comparison.
int f2(ArrayList<Student> s) – count and return the number of students in the list “s” who are in
major of “SE”.
3 of 4 Paper No: 26
Question 3:
(3 marks) You have main function which is saved on folder named Q3 already. Use these
classes and functions to test all your operations in this question, DO NOT EDIT ANY CODE in
main function. You can add more operations/classes/interfaces to be able to answer the below
question.
Design and code a class named Flight, that holds information of a Flight, including:
A string describes route of a flight as the format of “departure–destination”, for example
HAN-MNL or CDG-SGN…
A whole number describes fare of a flight.
1
1 of 4 Paper No: 27
Question 1:
(3 marks) You have main function which is saved on folder named Q1 already. Use these
classes and functions to test all your operations in this question, DO NOT EDIT ANY CODE in
main function. You can add more operations/classes/interfaces to be able to answer the below
question.
Design and code a class named Person that holds information about a Person. Information of a
Person includes:
A string describes the name of a Person.
Design and code a deriving class named Worker from Person class that holds information about
a Worker. Information of a Worker includes:
A double-value holding working hours of a Worker.
A double-value holding the payment rate for a Worker.
Question 2:
(4 marks) You have main function which is saved on folder named Q2 already. Use these
classes and function to test all your operations in this question, DO NOT EDIT ANY CODE in
main. You can add more operations/classes/interfaces to be able to answer the below questions.
We had provided you:
1. Interface – IStudent which will declare some operations for an Student – DO NOT EDIT this
one.
2. You only need to complete the code in class MyStudent and Student.
Design and code a class named Student that holds information about an Student. Information of a
Student includes:
A string describing name of a Student.
A string describing major of a Student
Design and code a class named MyStudent which will implement interface IStudent and
complete 2 methods which were declared in IStudent (assume that number of Students in
list “s” is always greater than 2).
List<Student> f1(List<Student> s) –. Firstly, sort the list of Student “s” ascending by student name
(alphabet order), finally return the list of 2 first students in the list “s”. The sorting must ignores
the case during comparison.
int f2(ArrayList<Student> s) – count and return the number of students in the list “s” who are in
major of “SE”.
3 of 4 Paper No: 27
Question 3:
(3 marks) You have main function which is saved on folder named Q3 already. Use these
classes and functions to test all your operations in this question, DO NOT EDIT ANY CODE in
main function. You can add more operations/classes/interfaces to be able to answer the below
question.
Design and code a class named Flight, that holds information of a Flight, including:
A string describes route of a flight as the format of “departure–destination”, for example
HAN-MNL or CDG-SGN…
A whole number describes fare of a flight.
1
1 of 4 Paper No: 28
Question 1:
(3 marks) You have main function which is saved on folder named Q1 already. Use these
classes and functions to test all your operations in this question, DO NOT EDIT ANY CODE in
main function. You can add more operations/classes/interfaces to be able to answer the below
question.
Design and code a class named Person that holds information about a Person. Information of a
Person includes:
A string describes the name of a Person.
Design and code a deriving class named Worker from Person class that holds information about
a Worker. Information of a Worker includes:
A double-value holding working hours of a Worker.
A double-value holding the payment rate for a Worker.
Question 2:
(4 marks) You have main function which is saved on folder named Q2 already. Use these
classes and function to test all your operations in this question, DO NOT EDIT ANY CODE in
main. You can add more operations/classes/interfaces to be able to answer the below questions.
We had provided you:
1. Interface – IStudent which will declare some operations for an Student – DO NOT EDIT this
one.
2. You only need to complete the code in class MyStudent and Student.
Design and code a class named Student that holds information about an Student. Information of a
Student includes:
A string describing name of a Student.
A string describing major of a Student
Design and code a class named MyStudent which will implement interface IStudent and
complete 2 methods which were declared in IStudent (assume that number of Students in
list “s” is always greater than 2).
List<Student> f1(List<Student> s) –. Firstly, sort the list of Student “s” ascending by student name
(alphabet order), finally return the list of 2 first students in the list “s”. The sorting must ignores
the case during comparison.
int f2(ArrayList<Student> s) – count and return the number of students in the list “s” who are in
major of “SE”.
3 of 4 Paper No: 28
Question 3:
(3 marks) You have main function which is saved on folder named Q3 already. Use these
classes and functions to test all your operations in this question, DO NOT EDIT ANY CODE in
main function. You can add more operations/classes/interfaces to be able to answer the below
question.
Design and code a class named Flight, that holds information of a Flight, including:
A string describes route of a flight as the format of “departure–destination”, for example
HAN-MNL or CDG-SGN…
A whole number describes fare of a flight.
1
1 of 4 Paper No: 29
Question 1:
(3 marks) You have main function which is saved on folder named Q1 already. Use these
classes and functions to test all your operations in this question, DO NOT EDIT ANY CODE in
main function. You can add more operations/classes/interfaces to be able to answer the below
question.
Design and code a class named Person that holds information about a Person. Information of a
Person includes:
A string describes the name of a Person.
Design and code a deriving class named Worker from Person class that holds information about
a Worker. Information of a Worker includes:
A double-value holding working hours of a Worker.
A double-value holding the payment rate for a Worker.
Question 2:
(4 marks) You have main function which is saved on folder named Q2 already. Use these
classes and function to test all your operations in this question, DO NOT EDIT ANY CODE in
main. You can add more operations/classes/interfaces to be able to answer the below questions.
We had provided you:
1. Interface – IStudent which will declare some operations for an Student – DO NOT EDIT this
one.
2. You only need to complete the code in class MyStudent and Student.
Design and code a class named Student that holds information about an Student. Information of a
Student includes:
A string describing name of a Student.
A string describing major of a Student
Design and code a class named MyStudent which will implement interface IStudent and
complete 2 methods which were declared in IStudent (assume that number of Students in
list “s” is always greater than 2).
List<Student> f1(List<Student> s) –. Firstly, sort the list of Student “s” ascending by student name
(alphabet order), finally return the list of 2 first students in the list “s”. The sorting must ignores
the case during comparison.
int f2(ArrayList<Student> s) – count and return the number of students in the list “s” who are in
major of “SE”.
3 of 4 Paper No: 29
Question 3:
(3 marks) You have main function which is saved on folder named Q3 already. Use these
classes and functions to test all your operations in this question, DO NOT EDIT ANY CODE in
main function. You can add more operations/classes/interfaces to be able to answer the below
question.
Design and code a class named Flight, that holds information of a Flight, including:
A string describes route of a flight as the format of “departure–destination”, for example
HAN-MNL or CDG-SGN…
A whole number describes fare of a flight.
1
1 of 4 Paper No: 30
Question 1:
(3 marks) You have main function which is saved on folder named Q1 already. Use these
classes and functions to test all your operations in this question, DO NOT EDIT ANY CODE in
main function. You can add more operations/classes/interfaces to be able to answer the below
question.
Design and code a class named Person that holds information about a Person. Information of a
Person includes:
A string describes the name of a Person.
Design and code a deriving class named Worker from Person class that holds information about
a Worker. Information of a Worker includes:
A double-value holding working hours of a Worker.
A double-value holding the payment rate for a Worker.
Question 2:
(4 marks) You have main function which is saved on folder named Q2 already. Use these
classes and function to test all your operations in this question, DO NOT EDIT ANY CODE in
main. You can add more operations/classes/interfaces to be able to answer the below questions.
We had provided you:
1. Interface – IStudent which will declare some operations for an Student – DO NOT EDIT this
one.
2. You only need to complete the code in class MyStudent and Student.
Design and code a class named Student that holds information about an Student. Information of a
Student includes:
A string describing name of a Student.
A string describing major of a Student
Design and code a class named MyStudent which will implement interface IStudent and
complete 2 methods which were declared in IStudent (assume that number of Students in
list “s” is always greater than 2).
List<Student> f1(List<Student> s) –. Firstly, sort the list of Student “s” ascending by student name
(alphabet order), finally return the list of 2 first students in the list “s”. The sorting must ignores
the case during comparison.
int f2(ArrayList<Student> s) – count and return the number of students in the list “s” who are in
major of “SE”.
3 of 4 Paper No: 30
Question 3:
(3 marks) You have main function which is saved on folder named Q3 already. Use these
classes and functions to test all your operations in this question, DO NOT EDIT ANY CODE in
main function. You can add more operations/classes/interfaces to be able to answer the below
question.
Design and code a class named Flight, that holds information of a Flight, including:
A string describes route of a flight as the format of “departure–destination”, for example
HAN-MNL or CDG-SGN…
A whole number describes fare of a flight.
1
For Examination Department Only
*********************************************************
Number of Paper:30
*********************************************************