Software Meth Midterm

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

(asked in both tests) A subclass inherits all methods, data members and constructors from the superclass

False

(asked in both tests) If the modifier in a method signature is omitted., the modifier public is assumed

False

(asked in both tests) Java assigns a default value to a local variable in a method if the variable is not initialized.

False

(asked in both tests) String s = new String("java"); the statement Object o = s; creates new instance of Object

False

(asked in both tests) The following statement will not cause compile error, assuming all classes are properly defined: public class myBike extends Mountainbike, RoadBike implements Bicycle{ ... }

False

(asked in both tests) The purpose of Testbed main() in a class is to run software (or system) testing

False

A java interface class may contain constructors

False

A static method can directly access the instance variables within a class without instantiating an object

False

A subclass can extend multiple super classes but can implement only one java interface

False

An instance variable can be directly referenced in a static method within the same class without creating an object

False

Assume Employee class is an abstract class. The following statement outside Employee class will not cause a compile error: Employee e = new Employee

False

Object obj = new Object; Student student = new Student(); the statement student = obj; will not cause a compile error

False

Object x = new Object(); Employee y = new Employee(); the statement y = x will not cause a compile error

False

RuntimeException and Error are known as checked exceptions

False

Software inspection is a software testing technique that requires software developers to run the programs with test cases

False

Software inspection is a software testing technique that requires the software developers to run the programs with the test cases

False

Student s1 = new Student("Alice"); Student s2 = new Student("Bob"); s1 = s2; Assume student class has an overriding toString() method, System.out.println(s1.toString()) will output Alice;

False

The code below will compile: class Square extends GeometricObject { double length; Square(double length) { GeometricObject(length); }

False

Assume Employee class is an abstract class. The following statement outside of Employee class will not cause a compile error: Employee [] emps = new Employee[Capacity]

True

The statement Object [] list = new String[100]; will compile

True

You declare int height; within a public method and declare int height; as an instance variable within the same class. This will not cause a compile error

True

you can declare a local variable that has the same name as an instance variable in the class

True


Ensembles d'études connexes

Pathophysiology Chapter 14 - Pain, Temperature, Sleep, and Sensory Function

View Set

Adding Fractions with Different Denominators

View Set

HTMP Year 1 Chapter 5: Financial Processes and the Guest Cycle

View Set

ITN 107 -ITSP 135 - Questions - Test 1

View Set

The Women's Social and Political Union 1903-1914

View Set

Chapter 20: Managing Quality and Risk

View Set

ch01p1The business pays $2,000 in cash to the landlord for office space rent.

View Set

Taxes, Retirement, and Other Insurance Concepts

View Set