Instructions:
- For your final project, please address the following questions.
- Please respond substantively to every question and avoid one-line sentences
- For every answer, where appropriate, cite your answer per APA documentation format. In other words, tell me the source of your answer. You can cite pages in your textbook that contain the answer; or you can also use trusted resources found via Internet as your resources.
IMPORTANT: Use your Word Processor (i.e. Microsoft Word) to answers the questions below. For the ones which involve coding, you can also just type up your code in the same Word document; or, you may choose to use JGRASP and then attach the .JAVA files. Make sure you have some Java comments which indicate what question you're answering.
Answer all the questions:
Question) There are many different concepts associated with OOP (Object-oriented programming) like:
- Class
- Object
- Inheritance
- Polymorphism
- Abstraction
- Encapsulation
- Interface
- Method Overloading
- Method Overriding
- ...and others
Pick FIVE of the above listed OOP concepts and describe each in details.
Question) Code a simple class in JAVA classed "Student." Your class must contain the followings
i) Variables (name, age, addressStreet, city, state, zip, country)
ii) Setter and Getter methods
Example:
public void setName(String name) {
this.name = name;
}
public String getName() {
return name;
}
Question) Code a short JAVA program that demonstrates Inheritance
Question) In Java (and OOP), Inheritance involves the concept of super class (parent class) and sub class (derived class). What is a super class in Java? What is a sub or derived class in Java?
HINT:
- To demonstrate true OOP inheritance, your code must include a super (parent) class and a sub class (derived class)
- As an example, class Student could be a super class while class GraduateStudent is a sub class that inherits from Student class.
- In your subclass (i.e. GraduateStudent), you must include the JAVA inheritance keyword that shows that a class inherits from another.