Exam 6: A First Look at Classes

arrow
  • Select Tags
search iconSearch Question
flashcardsStudy Flashcards
  • Select Tags

A method that gets a value from a class's field but does not change it is known as a mutator method.

(True/False)
4.8/5
(33)

A group of related classes is called a(n) __________.

(Multiple Choice)
4.8/5
(36)

Another term for an object of a class is a(n) __________.

(Multiple Choice)
4.8/5
(44)

When an object is passed as an argument to a method, the object's address is passed into the method's parameter variable.

(True/False)
4.9/5
(44)

Instance methods do not have the __________ key word in their headers.

(Multiple Choice)
4.9/5
(40)

A constructor is a method that __________.

(Multiple Choice)
4.9/5
(41)

Most of the programming languages used today are __________.

(Multiple Choice)
4.9/5
(33)

Instance methods do not have the key word static in their headers.

(True/False)
4.9/5
(39)

A(n) __________ can be thought of as a blueprint that can be used to create a type of __________.

(Multiple Choice)
4.8/5
(31)

Methods that operate on an object's fields are called __________.

(Multiple Choice)
4.9/5
(43)

A class specifies the __________ and __________ that a particular type of object has.

(Multiple Choice)
4.8/5
(39)

An access specifier indicates how a class may be accessed.

(True/False)
4.9/5
(36)

Given the following code, what will be the value of finalAmount when it is displayed? public class Order { Private int orderNum; Private double orderAmount; Private double orderDiscount; Public Order(int orderNumber, double orderAmt, Double orderDisc) { OrderNum = orderNumber; OrderAmount = orderAmt; OrderDiscount = orderDisc; } Public int getOrderAmount() { Return orderAmount; } Public int getOrderDisc() { Return orderDisc; } } Public class CustomerOrder { Public static void main(String[] args) { Int ordNum = 1234; Double ordAmount = 580.00; Double discountPer = .1; Order order; Double finalAmount = order.getOrderAmount() - Order.getOrderAmount() * order.getOrderDisc(); System.out.printf("Final order amount = $%,.2f\n", FinalAmount); } }

(Multiple Choice)
4.7/5
(49)

The following statement is an example of __________. import java.util.Scanner;

(Multiple Choice)
4.9/5
(30)

Overloading means that multiple methods in the same class __________.

(Multiple Choice)
4.8/5
(37)

When an object is created, the attributes associated with the object are called __________.

(Multiple Choice)
4.9/5
(41)

A class's responsibilities include __________.

(Multiple Choice)
4.9/5
(35)

Instance methods should be declared static.

(True/False)
4.9/5
(37)
Showing 41 - 58 of 58
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)