Question

QUESTION 11 Which of the following could never be found in the file NewClass.java? public NewClass()...

QUESTION 11

  1. Which of the following could never be found in the file NewClass.java?

    public NewClass() {
    message = “Hello World!”;
    }

    public String title = “New Class”;

    public void doSomething() {
    doSomethingElse();
    }

    public OtherClass() {
    message = “Hello, World! Good to see you again!”;
    }

2 points   

QUESTION 12

  1. Match the terms to the corresponding definition below.

          -       A.       B.       C.       D.       E.       F.       G.       H.   

    Visual components that the user sees when running an app

          -       A.       B.       C.       D.       E.       F.       G.       H.   

    Components that wait for events outside the app to occur

          -       A.       B.       C.       D.       E.       F.       G.       H.   

    Component that makes aspects of an app available to other apps

          -       A.       B.       C.       D.       E.       F.       G.       H.   

    Activities with no user interface

    A.

    Activity

    B.

    Regular App

    C.

    Broadcast Receiver

    D.

    Broadcast Sender

    E.

    Content Receiver

    F.

    Content Provider

    G.

    Services

    H.

    Background Service

2 points   

QUESTION 13

  1. Which of the following is NOT true when overriding a method?

    The subclass is given a method of the same signature as a superclass method.

    The superclass method is hidden when called from the subclass.

    The superclass method can no longer be used.

    You can override any method of the superclass.

2 points   

QUESTION 14

  1. Which is the escape character used in Java’s String object?

    Percentage sign (%)

    Tilde (~)

    Backslash (\)

    Forward slash (/)

2 points   

QUESTION 15

  1. Broadcast Receivers are terminated when the event they are waiting for occurs.

    True

    False

2 points   

QUESTION 16

  1. Motorola’s MOTODEV Studio allows the user to choose the Android version(s) the app supports.

    True

    False

2 points   

QUESTION 17

  1. Class instance variables must be declared at the beginning of the class definition.

    True

    False

2 points   

QUESTION 18

  1. Match the terms to the corresponding definition below.

          -       A.       B.       C.       D.       E.       F.       G.       H.   

    A set of files on disk to help organize projects

          -       A.       B.       C.       D.       E.       F.       G.       H.   

    An editor for working with specific file types

          -       A.       B.       C.       D.       E.       F.       G.       H.   

    A Window that displays some aspect of the project

          -       A.       B.       C.       D.       E.       F.       G.       H.   

    An arrangement of windows in the Eclipse IDE

    A.

    Workspace

    B.

    Workplace

    C.

    Workarea

    D.

    Workbench

    E.

    Perspective

    F.

    Outlook

    G.

    Point of View (POV)

    H.

    View

2 points   

QUESTION 19

  1. A constructor is the same as any other method definition EXCEPT for what?

    A constructor includes an optional argument list.

    A constructor includes an optional access modifier, usually public.

    A constructor includes a return type.

    A constructor places arguments within parentheses ().

2 points   

QUESTION 20

  1. The Timer class method schedule uses which of the following units for its delay value?

    Hours

    Minutes

    Seconds

    Milliseconds

0 0
Add a comment Improve this question Transcribed image text
Answer #1

11. public OtherClass() {
message = “Hello, World! Good to see you again!”;
} can never be found in the file NewClass.java because only one class can be public here, and that would be the class file, i.e. filename

12.

Visual components that the user sees when running an app :Regular App

Components that wait for events outside the app to occur : Broadcast Receiver

Component that makes aspects of an app available to other apps : Broadcast Sender

Activities with no user interface : Services

13.

The superclass method can no longer be used. : This is incorrect as you can still use superclass methods using super keyword.

14. Backslash (\) is the escape character, example : '\n' is new line escaper character.

15. Broadcast Receivers are terminated when the event they are waiting for occurs. - FALSE, They continue listening for other events as well.

17. Class instance variables must be declared at the beginning of the class definition. // yes, but not necessarily the important thing is, to create instance variables those must be declared outside any other methods and within this class.

example

public class example{

int id; // instance variable

String name;//instance variable

void fun(){

int a; // local variable and not an instance variable

}

}

19. A constructor does not include a return type.

