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
If there are 8 opcodes and 10 registers, a. What is the minimum number of bits required to represent the OPCODE? b. What is the
Nimfa-mama [501]

Answer:  

For 32 bits Instruction Format:

OPCODE   DR               SR1                   SR2      Unused bits

a) Minimum number of bits required to represent the OPCODE = 3 bits

There are 8 opcodes. Patterns required for these opcodes must be unique. For this purpose, take log base 2 of 8 and then ceil the result.

Ceil (log2 (8)) = 3

b) Minimum number of bits For Destination Register(DR) = 4 bits

There are 10 registers. For unique register values take log base 2 of 10 and then ceil the value.  4 bits are required for each register. Hence, DR, SR1 and SR2 all require 12 bits in all.  

Ceil (log2 (10)) = 4

c) Maximum number of UNUSED bits in Instruction encoding = 17 bits

Total number of bits used = bits used for registers + bits used for OPCODE  

     = 12 + 3 = 15  

Total  number of bits for instruction format = 32  

Maximum  No. of Unused bits = 32 – 15 = 17 bits  

OPCODE                DR              SR1             SR2              Unused bits

  3 bits              4 bits          4 bits           4 bits                17 bits

7 0
3 years ago
Ethics issues are significant in the area of online privacy because laws have not kept pace with the growth of the Internet and
raketka [301]

Answer:

The answer is "True"

Explanation:

In the given statement some information is missing that is "True or false"

Internet security is the scope of the privacy and security of the electronic exchange of data. It's a common term that refers to something like many factors, technologies, and technology used to protect records, contact, and interests, confidential and private.

  • The security of the Internet is recognized as the privacy of the User.
  • It is secure and unique passphrases or two-factor authentication.
7 0
3 years ago
JAVA- If you have an int as the actual parameters, will it change to fit the parameters if it requires a double, or will the cod
ivann1987 [24]

If you have only 1 method that is not overloaded, then you will not be able to call it with inappropriate parameter types, that is, if the initial type of the parameter is int, then it will not be able to get the double, float, and other values, because of this an error will occur.

For this, method overloading is created.

Method overloading is when you create methods with the same name, but only the content and parameters of the methods are/can-be completely different.

6 0
3 years ago
Elliott is trying to normalize a database that he has designed. Which is not one of the elements of 1NF or 2NF?
muminat

Answer: I think it’s D

Explanation: the rest apply to the the rules of 1NF and 2NF

5 0
2 years ago
Lianna is an Information Technology professional. She usually spends her days creating custom programs for her company by writin
marusya05 [52]
Liam a would need to contact the software developer. So the answer is B
6 0
3 years ago
Other questions:
  • It is important that researchers design rigorous study methods to eliminate: a. inferences. b. the need for a CONSORT flow chart
    10·1 answer
  • A top-notch IT company is seeking an experienced leader to direct a team of experts in the development, creation, and modificati
    14·2 answers
  • A U.S. social security number consists of a string of 9 digits, such as "444422333". Declare a char array named ssn suitable for
    5·1 answer
  • Controlled intersections use some form of which of the following:
    7·1 answer
  • A certain database has numerous tables, but they do not share any fields in common. this database will not be as powerful as oth
    15·2 answers
  • Which type of graph or chart will you use to show changes in data points?
    5·1 answer
  • Can you help me, please
    10·1 answer
  • PLS HURRY<br> Look at the image below
    8·1 answer
  • 7.2.4 Area of Triangle HELP PLEASE!! (JAVA SCRIPT) I WILL WAIT FOR THE SOLUTION.
    12·1 answer
  • you manage a network that has multiple internal subnets. you connect a workstation to the 192.168.1.0/24 subnet. this workstatio
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!