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
vivado [14]
3 years ago
12

Consider the following implementation of a class Square:

Computers and Technology
1 answer:
DaniilM [7]3 years ago
4 0

Answer:

The answer to this question can be given as:

Code:

class Square   //define class Square

{

Private int sideLength;  //define variable  

Square(int length)   //define parameterized constructor.        

{

sideLength = length;        //hold value of the parameter

}

int getArea()                  //define function getArea.

{

Private int area;            //define variable.

area = sideLength * sideLength;          //calculate area.

return area;            //return value.

}

}

Explanation:

In this question it is not a good idea to introduce an instance variable for the area because It may be a different method that defines the same variable with the same name but different variables because they are related to different functions, so it is better to make this variable local in this case.

You might be interested in
Who would be a member of the American Dental Association?
ycow [4]

Answer:

a pratcing dentist

Explanation:

4 0
3 years ago
Network Architecture and Topology: Mastery Test
trasher [3.6K]

Answer:

You need to understand all the network typologies and the devices that we use in the Computer networks. You also use the techniques like routing, masking, firewalls, VPN, as well as the network protocol. And recently added is the PKI. And hence you need to make sure that you know all these, and you should also know ipv4 and ipv6. Rest you can consult Tanenbaum for further studies on Computer Network.

Explanation:

Please check the answer.

4 0
3 years ago
CHALLENGE ACTIVITY 4.2.2: Basic while loop with user input. Write an expression that executes the loop while the user enters a n
tino4ka555 [31]

Answer:

#include<iostream>

using namespace std;

int main()

{

int userNum;

userNum=9;

while(userNum>=0)

{

  cout<<"Body"<<endl;

  cin>>userNum;

}

cout<<"Done"<<endl;

return 0;

}

Explanation:

  • Use the userNum >= 0 expression that executes the loop while the user enters a number greater than or equal to 0.
  • Print the userNum inside the while loop.
3 0
3 years ago
What is the disadvantage of a mesh topology?
-BARSIC- [3]

Answer:

Topology means arrangement of nodes

Explanation:

In computer science the word topology means the arrangement of nodes and elements in a network. For any topology we do need nodes and cables for maintaining the infrastructure.

In mesh topology the all nodes use to get connected by direct link. While each and every node is directly associated with  one another. In this infrastructure we do need lot cabling where every node will be connected with one another. While usage of good quality cable in network is  also expensive to manage. Although there are lot of benefits of this topology, where the transmission of data would never stop if node is not working the rest will be working to transfer the data among other nodes ,this is more secure because there is no traffic for data to travel via many nodes   to reach the destination. Every node is directly connected and communicate. So, once the node is not working the communication will not be stop but the maintenance and troubleshooting will be difficult in this infrastructure.

It is proved along with lot of benefits and network security ,this infrastructure is having some disadvantages as well. Cabling expense , maintenance cost etc  . usually small scale networks do not prefer mesh topology.  Small scale and low budget companies can  not afford this topology because it is expensive.

Although we do believe that the data security is most important for today's era ,so few companies those wanted to keep their information secure and confidential they must use mesh topology by ignoring the cost incurred for this set up. Data security and integrity would never be compromised by some of the companies.

Mesh topology is more safer, more quick infrastructure which is although very expensive , difficult to mange and maintain. Moreover it is overhead of cabling as well to connect every node but the demand of mesh topology would never be less. It is demanding and appealing topology still.

7 0
3 years ago
Read 2 more answers
one data is in memory the computer interpets and executeinstructions to process the data into informationA. TrueB. False
lidiya [134]

Answer:

Option A is the correct answer for the above question.

Explanation:

  • The computer is a system that processes the data to produce information. For any computer system when the data is processed then it will form the information.
  • The user gives some instruction to process that can also be called the program. Then the computer takes the instruction and processes the data on behalf of the instruction and for the information because in any system when data is processed it can form the information.
  • The above question says that the computer follows the instruction to process the data to produce the information which is correct as described above. Hence True is the correct answer to the above question.
4 0
3 years ago
Other questions:
  • What is credibility in the often-used framework of quality criteria?
    9·1 answer
  • 50 pts DO NOT ANSWER FOR POINTS
    9·1 answer
  • On which of the following pointing devices can you control the pointer by sliding your fingertip?
    11·1 answer
  • What is one of the first power tools you’ll need as electrician
    15·1 answer
  • If you do not specify any criteria in a delete query, Access will delete all the records in the table. Truth or False
    11·1 answer
  • HELP ME PLEASEEEE
    8·1 answer
  • How to create a network of relevant prospects?
    5·1 answer
  • Find the max and min of a set of values using recursion Find the max and min of a set of values using recursion. First input the
    5·1 answer
  • With SQL, how do you select all the columns from a table named "Persons"?
    8·1 answer
  • A social service agency hires accenture to improve training and experiences for caseworkers. What is one way accenture can use v
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!