Exam 6: A First Look at Classes
Exam 1: Introduction to Computers and Java53 Questions
Exam 2: Java Fundamentals52 Questions
Exam 3: Decision Structures58 Questions
Exam 4: Loops and Files56 Questions
Exam 5: Methods56 Questions
Exam 6: A First Look at Classes58 Questions
Exam 7: Arrays and the Arraylist Class63 Questions
Exam 8: A Second Look at Classes and Objects52 Questions
Exam 9: Text Processing and More About Wrapper Classes62 Questions
Exam 10: Inheritance64 Questions
Exam 11: Exceptions and Advanced File Io59 Questions
Exam 12: Java-Fx: Gui Programming and Basic Controls42 Questions
Exam 13: Java-Fx: Advanced Controls40 Questions
Exam 14: Java-Fx: Graphics, Effects, and Media40 Questions
Exam 15: Recursion23 Questions
Exam 16: Databases40 Questions
Select questions type
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)
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)
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)
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)
Showing 41 - 58 of 58
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)