Assessment – Java Basics: Part 2

Slides:



Advertisements
Similar presentations
Final and Abstract Classes
Advertisements

OO Programming in Java Objectives for today: Constructors Method Overriding & Overloading Encapsulation.
METHOD OVERRIDING 1.Sub class can override the methods defined by the super class. 2.Overridden Methods in the sub classes should have same name, same.
Sadegh Aliakbary Sharif University of Technology Fall 2010.
Interface & Abstract Class. Interface Definition All method in an interface are abstract methods. Methods are declared without the implementation part.
Inheritance and Class Hierarchies Chapter 3. Chapter 3: Inheritance and Class Hierarchies2 Chapter Objectives To understand inheritance and how it facilitates.
Final and Static Keywords. Creating constants  There will be occasions where data items in a program have values that do not change.  Maximum score.
Encapsulation, Inheritance & Interfaces CSE 115 Spring 2006 February 27, March 1 & 3, 2006.
Inheritance. In this chapter, we will cover: The concept of inheritance Extending classes Overriding superclass methods Working with superclasses that.
8.1 Classes & Inheritance Inheritance Objects are created to model ‘things’ Sometimes, ‘things’ may be different, but still have many attributes.
220 FINAL TEST REVIEW SESSION Omar Abdelwahab. INHERITANCE AND POLYMORPHISM Suppose you have a class FunClass with public methods show, tell, and smile.
Java Tutorial. Object-Oriented Programming Concepts Object –a representation of some item state  fields/members and should be encapsulated behavior 
Specialization and Inheritance Chapter 8. 8 Specialization Specialized classes inherit the properties and methods of the parent or base class. A dog is.
Inheritance Extending Class Functionality. Polymorphism Review Earlier in the course, we examined the topic of polymorphism. Many times in coding, we.
Topic 1Topic 2Topic 3Topic 4Topic
Inheritance in the Java programming language J. W. Rider.
Chris Kiekintveld CS 2401 (Fall 2010) Elementary Data Structures and Algorithms Inheritance and Polymorphism.
Inheritance Chapter 10 Programs built from objects/instances of classes An O.O. approach – build on earlier work. Use classes in library and ones you have.
Chapter 3 Inheritance and Polymorphism Goals: 1.Superclasses and subclasses 2.Inheritance Hierarchy 3.Polymorphism 4.Type Compatibility 5.Abstract Classes.
8. Inheritance “Is-a” Relationship. Topics Creating Subclasses Overriding Methods Class Hierarchies Abstract Class Inheritance and GUIs The Timer Class.
Inheritance and Access Control CS 162 (Summer 2009)
Object Oriented Programming
Interfaces Chapter 9. 9 Creating Interfaces An interface is a contract. Every class that implements the interface must provide the interface’s defined.
Inheritance and Class Hierarchies Chapter 3. Chapter 3: Inheritance and Class Hierarchies2 Chapter Objectives To understand inheritance and how it facilitates.
Java Programming, Second Edition Chapter Twelve Advanced Inheritance Concepts.
Inheritance Inheritance is the process of extending the functionality of a class by defining a new class that inherit,all the features of extending class.
Object orientation and Packaging in Java Object Orientation and Packaging Introduction: After completing this chapter, you will be able to identify.
1 C# - Inheritance and Polymorphism. 2 1.Inheritance 2.Implementing Inheritance in C# 3.Constructor calls in Inheritance 4.Protected Access Modifier 5.The.
Java Inheritance in Java. Inheritance Inheritance is a mechanism in which one object acquires all the properties and behaviors of parent object. The idea.
Terms and Rules II Professor Evan Korth New York University (All rights reserved)
Author: DoanNX Time: 45’.  OOP concepts  OOP in Java.
POLYMORPHISM Chapter 6. Chapter Polymorphism  Polymorphism concept  Abstract classes and methods  Method overriding  Concrete sub classes and.
A Introduction to Computing II Lecture 3: Interfaces and Inheritance Fall Session 2000.
Inheritance New class derived from existing class Software engineering technique Software reuse : faster, easier, cheaper Parent class (supper class):
Modern Programming Tools And Techniques-I
Advanced Programming in Java
Advanced Programming in Java
Object-oriented Programming in Java
Objects as a programming concept
Inheritance and Polymorphism
Interface.
Software Engineering Fall 2005
Inheritance AKEEL AHMED.
Interfaces Professor Evan Korth.
An Introduction to Inheritance
Object Oriented Programming
Modern Programming Tools And Techniques-I Inheritance
Interfaces.
Object Oriented Programming (OOP) LAB # 8
Class Inheritance (Cont.)
null, true, and false are also reserved.
Pre-AP® Computer Science Quiz Key
Pre-AP® Computer Science Quiz
Interfaces.
Advanced Programming in Java
Chapter 11 Inheritance and Polymorphism
Java Programming, Second Edition
Advanced Programming in Java
Assessment – Java Basics: Part 1
Expressions.
Class Inheritance Concept of Inheritance Java keywords
PreAP Computer Science Quiz
AP Computer Science DYRT Quiz
Final and Abstract Classes
String Class.
Topics OOP Review Inheritance Review Abstract Classes
មជ្ឈមណ្ឌលកូរ៉េ សហ្វវែរ អេច អ ឌី
Inheritance Lakshmish Ramaswamy.
True or False True or False
INTERFACES Explained By: Sarbjit Kaur. Lecturer, Department of Computer Application, PGG.C.G., Sector: 42, Chandigarh.
Presentation transcript:

Assessment – Java Basics: Part 2 The quiz contains 10 questions. You will have one attempt to answer each question. You can exit the quiz at any time. If you exit the quiz without completing all 10 questions, on return you will have to start the quiz from the beginning. Scoring 80% or higher means you have understood the topic well. Start www.prolearninghub.com

When a sub class has only one super class, what type of inheritance it is? Single Multilevel Multiple www.prolearninghub.com

Which of the following keyword is provided by Java to achieve Inheritance? transfer extends www.prolearninghub.com

When final keyword is preceded to a class, what does it indicates? Class can not be inherited Class must be inherited Class created from other class www.prolearninghub.com

Identify the odd one? Method Overloading Method Overriding Method Calling www.prolearninghub.com

All methods in an abstract class must be abstract? True False www.prolearninghub.com

What type of relationship does Inheritance represents? not - a is - a has - a www.prolearninghub.com

Abstract class can be instantiated? True False www.prolearninghub.com

What does an abstract class indicate? It must be inherited It must not be inherited It’s all methods are abstract www.prolearninghub.com

Why is Interface introduced in Java? To model Single Inheritance To model Hierarchical Inheritance To model Multiple Inheritance www.prolearninghub.com

When final keyword is preceded to a method in a class, what does it indicate? Method can not be overloaded Method can not be overriden Method can be overriden www.prolearninghub.com

The Results