Friday, February 10, 2023

Object Oriented Programming

CS 6203 Object Oriented Programming

A popular general-purpose programming language and computing platform. It is fast, reliable, and secure.

No Modifier

Abstract method has no body.

True

ALGOL 68 programming language was released in 1968.

True

All programming languages ends each of your statements with a semicolon (;).

False

All variables declared in an interface are by default final.

True

Allows developers to create Java programs that can be executed and run by the JVM and JRE.

JDK

An abstract class can be instantiated.

False

An abstract class has no use until unless it is extended by some other class.

True

An abstract class must be extended and in a same way abstract method must be overridden.

True

An interface can implement another interface

False

ArrayList and HashMap are classes that allows you to manage ordered and unordered sets of data.

True

Attributes and methods with the access modifier protected can be accessed within your class, by all classes within the same package, and by all subclasses within the same or other packages.

Protected

Class that implements any interface must implement all the methods of that interface, else the class should be declared abstract.

False

Compiling is the process of a compiler going through the source code and creating a separate file that contains the machine code or the executable file.

True

Constants are simply container of information.

False

CRC stands for:

Class Responsibility Collaboration

CRCW stands for:

Concurrent Read Concurrent Write

Extending an interface can implement another interface.

True

Feature of java that is very easy to learn, and its syntax is simple, clean and easy to understand.

Simple

Feature of java that means, organizing our software as a combination of different types of objects that incorporates both data and behavior.

Object-Oriented

finalize is used in exception handling.

False

Finally is a method that is called by JVM during garbage collection.

False

HashSet implements everything the TreeSet does, but it also keeps everything in an order that you can control by implementing an interface called comparable in the class that you're storing.

False

Have methods and variables just like the class but the methods declared in it are by default abstract.

Interface

IDE stands for:

Integrated Development Environment

If a child does not implement all the abstract methods of abstract parent class, then the child class must need to be declared abstract as well.

True

If method parameters are declared final then the value of these parameters cannot be changed.

True

If you declare an abstract method in a class then you don't need to declare the class abstract as well.

False

Implements the remote interface of the component on the server.

Object/Remote Interface

Interface provides full abstraction as none of its methods have body.

True

Interface which is declared inside another interface or class.

Nested interface

It belong to the class instead of a specific instance, this means you can access it without object.

Static members

It can access class variables(static variables) without using object(instance) of the class.

Static methods

It checks the code fragments for illegal code that can violate access right to objects.

Bytecode Verifier

It determines what resources a class can access such as reading and writing to the local disk.

Security Manager

It facilitates you to carry the Java bytecode to any platform.

Portable

It has the static keyword as a prefix in its declaration. Its definition occurs only inside a class and outside any function.

Class variables

It is a blueprint for objects to follow a specific schema defined in the class.

Class

It is a data type that accepts only true or false value.

Boolean

It is a good practice to name final variable in all CAPS.

True

It is a Java platform component that executes programs.

JVM

It is a type of pattern defines as one-to-many dependency between objects so that when one object changes state, all of its dependents are notified and updated automatically.

Observer Pattern

It is a type of pattern that allow an object to alter its behavior or when its internal state changes and the object will appear to change its class.

State Pattern

It is a type of pattern that attaches additional responsibilities to an object dynamically. This pattern provide a flexible alternative to sub-classing for extending functionality.

Decorator Pattern

It is a type of pattern that ensures a class has only one instance and provide a global access point to it.

Singleton Pattern

It is a type of pattern that provides a way to access the elements of an aggregate object sequentially without exposing its underlying representation.

Iterator Pattern

It is a type of programming wherein it generates dynamic pages, takes user input, access and modify temporary local storage and lastly, sends and receive request with server.

Client Side

It is an interface with blocks of data that deals with moving of complex data.

Coarse-grained Java Object

It is an object created within a specific client session, that is usually in conversational state and doesn't use memory outside the client session.

Session Object

