Exam 6: A First Look at Classes
Exam 1: Introduction to Computers and Java42 Questions
Exam 2: Java Fundamentals53 Questions
Exam 3: Decision Structures52 Questions
Exam 4: Loops and Files48 Questions
Exam 5: Methods50 Questions
Exam 6: A First Look at Classes49 Questions
Exam 7: A First Look at Gui Applications49 Questions
Exam 8: Arrays and the Arraylist Class52 Questions
Exam 9: A Second Look at Classes and Objects40 Questions
Exam 10: Text Processing and More About Wrapper Classes49 Questions
Exam 11: Inheritance49 Questions
Exam 12: Exceptions and Advanced File Io46 Questions
Exam 13: Advanced Gui Applications46 Questions
Exam 14: Applets and More39 Questions
Exam 15: Recursion34 Questions
Exam 16: Sorting, Searching, and Algorithm Analysis46 Questions
Exam 17: Generics50 Questions
Exam 18: Collections50 Questions
Exam 19: Array-Based Lists20 Questions
Exam 20: Linked Lists36 Questions
Exam 21: Stacks and Queues36 Questions
Exam 22: Binary Trees, Avl Trees, and Priority Queues45 Questions
Select questions type
What does the following UML diagram entry mean? + setHeight(h : double): void
(Multiple Choice)
4.9/5
(38)
The following package is automatically imported into all Java programs.
(Multiple Choice)
4.8/5
(40)
For the following code,which statement is not true? public class Circle
{
Private double radius;
Public double x;
Private double y;
}
(Multiple Choice)
4.8/5
(47)
True/False: The term "no-arg constructor" is applied to any constructor that does not accept arguments.
(True/False)
4.9/5
(43)
The term "default constructor" is applied to the first constructor written by the author of a class.
(True/False)
4.9/5
(37)
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 double finalOrderTotal()
{
Return orderAmount - orderAmount *
OrderDiscount;
}
}
Public class CustomerOrder
{
Public static void main(String[] args)
{
Order order;
Int orderNumber = 1234;
Double orderAmt = 580.00;
Double orderDisc = .1;
Order = new Order(orderNumber,orderAmt,orderDisc);
Double finalAmount = order.finalOrderTotal();
System.out.println("Final order amount = $" +
FinalAmount);
}
}
(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.println("Final order amount = $" +
FinalAmount);
}
}
(Multiple Choice)
4.7/5
(38)
You should not define a class field that is dependent upon the values of other class fields...
(Multiple Choice)
4.9/5
(41)
The java.lang package is automatically imported into all Java programs.
(True/False)
4.9/5
(33)
In UML diagrams,this symbol indicates that a member is public.
(Multiple Choice)
4.9/5
(39)
A method that stores a value in a class's field or in some other way changes the value of a field is known as a mutator method.
(True/False)
4.7/5
(32)
A class specifies the ________ and ________ that a particular type of object has.
(Multiple Choice)
4.8/5
(37)
After the header,the body of the method appears inside a set of
(Multiple Choice)
4.9/5
(30)
It is common practice in object-oriented programming to make all of a class's
(Multiple Choice)
5.0/5
(52)
Instance methods do not have the key word static in their headers.
(True/False)
4.9/5
(45)
When an object is created,the attributes associated with the object are called
(Multiple Choice)
4.8/5
(33)
In UML diagrams,this symbol indicates that a member is private .
(Multiple Choice)
4.9/5
(42)
In your textbook the general layout of a UML diagram is a box that is divided into three sections.The top section has the _______;the middle section holds _______;the bottom section holds _______.
(Multiple Choice)
4.8/5
(40)
Showing 21 - 40 of 49
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)