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
Andrei [34K]
3 years ago
14

Define a new class Fighter that inherits from Spaceship. Add a variable property weapon that defaults to an empty string and a v

ariable property remainingFirePower that defaults to 5.
Computers and Technology
1 answer:
Ksenya-84 [330]3 years ago
4 0

Answer:

class Fighter(Spaceship):

   weapon = ""

   remain_fire_power = 5

Explanation:

The class "Fighter" is a python class that inherits all the variables and methods from the Spaceship class. The Fighter class is considered the child class while the Spaceship class is known as the parent class. The weapon and remain_fire_power variables are class variables unique to the fighter class and defaulted to an empty string and 5 respectively.

You might be interested in
Describe the layout of an article on Wikipedia​
GuDViN [60]

An article with a table of contents block and an image near the start, then several sections

Sample article layout (click on image for larger view)

This guide presents the typical layout of Wikipedia articles, including the sections an article usually has, ordering of sections, and formatting styles for various elements of an article. For advice on the use of wiki markup, see Help:Editing; for guidance on writing style, see Manual of Style.

Contents

1 Order of article elements

2 Body sections

2.1 Headings and sections

2.2 Names and orders for section headings

2.3 Section templates and summary style

2.4 Paragraphs

3 Standard appendices and footers

3.1 Headings

3.2 Works or publications

3.3 "See also" section

3.4 Notes and references

3.5 Further reading

3.6 External links

3.6.1 Links to sister projects

3.7 Navigation templates

4 Specialized layout

5 Formatting

5.1 Images

5.2 Horizontal rule

5.3 Collapsible content

6 See also

7 Notes

8 References

A simple article should have, at least, (a) a lead section and (b) references. The following list includes additional standardized sections in an article. A complete article need not have all, or even most, of these elements.

The same article, with the central left highlighted: it contains just text in sections.

Body sections appear after the lead and table of contents (click on image for larger view).

Articles longer than a stub are generally divided into sections, and sections over a certain length are generally divided into paragraphs; these divisions enhance the readability of the article. The names and orders of section headings are often determined by the relevant WikiProject, although articles should still follow good organizational and writing principles regarding sections and paragraphs.

5 0
2 years ago
What is the final value for X ?<br><br> x= 1<br><br> x=13<br><br> x= x+3<br><br> x=0
a_sh-v [17]

Answer:

x=13

Explanation:

6 0
3 years ago
How the data is converted into the information?​
leonid [27]

Answer:

the data is converted into information by data processing

7 0
3 years ago
Read 2 more answers
Before you can use the Management Studio to work with the objects in a database, you must ___________ the database files (i.e.,
Lelu [443]

Answer:

You must attach the database files

Explanation:

4 0
3 years ago
(Count positive and negative numbers and compute the average of numbers) Write a program that reads an unspecified number of int
Papessa [141]

Answer:

Explanation:

Sorry it  is in Java, though you can covert it using converter

public class Exercise {

public static void main(String[] args) {

 Scanner input = new Scanner(System.in);

 int positives = 0;  // Count the number of positive numbers

 int negatives = 0;  // Count the number of negative numbers

 int count = 0;   // Count all numbers

 double total = 0;  // Accumulate a totol

 // Promopt the user to enter an integer or 0 to exit

 System.out.print("Enter an integer, the input ends if it is 0: ");

 int number = input.nextInt();

 if (number == 0) { // Test for sentinel value

  System.out.println("No numbers are entered except 0");

  System.exit(1);

 }

 while (number != 0) {// Test for sentinel value

  if (number > 0)

   positives++; // Increase positives

  else

   negatives++; // Increase negatives

  total += number; // Accumulate total

  count++;    // Increase the count

  number = input.nextInt();

 }

 // Calculate the average

 double average = total / count;

 // Display results

 System.out.println(

  "The number of positive is " + positives +

  "\nThe number of negatives is " + negatives +

  "\nThe total is total " + total +

  "\nThe average is " + average);

}

}

7 0
3 years ago
Other questions:
  • While Angela is making modifications to Katie’s Word document, she would like to inform Katie of the reasoning for the change. W
    10·1 answer
  • Keion works as a freelancer creating websites and designing logos for clients. He recently had a hard drive failure and lost wor
    7·1 answer
  • *FREE POINTS* If you comment and follow me this will give up lot of points :p seriously I will follow u back if u do it :p​
    11·2 answers
  • A corporation needs an operating system that allows the various teams in its office to network and collaborate on projects. Whic
    10·1 answer
  • On his website, Mario has a video that visitors must click to play. He wants the video to play automatically when the page loads
    9·1 answer
  • Combining two or more cells to make one is called​
    8·1 answer
  • What is the principal goal of data science?<br>​
    5·1 answer
  • What is it called when servers on the Internet supply applications as a service, rather than a product
    14·1 answer
  • Office 365 ProPlus can be deployed to your enterprise. When doing so, which tool enables you to choose the language, hardware ar
    5·1 answer
  • Technology __________ guides how frequently technical systems are updated, and how technical updates are approved and funded.
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!