It is an object designed to be persistent and has unique primary key identifier, that stores data across client sessions.

Entity Object

It is common to all the instances (or objects) of the class because it is a class level variable.

Static variable

It is define as a family of algorithms, encapsulates each one and makes them interchangeable. This lets the algorithm vary independently from clients that use it.

Stragey Pattern

It is not a specific object or program but instead it is a set of programming standards that all properties are private, has getter and setter methods, has public constructors that takes no arguments and can implement serializable API.

Enterprise JavaBeans

It is one of the 5 steps of Object Oriented Design Process wherein it is the simple narrative about the application. Typically in use case or user stories.

Describe the Application

It is one of the Extension features of JavaBeans wherein you focused on making your applications personalized for different regions or different clients.

Localization

It is one of the several components of Javabeans that receives JMS message asynchronously.

Message Bean

It is one way to handle conflicts by allowing only one processor to access a memory location at a given time and the other processor of the server will be locked out. This is considered the safest but slowest solution.

EREW

It is referred to as the communication speed that is limited by the speed of light and can be reduced through careful workflow balancing.

Latency

It is the ability of the server to allow multiple clients sending a message into a single bean and the data stored in the server can be accessed by multiple client simultaneously.

Concurrent Access

It is the framework that helps the server to interface with the JavaBeans components.

Container

It is the most fundamental entity in Java or any other Object Oriented Language.

Object

It is the on-disk part of Java that creates the JVM.

JRE

It is the process wherein you capitalized the first letter of every word.

CamelCase

It is the solutions to common software design problems that occur over and over in software development.

Design Pattern

It is the Standard Java Program or the Program itself.

Components

It is used for initializing the static variables.

Static Block

Java and Javascript language is the same and related to one another.

False

Java is a write once, runObject Oriented Programming anywhere language.

Object-Oriented

Java is an Object-Oriented programming language developed by ______________ in the early 1990s

James Gosling

Java is to application programming language and _______________ is to designed for web development.

Javascript

Java Reflection API gives you tools that let you walk up the inheritance tree.

True

Java7 has new file system API with classes Path, Paths, Files, File System and more.

True

JavaScript is known to be an interpreted scripting language.

True

JVM stands for:

Java Virtual Machine

LinkedList is a class that is high performance and very easy to use but it has a drawback that you can add new items to the end of an LinkedList but you can't arbitrarily place new items with it.

False

Local final variable must be initializing during declaration.

True

Making a member static can access it without object.

True

Nested interface are also known as?

Inner interface

One of the new features of Java 7 is the String values in the Switch Statement.

True

One of the OOPs feature that allows us to perform a single action in different ways.

Polymorphism

Part of the Java Runtime Environment(JRE) which is used to load Java classes into the Java Virtual Machine dynamically.

Classloader

Phyton 3 programming language was released in 2009.

False

Programming is the process of giving directions to a computer and this Program has instructions called statements.

True

Programming language source code can be bolded or underlined or italicized or justified.

False

Programming Languages are just bridging the gap between human beings and computer hardware.

True

Red Head Duck __ __ DUCK

Is-A Relationship

Static Initializer is a common thing in java programming wherein you initialize the values of fields in constructor methods.

True

Static variables are also known as ______________________?

Class variables

Sub class is invoked when we create the object of subclass, it by default invokes the default constructor of super class.

Constructor

The capability of a method to do different things based on the object that it is acting upon. In other words, it allows you define one interface and have multiple implementations.

Polymorphism

The class that extends the features of another class is known as _____________?

B and C

The class that implements interface must implement all the methods of that interface.

True

The class whose properties and functionalities are use (inherited) by another class is known as _______________?

Parent Class

The following are the advantages of Inheritance except.

Allows you to define one interface

The J2SE 1.2 was released on

December 1998

The J2SE 1.3 was released on

May 2000

The J2SE 1.4 was released on

February 2002

The J2SE 5.0 was released on

September 2004

