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
Schach [20]
3 years ago
12

A programmer writing code in class Point attempts to override the following inherited method:public boolean equals( Object o ) {

... }but does not match the method signature exactly. Instead, the programmer uses the following method signature:public boolean equals( Point p ) { ... }What is the result?a. A syntax error occurs because the method signatures do not match.b. The code compiles and works fine -- the method has been successfully overridden.c. The code compiles, but the inherited method has not been overridden -- it has been overloaded instead.d. The compiler automatically changes the method signature to match the inherited method.e. The compiler issues a warning, but the method is successfully overridden.
Computers and Technology
1 answer:
Mrrafil [7]3 years ago
3 0

Answer:

a. A syntax error occurs because the method signatures do not match.

Explanation:

The method signature does not match as the method argument is wrong and so the compiler would issue a syntax error. Trying to override an inherited method from a class and not getting the method syntax correct would mean that the overide operation would not be successful as there would be a syntax error therefore it is paramount that the method argument is properly inputted in the above statement in order to successfully overide the inherited class method.

You might be interested in
company gives the following discount if you purchase a large amount of supply. Units Bought Discount 10 - 19 20% 20 - 49 30% 50
ratelena [41]

Answer:

In Python:

order = int(input("Order: "))

discount = 0

if(order >= 10 and order <20):

    discount = 0.20

elif(order >= 20 and order <50):

    discount = 0.30

elif(order >= 50 and order <100):

    discount = 0.35

elif(order >= 100):

    discount = 0.40

price = order * 4.1

discount = discount * price

print("With your order of "+str(order)+" items, the total value will be $"+str(round(price,2))+" with a discount of $"+str(round(discount,2))+" for a final price of $"+str(round((price-discount),2)))

Explanation:

This prompts the user for number of orders

order = int(input("Order: "))

This initializes the discount to 0

discount = 0

For orders between 10 and 19 (inclusive)

if(order >= 10 and order <20):

-----------discount is 20%

    discount = 0.20

For orders between 20 and 49 (inclusive)

elif(order >= 20 and order <50):

-----------discount is 30%

    discount = 0.30

For orders between 50 and 99 (inclusive)

elif(order >= 50 and order <100):

-----------discount is 35%

    discount = 0.35

For orders greater than 99

elif(order >= 100):

-----------discount is 40%

    discount = 0.40

This calculates the total price

price = order * 4.1

This calculates the pre discount

discount = discount * price

This prints the report

print("With your order of "+str(order)+" items, the total value will be $"+str(round(price,2))+" with a discount of $"+str(round(discount,2))+" for a final price of $"+str(round((price-discount),2)))

3 0
2 years ago
If your vehicle leaves the pavement for any reason, remember to take your foot off the gas pedal, hold the wheel firmly, and____
aleksandr82 [10.1K]
A- and steer in a straight line 
8 0
3 years ago
Read 2 more answers
Which game would be classified as an educational game
Masja [62]

Answer:

The various game types can be like board, video and card games. As far as educational video games are concerned they are made to explain to us some of the subjects which can be specific, as well as to teach a certain set of skills like role-playing. They are the interactive play that can help us learn the rules, goals, techniques to solve the problems. adaptation quality, as well as interactions, and all of these are being narrated in the form of a story. You should know that each game is a story in reality, and always. One can think of many such games, and like action games based on the military helps us learn how to fight a war.

Explanation:

Please check the answer.

7 0
3 years ago
About how many jobs in the United States require Microsoft expertise?
GarryVolchara [31]
Answer: C because bill gates is the owner
5 0
3 years ago
Which of the following views would you use to see your Web page while working on it?
brilliants [131]
D) Alt Tags thats the answer i think
8 0
3 years ago
Other questions:
  • In Linux, the most popular remote access tool is OpenSSH. Which software performs the same remote command line (CLI) access from
    7·1 answer
  • A ____ appearing in the main text of a document indicates a footnote or endnote.
    15·1 answer
  • Help me I'm so confused by this question
    7·1 answer
  • Which of the following would an NSA professional most likely need?
    5·2 answers
  • Write a program that reads from the user any three points in two dimensional space: x1, y1, x2, y2, x3, y3. Assume these points
    13·1 answer
  • Display the total number of parking tickets.
    5·1 answer
  • State differences between title bar and menu bar​
    5·1 answer
  • Read each question below. Then, using the drop-down menus, decide if it represents the purpose, construction, or support aspect
    11·1 answer
  • Hola, alguien aquí me podría ayudar dándome ideas a cerca de office (Word, PowerPoint o Excel) estoy desesperada no puedo pensar
    11·1 answer
  • What is the purpose of the Subtotal feature?
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!