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
Setler [38]
2 years ago
7

Superclass in python explanation

Computers and Technology
1 answer:
goblinko [34]2 years ago
6 0

Answer:

The class from which a class inherits is called the parent or superclass. A class which inherits from a superclass is called a subclass, also called heir class or child class. Superclasses are sometimes called ancestors as well. There exists a hierarchical relationship between classes. It's similar to relationships or categorizations that we know from real life. Think about vehicles, for example. Bikes, cars, buses and trucks are vehicles. Pick-ups, vans, sports cars, convertibles and estate cars are all cars and by being cars they are vehicles as well. We could implement a vehicle class in Python, which might have methods like accelerate and brake. Cars, Buses and Trucks and Bikes can be implemented as subclasses which will inherit these methods from vehicle.

Explanation:

You might be interested in
a) Write out an abstract class to represent a ball. Include data fields to store the weight of the ball as a double value and th
guapka [62]

Answer:

Check the explanation

Explanation:

//Ball.java

public abstract class Ball {

   double value;

   String color;

   public Ball() {

   }

   public Ball(double value, String color) {

       this.value = value;

       this.color = color;

   }

   public abstract void howToPlay();

}

////////////////////////////////////////////

//SoccerBall.java

public class SoccerBall extends Ball {

   public void howToPlay() {

       System.out.println("Description to how to play soccer ball");

   }

}

7 0
3 years ago
Read 2 more answers
CODING TIME
Fynjy0 [20]

Answer:

food_list = ['rice', 'beans','yam', 'bread', 'pasta', 'cocoa','tea']

one_more = ['meat']

extend_list = food_list + one_more

print(extend_list)

Output : ['rice', 'beans','yam', 'bread', 'pasta', 'cocoa','tea', 'meat']

food_list.append('milk')

print(food_list)

Output : ['rice', 'beans','yam', 'bread', 'pasta', 'cocoa','tea', 'milk']

food_list.insert(0, 'cake')

print(food_list)

Output : ['cake', 'rice', 'beans','yam', 'bread', 'pasta', 'cocoa','tea']

flowers = ['rose', 'hibiscus', 'lily']

flowers.remove('rose')

print(flowers)

Output : ['hibiscus', 'lily']

To remove rose using pop()

flowers.pop(0)

Explanation:

The + operator and append method adds elements to the end of an existing list item.

The insert method adds element at the specified index

Remove method deletes element by stating the name of the element to be deleted while pop deletes element using the index value of the element.

7 0
2 years ago
Draw a timeline for each of the following scheduling algorithms. (It may be helpful to first compute a start and finish time for
12345 [234]

Answer:

See explanation below

Explanation:

Previos concepts

First Come First Serve (FCFS) "is an operating system scheduling algorithm that automatically executes queued requests and processes in order of their arrival".

Shortest job next (SJN), or the shortest job first (SJF) or shortest "is a scheduling policy that selects for execution the waiting process with the smallest execution time".

Shortest remaining time (SRF) "is a scheduling method that is a preemptive version of shortest job next scheduling'".

Round robin (RR) is an algorithm where the time parts "are assigned to each process in equal portions and in circular order, handling all processes without priority"

Solution for the problem

Assuming the dataset given on the plot attached.

Part a

For this algorithm the result would be:

Job A   0-6

Job B   6-(6+3) = 6-9

Job C   9-(9+1) = 9-10

Job D   10-(10+4) = 10-14

Part b

For this algorithm the result would be:

Job A   0-6

Job C   6-(6+1) = 6-7

Job B   7-(7+3) = 7-10

Job D   10-(10+4) = 10-14

Part c

For this algorithm the result would be:

Job A   0-1  until 14

Job B   2-(2+3) = 2-5

Job C   3-(3+2) = 3-5

Job D   9-(9+5) = 9-14

Part d

For this algorithm the result would be:

Job A   0-2 , 7-9, 12-14

Job B   2-4, 9-10

Job C   4-(4+1) = 4-5

Job D   5-7, 10-12

8 0
3 years ago
In Microsoft Word, when you highlight existing text you want to replace, you're in <br>     
IRISSAK [1]
You are in a formatting toolbar.
5 0
3 years ago
Read 2 more answers
In a real machine, the AMA is always the IMA. TRUE or FALSE.
Lena [83]
The statement "<span>In a real machine, the AMA is always the IMA. " is false.</span>
6 0
3 years ago
Other questions:
  • What is the opening page of a website called?
    9·2 answers
  • What are 2 ways that technology can negatively impact the environment.
    8·2 answers
  • 2. What are the pros and cons of Toyota structure?
    13·1 answer
  • For which punctuation symbol will you use the ring finger of your right hand?
    9·1 answer
  • What connector has 4 pins, is used for older IDE drives and some SATA drives, and can provide +5 V and +12 V power outputs?
    11·1 answer
  • What is online school like 3 sentences
    8·2 answers
  • How do you make the task bar and e-mail read in larger print
    13·1 answer
  • Why is the Vietnam War referred to as The Living Room War
    15·1 answer
  • Order the steps for accessing the junk email options in outlook 2016
    14·1 answer
  • Help fast pls
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!