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
Create a program that prints out a list of all the divisors of a number stored in a variable. (If you don’t know what a divisor
UkoKoshka [18]

Answer:

// Program is written in C++ Programming Language

// Comments are used for explanatory purpose

// Program starts here

#include<iostream>

using namespace std;

int main()

{

// Declare integer variable n which serves as the quotient.

int n;

// Prompt to enter any number

cout<<"Enter any integer number: ";

cin>>n;

// Check for divisors using the iteration below

for(int I = 1; I<= n; I++)

{

// Check if current digit is a valid divisor

if(n%I == 0)

{

// Print all divisors

cout<<I<<" ";

}

}

return 0;

}

7 0
3 years ago
Get the user to enter some text and print it out in reverse order.
svetlana [45]

Answer:

strrev in c/c++

Explanation:

3 0
2 years ago
Fill in the blank to make the following true.<br> 2 ** 3 =
avanturin [10]

Answer:

2 ** 3 = 8

Explanation:

7 0
2 years ago
Read 2 more answers
Jemima has finished formatting her main headings. She now wants to format her two subheadings. She wants to apply the format of
klasskru [66]

Answer:

the Format Painter feature

6 0
3 years ago
Amanda needs to create an informative print brochure for her local library’s fundraiser dinner. What critical detail must she ha
Charra [1.4K]

Answer: A. target audience for the brochure.

Before even starting the design of the brochure, Amanda needs to get information on who the target audience are going to be. Amanda will need to conduct a quick research on what the audience of their community likes and does not like. By understanding the target audience, Amanda will be able to get an idea of what design, colors, and format she would make that will attract the attention of their audience.

5 0
3 years ago
Other questions:
  • Which options correctly describe Andrew's job role?
    6·1 answer
  • Which one of these variables has an illegal name?
    11·1 answer
  • A patient presents at an outpatient urgent care facility with an acute illness and is seen by a provider. A detailed history wit
    13·1 answer
  • 3. What are the first steps that you should take if you are unable to get onto the Internet? (1 point)
    15·1 answer
  • Most airlines use very modern hardware and software.<br><br><br> True<br><br> False
    9·1 answer
  • Dr. Kim divides a programming class into groups. Each group will create a large program as their
    15·2 answers
  • Pleeeese help me for these questions
    8·1 answer
  • One of the functions of an IDE is to check for: flowchart errors. Syntax errors. memory errors X input and output.​
    12·2 answers
  • Case Study/Scenario: First, Julio clicks Tools from the Chrome menu on the toolbar. Next, he looks for Manage Add-Ons but can no
    9·1 answer
  • In Subtractive empathy, the counselor responses gives back less (or distorts) than what the client has said. slightly add someth
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!