ANSWER : HERE IS THE ANSWER FOR YOUR QUESTION:
----------------------------------------------------------------------------------------------------------------
Question 1) when we add any new method to a interface , its implementation is mandatory needed in the class that it implementing that interface .
thus , the correct option is
d) ALL The classes that implement the class interface have to add the fly method()
Question 2)
method in a interface are always public and abstract by default . so if the programmer even forget to put public keyword, compiler would add it automatically . so the correct option is:
c) both void methodname() and public void methodname() are correct ;
Question 3)
map.get("forward") would get us a object related to forwardCommand as it is sensible logic writing to have key -value pair as name matching .
so the correct option would be:
d) A forwardCommand Object
----------------------------------------------------------------------------------------------------------------
I hope this would help you out.
If you like my answer , please upvote
If you have any doubt, you can provide comment /feedback below the answer
Thanks
Question 4 2 pts What alterations, if any, would you need to make to your program...
Below is the code for the class shoppingList, I need to enhance
it to accomplish the challenge level as stated in the description
above.
public class ShoppingList {
private java.util.Scanner scan;
private String[] list;
private int counter;
public ShoppingList() {
scan = new java.util.Scanner(System.in);
list = new String[10];
counter = 0;
}
public boolean checkDuplicate(String item) {
for(int i = 0; i < counter; i++) {
if (list[i].equals(item))
return true;
}
return false;
}
public void printList() {
System.out.println("Your shopping...
Please select correct option A,B,C,D
Question 6 2 pts (TCO 4) What is the passive-interface command that causes a router to stop sending what types of packets? Incoming O Hello O RIP Gateway
Consider the blowing code snippet Question 4 2 pts 2 pts Canvas XC Question 3 2 pts Consider the following code snippet public class Hypp extends Application public void start (Stage stapelt Button button new lutton("Calculate"); Label label new Label("Total amount dut) > public class Handler rolesents EventHandler Action vest public void handle (Actiontrent event) label.Text("Hell) > 2 What is wrong with this code? label must be declared as an instance variable. button must be declared as an instance variable...
Hey Guys , I need help with this assignment: This component of the final exam will have two data structures. The two data structures will be a stack and the other will be a hashmap. The hashmap object will be added to the stack every time the user picks an answer. The hashmap will have a key and value. The key will be the timestamp (system time when the user selected a choice) and the value will be the choice...
Hello. I need help writing the following Java Program. Thank you Develop a class encapsulating the concept of a college course, assuming that a course has following attributers: code (for instance COSC1337), a description, and a number of credits (for instance 3). Include a constructor, the accessors, mutators and methods ‘toString’, ‘equals’, and ‘finalize’. Write a client class to test the behavior of the class and its methods. The outline of the class is given as follows: public class Course...
public class Question1 { /* For this part of the assignment you will need to make a custom Exception class before you continue. 1) Create a class (in this same package) with the name MyException that inherits directly from the Exception class. 2) Complete the body of the method below by adding a single line that generates an instance of the exception class you just created. When creating your myException object use the following message as an argument to...
Question 216 pts (TCO 2) In order to guarantee that only one JRadioButton is selected at any time, _____. add each JRadioButton object to a different panel create a ButtonGroup object and add the JRadioBttons to it have a JCheckBox object manage the three JRadioButtons This cannot be done in Java. Flag this Question Question 226 pts (TCO 2) Which Java interface would you need to implement in order to handle events such as key-pressed or key-released events? KeyListener interface...
Question 1 2 pts The preprocessor executes after the compiler. False True Question 2 2 pts What code is human-readable and follows the standards of a programming language? Secret code Source code Key code None of these Machine code Question 3 2 pts What is the symbol that marks the beginning of a one line comment? Question 1 2 pts The preprocessor executes after the compiler. True False Question 5 2 pts A statement that may be used to stop...
What if you had to write a program that would keep track of a
list of rectangles? This might be for a house painter to use in
calculating square footage of walls that need paint, or for an
advertising agency to keep track of the space available on
billboards.
The first step would be to define a class where one object
represents one rectangle's length and width. Once we have class
Rectangle, then we can make as many objects of...
I am supposed to reduce redundancy in the code and also make unknown inputs, output "unknown". Step 1: Your development manager likes your program but is concerned about code duplication. Roger left a note on your desk, asking about using a feature for automatically converting strings to enumerations. Change your ToCommand method to employ this JAVA library method. (Hint: Look for a valueOf method). After converting your ToCommand method, run the program and enter an invalid command (one that does...