1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Georgia [21]
3 years ago
15

Assume that circle and objects are created as follows Circle circle = new Circle(1); GeometricObject object = new GeometricObjec

t(); a) Are the following Boolean expressions true or false? (circle instanceof GeometricObject) (object instanceof GeometricObject) (circle instanceof Circle) (object instanceof Circle) b. Can the following statements be compiled? Circle circle = new Circle(5); GeometricObject object = circle;
Computers and Technology
1 answer:
NARA [144]3 years ago
8 0

Answer and Explanation:

The output is false because Circle is used. Circle class has two methods, such as ( Circle circle ) and Object o that defined in the Object class. The Circle class inherits it. Circle.euqlais equaled to Object o because it is the type of circle1 and circle 2. The object of Circle is match circle1. equal by the compiler.

The output is accurate if Circle class overrides the equals to defined in Object class. The circle is matched to equals to object and run time method implemented in Circle class.

Both Circle has a different address. With Circle.equals(circle 2) replaced and have a same method in Object class.

Yes the following statement can be compiled the Circle circle = new Circle(5);

Geometric Object object = circle;

In this Object o is used to compile and run time as the circle has a different address. Method overriding allows dynamic binding, but it is always determined by declared type.

You might be interested in
Please assist me with these questions - Do not send me links. Issues in opening the links:
Thepotemich [5.8K]

Answer:

15) Halo 2

17) Sims

18) B

19) A

20) B

Explanation:

3 0
3 years ago
Under normal operations, cisco recommends that you configure switch ports on which vlan
larisa86 [58]

 

You can configure switch ports on default VLAN under normal operations. Cisco switches always have VLAN 1 as the default VLAN, which is required for many decorum communications between switches like spanning-tree protocol for example. It is obligatory not to delete or even change the default VLAN.

 

 





3 0
3 years ago
PLS HURRY!!<br> Look at the image below!
Lady_Fox [76]

Answer:

Line 2: for numF in [3, 5]

Line 1: for numE in [2, 6]

Line 3: print(numE, numF)

Explanation:

From the outputs, the first number of the first output is 2. This means that <em>numE in [</em><em>2</em><em>, 6]</em> would be on the first line.

The second number of the first output is 3, concluding that <em>numF in [</em><em>3</em><em>, 5]</em> is within a nested loop, meaning it would be on the second line.

This leaves <em>print(numE, numF)</em> on line 3.

We can go through the lines step by step to check if we have placed them in the correct order:

Code

for numE in [2, 6]:

 for numF in [3, 5]:

   print(numE, numF)

During the first iteration, numE = 2 and numF = 3.

Output: 2, 3

Since [3, 5] is in a nested loop, we need to finish iterating all of its numbers before numE moves to the next number, so:

numF moves to 5, numE stays at 2.

Output: 2, 5

Since we have finished iterating through [3, 5], numE moves to 6 and numF starts back at 3:

Output: 6, 3

numE still stays at 6 and numF iterates to 5 since [3, 5] is in a nested loop:

Output: 6, 5

The outputs match the outputs on the sheet, meaning we have correctly placed the code in order.

Hope this helps :)

5 0
3 years ago
1. Write a statement that opens the file Customers.dat as a random access file for both reading and writing.
KengaRu [80]

Answer:

Explanation:

In Python you need to give access to a file by opening it. You can do it by using the open() function. Open returns a file object, which has methods and attributes for getting information about and manipulating the opened file.

https://eecs.wsu.edu/~cs150/tutorial/file/code11_3.html

Look at this link it may help.

3 0
3 years ago
Explain how a message is transmitted from one computer to another using layers.
nevsk [136]
I need some answer chouices but they use iphones
7 0
3 years ago
Other questions:
  • From the ages of 18 to 24, individuals born from 1980 to 1984 held an average of 6.2 jobs—which is slightly higher than the numb
    10·1 answer
  • Nadia's productivity at work is being hurt due to the large quantity of unwanted e-mail she receives. What steps can she take to
    8·1 answer
  • When do on loop conditions happen? (1 point)
    5·1 answer
  • I have two questions: 1: how do you credit only 5 points on brainl? (mine is only letting me give 10) and 2. How do I get a bria
    6·2 answers
  • The functions of forums
    15·1 answer
  • Rather than simply repeating key terms and concepts, Jeremy focused on the meaning of the information in the chapter and tried t
    13·1 answer
  • The light source for a typical silhouette is generally___________ the subject.
    12·2 answers
  • Do these devices allow you to view photos using the cloud?
    10·1 answer
  • Which three IP addresses may be pinged by the Test Management Network feature in the ESXi hosts DCUI
    12·1 answer
  • Accessibility is the degree to which a product or service is readily available and usable by _____.
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!