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
Oliga [24]
3 years ago
13

2. You have classes to represent different shapes (see below). You realize you can benefit from inheritance and polymorphism by

creating a superclass for all shapes. a. Create such a superclass. b. Did you choose an abstract class or an interface for your answer to part a? c. Why did you make this choice?
Computers and Technology
1 answer:
Keith_Richards [23]3 years ago
6 0

Answer:

The description for the given question is described in the explanation section below.

Explanation:

a...

interface Shape

{

public double getArea();    // creating a function

public double getPerimeter();   // creating a function

}

b and c...

  • I preferred Interface although abstract classes are being used when children's classes associate certain aspect methods and variables and because all classes represent a certain method throughout the specific solution, not instance variables, it would be easier to construct an interface.
  • Almost all of the period interfaces are favored because they have multiple inheritance capabilities.

You might be interested in
When you _____ a scroll bar, a shortcut menu appears with commands related to the scroll bar
stich3 [128]
I think d is the right answer
8 0
3 years ago
Define CPU and its functions​
Maslowich

<u>Central processing unit (CPU)</u>

functions :-

  • <u>CPU performs basic arithmetic, logic, controlling, and input/output (I/O) operations specified by the instructions in the program.</u>

6 0
2 years ago
Read 2 more answers
hãy lựa chọn một doanh nghiệp kinh doanh theo loại hình siêu thị việt nam em hãy tìm hiểu doanh nghiệp và thực hiện theo yêu cầu
Anastasy [175]

Quy trình kinh doanh, phương pháp kinh doanh hoặc chức năng kinh doanh là một tập hợp các hoạt động hoặc nhiệm vụ có liên quan, có cấu trúc bởi con người hoặc thiết bị, trong đó một trình tự cụ thể tạo ra một dịch vụ hoặc sản phẩm (phục vụ một mục tiêu kinh doanh cụ thể) cho một khách hàng cụ thể.

4 0
3 years ago
Does a soda vending machine Give reciepts?<br><br>need for computer science hw
kupik [55]
No, they do not give receipts.<span />
6 0
3 years ago
Read 2 more answers
A(n) ______________ ________________ attack keeps the target so busy responding to a stream of automated requests that legitimat
Tanya [424]

Answer:

denial-of-service (DoS) attacks

Explanation:

8 0
3 years ago
Other questions:
  • What important information is needed if you are installing an oem version of windows 7?
    6·1 answer
  • When was unicode invented?
    13·1 answer
  • Instructions Write a program that asks the user for a number. If the number is between 1 and 255, the program outputs the corres
    15·1 answer
  • ⭐️⭐️⭐️ what Network is larger in size? MAN or WAN? Thank you ⭐️⭐️⭐️
    5·1 answer
  • Are the buying and selling of stocks centralized activities? Why or why not?
    10·2 answers
  • It is possible to make the document larger for viewing small text.<br><br> True<br> False
    15·2 answers
  • Can someone start me off with a short 2 or 3 paragraphs about the pros and cons of Microsoft Word, and if you can recommend a si
    12·1 answer
  • The profile picture that you plan to use to market your professional brand on social media networks should feature you only.
    12·1 answer
  • Which family does Ms word 2007 belongs to?​
    6·2 answers
  • How does the use of blocking affect the external sorting algorithm, and how does it change the cost formula
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!