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
n200080 [17]
2 years ago
5

Declaring a member as ____ in the base class provides access to that member in the derived classes but not to anyone else. a. pu

blic b. protected c. private d. constant
Computers and Technology
1 answer:
Sidana [21]2 years ago
6 0

When a member is declared as b. <u>protected</u> in the base class, it provides access to that member in the derived classes but not to anyone else.

<h3>What is a derived class?</h3>

A derived class can be defined as a type of class that inherits the information or members of a base (parent) class such as a car in a syntax.

Basically, a public class is accessible to everybody while a private class can only be accessed by users within the declared class. Also, a constant is a class whose value remains unchanged.

In Computer programming, when a member is declared as <u>protected</u> in the base class, it ultimately provides access to that member only in the derived classes but not to other members or anyone else.

Read more on data types here: brainly.com/question/20264183

#SPJ1

You might be interested in
What has been your background with using Windows-based computers?
Radda [10]

Answer:

Anything i desire.

Explanation:

4 0
3 years ago
Read 2 more answers
Can anyone find any words in here?
kogti [31]

Answer:

Pit, all, heck, ton, act

Explanation:

3 0
4 years ago
Read 2 more answers
Write a program that reads the lengths of the sides of a triangle from the user. Compute the area of the triangle using Heron's
slamgirl [31]

Answer:

The java program is as follows.

import java.util.Scanner;

import java.lang.*;

public class Area

{

   //variables to hold the values

   static double a, b, c;

   static double s;

   static double area;

public static void main(String[] args) {

    //scanner class object created

    Scanner sc = new Scanner(System.in);

 System.out.print("Enter the first side: ");

 a=sc.nextInt();

 System.out.print("Enter the second side: ");

 b=sc.nextInt();

 System.out.print("Enter the third side: ");

 c=sc.nextInt();

 s=(a+b+c)/2;

 //function of Math class used

 area = Math.sqrt( s*(s-a)*(s-b)*(s-c) );

 //result displayed with 3 decimal places

 System.out.printf("The area of the triangle is %.3f", area);  

}

}

OUTPUT

Enter the first side: 1

Enter the second side: 1

Enter the third side: 1

The area of the triangle is 0.433

Explanation:

1. The variables to declare the three sides of the triangle, the semi-perimeter and the area of the triangle are declared with double datatype. All the variables are declared at class level and hence, declared with keyword, static.  

2. Inside main(), an object of the Scanner class is created.

Scanner sc = new Scanner(System.in);

3. Using the Scanner class object, user input is taken for all the three sides of the triangle.

4. Following this, the semi-perimeter is computed as shown.

s=(a+b+c)/2;

5. The area of the triangle is computed using the given formula which is implemented as shown.

area = Math.sqrt( s*(s-a)*(s-b)*(s-c) );

6. The sqrt() method of the Math class is used while computing the area of the triangle.

7. The area is displayed with three decimals. This is done using the printf() method as shown.

System.out.printf("The area of the triangle is %.3f", area);

8. The program is saved with the same name as the name of the class having the main() method.

9. The class having the main() method is always public.

3 0
3 years ago
Suppose your parents are planning to take you
Verdich [7]

Answer:

I think the answer would be a smartphone, hope this helps! Comment if I am wrong

4 0
3 years ago
What are some benefits of 3-D printing?
Helga [31]

Faster Production.

Easily Accessible.

Better Quality.

Tangible Design and Product Testing.

Cost-effectiveness.

Creative Designs and Customization Freedom.

6 0
3 years ago
Other questions:
  • Who are the people responsible for maintaining and controlling computer networks within an organization?
    10·1 answer
  • You need to synchronize your mobile device data with your desktop computer. for security reasons, your organization prohibits sy
    5·1 answer
  • Having friends who cause you stress can decrease your happiness, which can in turn
    13·2 answers
  • my I phone is in recovery mode and when I connect to my PC the I device is not connected to iTunes although i have the latest ve
    7·2 answers
  • What do you use the Pygame library for?
    6·1 answer
  • What font family is Times New Roman an what font family is Arial?
    9·2 answers
  • Can you please help me?
    6·1 answer
  • In the following nested loop structure, which loop does the program EXIT first?
    6·1 answer
  • What is the chip that allows the screen to work
    14·2 answers
  • What is the main coding language for netflix?
    14·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!