The Java reflection API contains classes and methods that allow you to dynamically instantiate and interrogate classes.

True

The JAVA SE 12 was released on

March 2019

The JDK 1.0 was released on

January 1996

The JDK 1.1 was released on

February 1997

The name Java originates from a sort of ____________

Expresso Bean

The process by which one class acquires the properties (data members) and functionalities(methods) of another class.

Inheritance

The same method in child class which is already present in the parent class.

Method Overriding

The super keyword refers to the ______________, immediately above of the calling class in the hierarchy.

Super Class

The superclass constructor can be called explicitly using the ____________________ ?

Super Keyword

The variables declared in an interface are public, static & final by default.

True

These are variables which have declarations inside methods, constructors or blocks.

Local variables

These variables are inside a class however outside any method. They come into existence when the class instantiates.

Instance variables

This act both as an interface that our own iterator classes can implement, as well as the type of the Java collection classes built in iterators.

JavaUtilIterator

This are blueprints of an Object Oriented Programming wherein it has a detailed description or definition.

Class

This are information that describes a state of a thing or an object.

Attributes

This are the set of steps needed to solve a problem.

Algorithm

This are the things that an objects can do.

Behavior

This are use to store and work with multiple values of the same data type using a single variable name.

Arrays

This is a well-tested proven approach to solve if an object will be changed by a lot of other objects but you need it to be able to undo the last change.

Memento Design Pattern

This is a well-tested proven approach to solve if one of your objects changes and it needs to let several other objects know.

Observe Design Pattern

This is the idea of taking attributes and behavior of an object and bundling them together in the same unit or same class and at the same time restrict access to its content.

Data Hiding

This is the least restrictive access modifier. Methods and attributes that use the public modifier can be accessed within your current class and by all other classes.

Public

This is the most restrictive and most commonly used access modifier. If you use the this modifier with an attribute or method, it can only be accessed within the same class.

Private

This term refers to automatically do the  behavior even if what we're working with could take one of many different form.

Polymorphism

This term refers to the focus on the essential qualities of something rather one specific example and it discards the irrelevant or the unimportant.

Abstraction

This terms refers to the ability to surround something or keep things together and protect its content.

Encapsulation

To what programming Language did Java derives it syntax?

C++

TreeSet is a collection class that lets you store references to objects and ensures that each reference is only stored once.

False

UML stands for:

Unified Modelling Language

Use to define the visibility of classes, methods, and attributes.

Access Modifier

Variables that is constants. This variable cannot be change once it is initialized.

Final variable

We can change the value of a final variable.

False

We can instantiate an interface in java.

False

What data type will you be using for a True or False examination?

Boolean

What data type will you be using for the measurement of ingredients for a spaghetti?

float

What is the Scanner class for Java?

Import JavaUtilScanner

What type of requirement is the feature/capabilities of a system?

Functional Requirements

When was Java first developed by Sun Microsystems?

1995

Which of the following does not belong to the 4 Software Designer who invented the Design Pattern?

Charles Babbage

Which of the following is not a key terms in Object Oriented?

Concatenation

Which of the following is not a type of Session Bean?

Concurrent

Which of the following is not an IDE?

Notepad++

Which of the following is not an Integer?

float

Which of the following is not part of the Main Method?

Initialization

Writing a code that is based on a set of state and transition.

State Machine

You can not have abstract method in a concrete class.

True

A class can be made static only if it is _______________?

Nested class

A class can have multiple Static blocks, which will execute in the same sequence in which they have been written into the program.

True

A class derived from the abstract class must implement all those methods that are declared as abstract in the parent class.

True

A class that is declared using abstract keyword.

Abstract class

A class which is not abstract is referred as.

Concrete class

A constructor can be declared as final.

False

A final class can be inherited.

False

A final method cannot be overridden.

True

A final variable that is not initialized at the time of declaration is known as _______________.

Blank final variable

A Hash can represent either a directory or a file which is the core of the Java.nio package.

False

No comments:

Post a Comment