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
Katarina [22]
3 years ago
9

You coded the following class: public class N extends String, Integer { }When you compile, you get the following message:N.java:

1: ‘{‘ expected public class N extends String, Integer^ 1 errorExplain what the problem is and how to fix it.
Computers and Technology
1 answer:
lidiya [134]3 years ago
7 0

Answer:

Hi DancingGrace! The issue with the code is that it is trying to extend multiple classes which is not a feature in Java programming.

Explanation:

The extends keyword allows a class to use the attributes and properties of the base class it is extending and add more features and properties into it's own class. This is useful in programming where different models share similar properties but are slightly different. An example would be designing a class for Car and Bike. Both have some similar properties like wheels, engine, etc, however they are different forms of transport. A useful implementation would be to define a class called Vehicle with similar attributes, and have the Car and Bike extend it.  

You might be interested in
which of the following indicates that the loop should stop when the value in the quantity variable is less than the number 50​
yan [13]

Answer:

while (quantity >= 50)

Explanation:

Required

Stop when quantity is less than 50

To do this, we make use of a while statement and the syntax is:

while (condition){ }

If the loop should stop when quantity is less than 50; then it means the loop would continue when quantity is greater or equal to 50

So, we have:

while (quantity >= 50)

6 0
2 years ago
Which statement about intellectual property is true? (CSI-7.6) Group of answer choices It is okay to use code you find on the in
nika2105 [10]

Answer:

Laws are in place to cover your creative work, which includes code you have written.

Explanation:

Copyright law can be defined as a set of formal rules granted by a government to protect an intellectual property by giving the owner an exclusive right to use while preventing any unauthorized access, use or duplication by others.

A copyright can be defined as an exclusive legal right granted to the owner of a creative work (intellectual property) to perform, print, record, and publish his or her work. Also, the owner is granted the sole right to authorize any other person to use the creative work.

For instance, copyright law which protects the sharing and downloading rights of music is known as the Digital Millennium Copyright Act (DMCA).

An intellectual property can be defined as an intangible and innovative creation of the mind that solely depends on human intellect.

Simply stated, an intellectual property is an intangible creation of the human mind, ideas, thoughts or intelligence. They include intellectual and artistic creations such as name, symbol, literary work, songs, graphic design, computer codes, inventions, etc.

Hence, laws are in place to cover a person's creative work, and it includes code he or she have written.

6 0
3 years ago
Which of the following cannot be used in MS Office.<br> Joystick<br> Scanner<br> Light Pen<br> Mouse
ValentinkaMS [17]

Answer:

A.

Explanation:

A Joystick is a control device that is connected to the computer to play games. A joystick is similar in structure to a control stick used by pilots in airplanes and got its name from the same. A joystick contains a stick, base, extra buttons, auto switch fire, trigger, throttle, POV hat, and a suction cup. A joystick also serves the purpose of assistive technology.

The device which can not be used in MS Office is a joystick. Therefore, option A is correct.

6 0
2 years ago
How bridges are built over water
Black_prince [1.1K]
It’s all depending on what method
4 0
2 years ago
Write a function named partfthat takes inas parameterstwo parallel lists: a list of times (in increasing order), and a list of d
mario62 [17]

The program calculates the velocity between points in a list is written below. The program is written in python 3 thus ;

t = input("Enter time values : ")

<em>#Enter</em><em> </em><em>the</em><em> </em><em>time</em><em> </em><em>values</em><em> </em><em>of</em><em> </em><em>the</em><em> </em><em>data</em>

p = input("Enter distance values : ")

<em>#Enter</em><em> </em><em>the</em><em> </em><em>distance</em><em> </em><em>values</em>

dist = [float(x) for x in p.split()]

time = [float(x) for x in t.split()]

<em>#pyt</em><em> </em><em>then</em><em> </em><em>values</em><em> </em><em>in</em><em> </em><em>a</em><em> </em><em>list</em><em> </em>

def partfthat(dist, time):

<em>#initialize</em><em> </em><em>function</em><em> </em><em>that</em><em> </em><em>takes</em><em> </em><em>in</em><em> </em><em>two</em><em> </em><em>parameters</em><em> </em>

vel = []

<em>#empty</em><em> </em><em>list</em><em> </em><em>to</em><em> </em><em>hold</em><em> </em><em>the</em><em> </em><em>calculated</em><em> </em><em>velocity</em><em> </em><em>values</em><em> </em>

i = 0

<em>#indexer</em><em> </em>

while i <= len(dist)-2:

<em>#while</em><em> </em><em>loop</em><em> </em><em>to</em><em> </em><em>iterate</em><em> </em>

v = (dist[i+1] - dist[i]) / (time[i+1] -time[i])

<em>#</em><em>Use</em><em> </em><em>the</em><em> </em><em>velocity</em><em> </em><em>formula</em><em> </em>

vel.append(v)

<em>#append</em><em> </em><em>values</em><em> </em><em>to</em><em> </em><em>the</em><em> </em><em>empty list</em><em> </em><em>created</em><em> </em>

i+=1

return vel

print(avg_vel(dist, time))

<em>A</em><em> </em><em>sample</em><em> </em><em>run</em><em> </em><em>of</em><em> </em><em>the</em><em> </em><em>program</em><em> </em><em>is</em><em> </em><em>attached</em><em>.</em><em> </em>

Learn more : brainly.com/question/25681441

4 0
2 years ago
Other questions:
  • Do you believe that OOP should be phased out and we should start working on some alternative
    6·1 answer
  • Write algorithm to find (a+b)^2=(a+b)*(a+b)​
    9·1 answer
  • How do you measure objects and re-size them in tinkercad? I need it in steps.
    7·1 answer
  • Does anyone know any nitro type hack??
    13·2 answers
  • Analyze the following code. Which of the following statements is correct?
    9·1 answer
  • When calling a function with arguments that should be modified, the __________ of those arguments are passed.
    5·1 answer
  • Who wants brainlyest! NO LINKS how do you message someone on brainly
    10·2 answers
  • What is the relationship between agile teams and project requirements
    9·1 answer
  • What is an automatic update and when should you use it
    10·1 answer
  • Describe the concept behind a digital signature and explain how it relates to cybersecurity by providing a hypothetical example
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!