Question

Good afternoon,

I need assistance find the correct answer to the following multiple-choice questions to an entry-level Java assignment as I am confused about how to find it.

Thank you!

Q6 Method squareX is supposed to return the value of class attribute x squared, but I messed up :(. What did I overlook? 2

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

Q6)

The concept used in above program is variable shadowing. We use the 2 variables with same name but different scopes. In above program the variable used is x.

So, the correct answer is variable shadowing

-------------

Q7)

A class is analogous to a blueprint. In a class we can define methods and variables, We can use the methods and variables by instantiation of a Class with object.

So the answer is : A blueprint

-------------

Q8)

An object is just creation of an instance of a class. We can create multiple objects for the same class.

So, the answer is : An instance of a class.

--------------------

Q9)

Whenever we want to pass an object to a method, we just call the method by passing the reference of the object we have created.

So the correct answer is : A reference to an Object.

Add a comment
Know the answer?
Add Answer to:
Good afternoon, I need assistance find the correct answer to the following multiple-choice questions to an...
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
  • Good afternoon, I need assistance find the correct answer to the following question to an entry-level...

    Good afternoon, I need assistance find the correct answer to the following question to an entry-level Java assignment as I am confused about how to find it. Thank you! Q3 Assume a static method in a Java class. Which of the following statements would cause the method to be erroneous? 2 Points The method calls another static method in the same class The method is called from another non-static method The method accesses a non-static attribute in the same class...

  • Java please answer A to I please dont type the answer on paper please use the...

    Java please answer A to I please dont type the answer on paper please use the computer A.   Explain why alpha cannot be accessed by other members of its class. B.   In the program, how can you determine the type of access modifier? C.   Describe the differences and similarities of beta and gamma in program, within the context of access specifiers and class member accessibility. D.   Explain how objects, a and b, are passed to the method. E.    Why...

  • Q1. Write a recursive function in C++ void printNumberedChars(string str, int i=0) { ... } which...

    Q1. Write a recursive function in C++ void printNumberedChars(string str, int i=0) { ... } which prints each character of the given string str on a new line, with each line numbered 1, 2, 3, …. For example calling the function with printNumberedChars("hello"); should output the following: 1. h 2. e 3. l 4. l 5. o Q2. Write a recursive function in C++ int sumArray(const int* arr, unsigned int size) { ... } which takes an array of integers,...

  • Java I need help Q1: Suppose this is a legal assignment statement: Student obj1 = new...

    Java I need help Q1: Suppose this is a legal assignment statement: Student obj1 = new Book(); what is the relationship between Student and Book?    1 - Student has Book as a field    2 - Student is a subtype of Book    3 - No Relationship    4 - Book is a subtype of Student. Question2: Q2: What are the types involved in this statement: Vehicle v1 = new Car();    1- Car    2- new    3-...

  • SHORT ANSWER QUESTIONS Part 1 Classes Abstraction: What is Abstraction in terms of representation? Specifically what...

    SHORT ANSWER QUESTIONS Part 1 Classes Abstraction: What is Abstraction in terms of representation? Specifically what choices does one make when creating a class that is an example of Abstraction? Encapsulation: What is encapsulation? What is information hiding? What does a public interface to a class consist of (not in the sense of actual java interfaces but what the client uses to manipulate objects of the class) What is an object of a class? What is the constructor? How do...

  • CS0007 Good day, I am in an entry-level Java class and need assistance completing an assignment....

    CS0007 Good day, I am in an entry-level Java class and need assistance completing an assignment. Below is the assignment criteria and the source code from the previous assignment to build from.  Any help would be appreciated, thank you in advance. Source Code from the previous assignment to build from shown below: Here we go! Let's start with me giving you some startup code: import java.io.*; import java.util.*; public class Project1 { // Random number generator. We will be using this...

  • I have Majority of the code written but I just need to implement the <,>,and =...

    I have Majority of the code written but I just need to implement the <,>,and = sign in the code. I have posted the instructions for the whole code. I will add what I have at the end. Objectives: Implement basic class concepts in Java Implement inheritance with super and sub-classes Implement basic polymorphism concepts Problem: The TARDIS has been infected by a virus which means it is up to Doctor Who to manually enter calculations into the TARDIS interface....

  • INSTRUCTIONS: I NEED TO CREATE A PointApp PROGRAM THAT USES THE FOLLOWING API DOCUMENTATION. Below the...

    INSTRUCTIONS: I NEED TO CREATE A PointApp PROGRAM THAT USES THE FOLLOWING API DOCUMENTATION. Below the API Documentation is the code I submitted. However, the output is different for what they are asking. I am looking for someone to fix the code to print out the correct output and to add comments so I can have an idea in how the code works. PLEASE AND THANK YOU. API DOCUMENTATION: public class Point extends java.lang.Object The Point class is used to...

  • I need help writing my main method**** Computer Science 111 Introduction to Algorithms and Programming: Java...

    I need help writing my main method**** Computer Science 111 Introduction to Algorithms and Programming: Java Programming Project #4 – Classes and Objects (20 Points) You will create 3 new classes for this project, two will be chosen from the list below and one will be an entirely new class you invent.Here is the list: Shirt Shoe Wine Book Song Bicycle VideoGame Plant Car FootBall Boat Computer WebSite Movie Beer Pants TVShow MotorCycle Design First Create three (3) UML diagrams...

  • please answer All the multiple choice questions in the pic (all pics) i dont need a...

    please answer All the multiple choice questions in the pic (all pics) i dont need a explantion . 22 Using a bacteriophage to pass DNA rom bacterium to another O A) Transduction O B) Transformation C) Translocation O D) Translation 23. What research did Rosalind Franklin contribute to the elucidation of the double helix structure of DNA? O O O A) Principles of base pairing B) Biochemical data C) Bacterial transformation data D) X ray crystallography A segment of DNA...

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
Active Questions
ADVERTISEMENT