Add a comment
Know the answer?
Add Answer to:
QUESTION 11 Which of the following could never be found in the file NewClass.java? public NewClass()...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • In Java Which of the following statements declares Salaried as a subclass of payType? Public class...

    In Java Which of the following statements declares Salaried as a subclass of payType? Public class Salaried implements PayType Public class Salaried derivedFrom(payType) Public class PayType derives Salaried Public class Salaried extends PayType If a method in a subclass has the same signature as a method in the superclass, the subclass method overrides the superclass method. False True When a subclass overloads a superclass method………. Only the subclass method may be called with a subclass object Only the superclass method...

  • Mobile Application Development questions Match the component type to the example of that component type.   ...

    Mobile Application Development questions Match the component type to the example of that component type.       -       A.       B.       C.       D.       E.       F.       G.    A Tip Calculator       -       A.       B.       C.       D.       E.       F.       G.    Where’s My App, which waits for a text message to be received...

  • QUESTION 13 A constructor is the same as any other method definition EXCEPT for what? A...

    QUESTION 13 A constructor is the same as any other method definition EXCEPT for what? A constructor includes an optional argument list. A constructor includes an optional access modifier, usually public. A constructor includes a return type. A constructor places arguments within parentheses (). 2 points    QUESTION 14 Using the asterisk wildcard (e.g. import com.packageName.*) will include all of the classes within packageName, even if they aren’t used. True False 2 points    QUESTION 15 The Random class gives...

  • QUESTION 31 The tkinter command _____ kicks off the GUI event loop. goloop() doloop() mainloop() loopDloop()...

    QUESTION 31 The tkinter command _____ kicks off the GUI event loop. goloop() doloop() mainloop() loopDloop() 2.5 points    QUESTION 32 Which of the following statements about superclasses and subclasses is true? A subclass is not connected to a super class in any way A superclass inherits from a subclass. A superclass extends a subclass. A subclass extends a superclass. 2.5 points    QUESTION 33 Pickled objects can be loaded into a program from a file using the function ____....

  • 1.   What will be the value of x after the following code is executed? int x...

    1.   What will be the value of x after the following code is executed? int x = 10, y = 20; while (y < 100) { x += y; } A.   90 B.   110 C.   210 D.   This is an infinite loop 2.   If a superclass has constructor(s): A.   then its subclass must initialize the superclass fields (attributes). B.   then its subclass must call one of the constructors that the superclass does have. C.   then its subclass does not inherit...

  • Which of the following statements is not true about subclass methods? Why? a. A subclass can...

    Which of the following statements is not true about subclass methods? Why? a. A subclass can override methods in a superclass. b. A subclass can define new methods that are not in the superclass. c. A subclass can inherit methods in a superclass. d. A subclass can access private methods in a superclass. e. A subclass can access public methods of its superclass.

  • Need help extending and constructing this problem in JAVA using the given guidelines. public class gatorade...

    Need help extending and constructing this problem in JAVA using the given guidelines. public class gatorade { public void nutrition() { System.out.println("nutrition facts method"); System.out.println("90 Calories"); System.out.println("0 Grams Fat"); System.out.println("20 MG Sodium"); System.out.println("18 Grams Sugar"); System.out.println("0 Grams Protein"); } } //inheritance public class blueberry extends gatorade{ System.out.println("Color is blue"); public class orange extends gatorade{ System.out.println("Color is orange"); public class lemonlime extends gatorade{ System.out.println("Color is yellow"); public class fruitpunch extends gatorade{ System.out.println("Color is red"); ________________________________________________________ Write one application program by using...

  • C++ programing Which of the following statements (a-d) are true if the following lines of code...

    C++ programing Which of the following statements (a-d) are true if the following lines of code are executed? int G = 17; int &H = G; A. H is now an alternate name for G B. Adding 1 to H will change the value of G to 18 C. Subtracting 5 from G and printing H will display the value 12 D. The condition H == G will give a true result E. All of the statements (a-d) are true...

  • ATM Revisited In Java, design a subclass of the Account class called GoldAccount. It is still...

    ATM Revisited In Java, design a subclass of the Account class called GoldAccount. It is still an Account class, however it has an additional field and some additional functionality. But it will still retain all the behavior of the Account class. Write a class called GoldAccount. This class will have an additional private field called bonusPoints. This field will require no get or set methods. But it will need to be initialized to 100 in the constructor. Thereafter, after a...

  • CS 1102 Unit 5 – Programming Assignment In this assignment, you will again modify your Quiz...

    CS 1102 Unit 5 – Programming Assignment In this assignment, you will again modify your Quiz program from the previous assignment. You will create an abstract class called "Question", modify "MultipleChoiceQuestion" to inherit from it, and add a new subclass of "Question" called "TrueFalseQuestion". This assignment will again involve cutting and pasting from existing classes. Because you are learning new features each week, you are retroactively applying those new features. In a typical programming project, you would start with the...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT