Mark for Review 1 Points A way of redefining methods with the same return type and parameters. A way to create multiple methods with the same name but different parameters. A class that cannot be initiated. The concept that a variable or reference can hold multiple types of objects. What is the Java keyword final used for in a program? Mark for Review 1 Points It permits redefining methods of a parent class inside the child class, with the same name, parameters, and return type.
It permits access to the class variables and methods from anywhere. There is no such keyword in Java. It restricts a class from being extendable and restricts methods from being overridden. Identify the correct way to declare an abstract class. Mark for Review 1 Points public class abstract ClassName If the return type from a method is boolean then 2. The basic unit of encapsulation in Java is the primitive data type.
Which of the following can be used as a parameter? Which segment of code represents a correct way to define a variable argument method? Mark for Review 1 Points Integer easyArray Identify the error s in the class below. Choose all that apply Mark for Review 1 Points Two methods cannot have the same name. Final cannot be used as an access modifier.
Private cannot be used as an access modifier. No method named min is defined. Which of the following would be most beneficial for this scenario? Joe is a college student who has a tendency to lose his books. Replacing them is getting costly. In an attempt to get organized, Joe wants to create a program that will store his textbooks in one group of books, but he wants to make each book type the subject of the book i.
MathBook is a book. How could he store these different subject books into a single array? Mark for Review 1 Points By ignoring the subject type and initializing all the book as objects of type Book.
Using polymorphism. This is not possible. Joe must find another way to collect the books. Abstract classes cannot implement interfaces. Which segment of code correctly defines a method that contains two objects of class Tree as parameters? Consider the following: There is a method A that calls method B. Method B is a variable argument method.
With this, which of the following are true? Mark for Review 1 Points Choose all correct answers Method A can invoke method B twice, each time with a different number of arguments. When invoked, method B creates an array to store some or all of the arguments passed to it from method A.
Which of the following is a possible way to overload constructors? Identify the driver class that correctly initializes employees Jane and Brandon. The Employee class is below. What is wrong with the following class declaration? The constructor method has no definition. Classes cannot include strings. Static methods can return any object type. Static classes can extend their parent class. Non-final static class variables should be private to prevent changes from other classes.
What is encapsulation? Mark for Review 1 Points A programming philosophy that promotes simpler, more efficient coding by using exiting code for new applications. A programming philosophy that promotes protecting data and hiding implementation in order to preserve the integrity of data and methods.
A keyword that allows or restricts access to data and methods. If a variable in a superclass is private, could it be directly accessed or modified by a subclass? Why or why not? Mark for Review 1 Points No. Nothing inherited by the super class can be changed in the subclass. Any variable passed through inheritance can be changed, but private methods cannot.
A subclass inherits full access to all contents of its super class. A private variable can only be modified by the same class with which it is declared regardless of its inheritance. Which of the following demonstrates the correct way to create an applet Battlefield? What keyword is used to inherit a superclass? It is possible to extend a class that already exists in Java, such as the Applet class. They restrict a superclass to only have one subclass.
Is there a difference between overriding a method and overloading a method? Mark for Review 1 Points Yes. Overriding is done in the subclass and allows for redefining a method inherited from the superclass and overloading is done within a class and allows for multiple methods with the same name. Overriding is done within a single class and overloading is done through a series of superclasses and their subclasses. Overriding allows for the creation of an array of different object types and overloading restricts an array to only contain the same object types.
It is possible to inherit from an abstract class. Static classes are designed as thread safe class instances. Static classes can extend any class in their class path. Which of the following is the correct way to code a method with a return type an object Automobile?
It is not possible to return an object. Choose the correct implementation of a public access modifier for the method divide.
Which constructor code populates the instance variables of the class correctly? What value will return for j when the setValue method is called? Mark for Review 1 Points There is no constructor method and you have to make a constructor method. There is nothing wrong. Classes cannot include mixed data types.
Which of the following keywords are used to access the instance variables of an object from within the class code for that object? Where should the constructor for a superclass be called?
Mark for Review 1 Points The first line of the constructor in the subclass. The super constructor does not need to be called inside the subclass. Inside the main method of the subclass. Anywhere inside the subclass.
Which of the following is the proper way to set the public variable length of the super class equal to 5 from inside the subclass? Mark for Review 1 Points super. Mark for Review 1 Points A keyword that restricts access to only inside the same class. A keyword that signals the end of a program. Abstract classes can be instantiated. Which of the following is a goal of the object model? Mark for Review 1 Points Choose all correct answers Providing modular code that can be reused by other programs or classes.
There is only one copy a static class variable in the JVM. Which of the following access modifiers doesn't work with a static variable? How is it possible for overloading to work?
Mark for Review 1 Points Java Virtual Machine searches until it finds a constructor name and argument type match.
The code has to be declared as private. There is no such thing as overloading. To do this, put your finger on the fingerprint sensor of the door in order to open it. Turn the phone upside down to dump it all out of the glasses, making it so that none of them have any wine left.
Level 7. Turn the phone sideways to turn the 8 into an infinity symbol, then press that symbol. Ignore the first 15, and for the second 15, tap the 15 in the question. The largest numbers on the keypad are 7, 8, and 9, and the sum of those together is Then tap on all of the animals, including the human, then the worm.
Level 8. Pick up the box and shake it until a matryoshka doll pops out. Then tap on the doll to pass. Level How many cakes are there? There are 13 total cupcakes.
There is already a thief in the safe, so shake your device to break them out of the safe. Pick up one of the bills, use it to scoop up the rest of the bills, then put them in his jacket pocket. Level 9. Still 8, because this is only a picture of a clock.
The largest number on the screen is 9. Press and hold your finger on the base of the thermometer for awhile to find out. Level To find out, open it by doing the zoom-in motion with two fingers to lift the lid off.
Tap and hold the paper clip and then swipe down on the paper. Then tap the egg. Take the purse away from her and give it to the guy. How many of them are currently in your hand? How long does it take both of them to reach the same height? Seven hours, they will both be burned to nothing. How many total children are in the family? I have made the same mistake. In future, I suggest you try to use a more appropriate title.
Titles like "A geometry puzzle" are too generic. Show 2 more comments. Active Oldest Votes. Conifold Weltschmerz Weltschmerz 6, 31 31 silver badges 48 48 bronze badges.
Add a comment. Aryabhata Aryabhata Seyed Seyed 8, 4 4 gold badges 19 19 silver badges 30 30 bronze badges. Then the solution is J. Berrick Caleb Fillmore 5, 17 17 silver badges 36 36 bronze badges. Taha Akbari Taha Akbari 3, 1 1 gold badge 17 17 silver badges 60 60 bronze badges. Blue Which of the following geometric shapes is a quadrilateral but not a parallelogram? What is the term for a rectilinear geometric shape that contains no equal sides or angles and no parallel sides? Which of the following geometric shapes is also a regular polygon?
How many sides does a heptagon contain? What is the name of a lo-sided polygon? What is the length of the radii in a circle with a diameter of 60 mm?
The portion of a circle between two given radii at 36 degrees angularity, including the bound portion of the circumference, is known by what term? What term refers to multiple circles that do not share a common center? A line of infinite length tangent to the inner most circle in a nest of four concentric circles has what relationship to the remaining three circles? An arc is a part of the curved segment of a circle bound by but not including two radii. The Spiral of Archimedes is created by uniformly increasing or decreasing the distance from the center of what geometric element?
What term refers to the plane surfaces of polyhedra? What is a parallelepiped? A generatrix of a right circular cylinder is equal in length to what other cylindrical component? What is the difference between a truncated pyramid and a frustum?
0コメント