Answers | 100% Correct Study Quiz
in Java identifiers can only begin with? ANS Letters, underscores, dollar sign
Is Java a Functional Language, Procedural Language, Object-Oriented Language, or Logic Language? ANS
Object-Oriented
What does API stand for? ANS Application Programmer Interface
What package needs to be imported to use the scanner class? ANS import java.util.Scanner;
What is Encapsulation? ANS A mechanism of wrapping the data (variables) and code acting on the data
(methods) together as a single unit. ... Declare the variables of a class as private. Provide public setter and
getter methods to modify and view the variables values
What is the purpose of toString()? ANS The purpose is to give a readable representation of the object
What is a constructor? ANS A constructor is a special method that is used to create a new object.
Define a constructor with two parameters int x, y for aclass Point.A point object has an x and y coordinate.
ANS public Point(int x, int y){
this.x = x; this.y = y;
}
The _________reference refers to the instance of the object. ANS this
What is the keyword that associates a variable or method with the class rather than the object? ANS static
What is Software Engineering? ANS An attempt to produce a repeatable process for the developmentand
management of software projects. The quality of the software is a direct result of the process we follow to
create it.
, Explain the relationship between development and maintenance effort. ANS Small increases in
development effort can reduce maintenance effort
Which development method takes an object-oriented approach? Briefly describe this methods' steps. ANS
Evolutionary Development:
Establish Requirements -What are the inputs expected by the application and what outputs are to be returned.
Architectural Design -Decide what kind of Algorithms and Data Structures are needed to store and access the
data, and how are the objects going to interact.
Establish Refinement Scope -Phases of development
Identify Classes & Objects -
Identify Relationships
Detailed Design
Implementation
Unit Testing
System Test Release
Suppose you have a program that takes as its input an integer from 0 to 423. Using the black box method of
testing list 9 test integers that you would use to adequately test the program. ANS -1,0,1
411,423,424
-100,250,550
What is a code walkthrough? ANS A meeting in which several people carefully review a design/ sections
of code to see if the design satisfies requirement or the implementation represent the design.
What are four distinct characteristics of an object-oriented language? ANS Polymorphism
Inheritance
Encapsulation
Abstraction
Why use inheritance? ANS To extend the functionality of a currently implemented class.Inheritance allows
modeling of a system in a hierarchical way, and giving a programmatic way of representing a relationship with
inheritable properties.The most frequent use of inheritance is for deriving classes using existing classes, which