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
lukranit [14]
3 years ago
6

Define the instance method inc_num_kids() for PersonInfo. inc_num_kids increments the member data num_kids. Sample output for th

e given program with one call to inc_num_kids(): Kids: 0 New baby, kids now: 1
Computers and Technology
1 answer:
zhenek [66]3 years ago
6 0

Answer:

Concept: Advanced Programming

  1. Note: The notation += simply adds one to the previous variable.
  2. See attached solution
  3. Give brainlist!

You might be interested in
What is MARC? Discuss structure of MARC
nordsb [41]
What do you mean? I don't understand.
7 0
3 years ago
Given parameters b and h which stand for the base and the height of an isosceles triangle (i.e., a triangle that has two equal s
schepotkina [342]

Answer:

The area of the triangle is calculated as thus:

Area = 0.5 * b * h

To calculate the perimeter of the triangle, the measurement of the slant height has to be derived;

Let s represent the slant height;

Dividing the triangle into 2 gives a right angled triangle;

The slant height, s is calculated using Pythagoras theorem as thus

s = \sqrt{b^2 + h^2}

The perimeter of the triangle is then calculated as thus;

Perimeter = s + s + b

Perimeter = \sqrt{b^2 + h^2} + \sqrt{b^2 + h^2} +b

Perimeter = 2\sqrt{b^2 + h^2} + b

For the volume of the cone,

when the triangle is spin, the base of the triangle forms the diameter of the cone;

Volume = \frac{1}{3} \pi * r^2 * h

Where r = \frac{1}{2} * diameter

So, r = \frac{1}{2}b

So, Volume = \frac{1}{3} \pi * (\frac{b}{2})^2 * h

Base on the above illustrations, the program is as follows;

#include<iostream>

#include<cmath>

using namespace std;

void CalcArea(double b, double h)

{

//Calculate Area

double Area = 0.5 * b * h;

//Print Area

cout<<"Area = "<<Area<<endl;

}

void CalcPerimeter(double b, double h)

{

//Calculate Perimeter

double Perimeter = 2 * sqrt(pow(h,2)+pow((0.5 * b),2)) + b;

//Print Perimeter

cout<<"Perimeter = "<<Perimeter<<endl;

}

void CalcVolume(double b, double h)

{

//Calculate Volume

double Volume = (1.0/3.0) * (22.0/7.0) * pow((0.5 * b),2) * h;

//Print Volume

cout<<"Volume = "<<Volume<<endl;

}

int main()

{

double b, h;

//Prompt User for input

cout<<"Base: ";

cin>>b;

cout<<"Height: ";

cin>>h;

//Call CalcVolume function

CalcVolume(b,h);

//Call CalcArea function

CalcArea(b,h);

//Call CalcPerimeter function

CalcPerimeter(b,h);

 

return 0;

}

3 0
3 years ago
What three values must be added to the ipv4 properties of a nic in order for a computer to have basic connectivity with the netw
Y_Kistochka [10]
1. The IP address

2. Subnet mask

3. Default gateway address

It’s values should be added to the NIC properties in order for the computer to have basic network connectivity. This can be done either statically or dynamically with DHCP. An additional value that should be present if the computer is to be used to connect to the Internet is the DNS server value. A computer automatically attempts to locate a DHCP server if configured to do so. A DHCP server address is not used. Finally, NAT is configured on a router, not on a computer host, and speed and duplex settings are NIC hardware settings and not IPv4 properties of the NIC.
8 0
2 years ago
Why did artists use pinhole cameras during the renaissance?
Dima020 [189]
Pinhole cameras were one of the most sophisticated devices of the period, it made tasks much easier it basically worked exactly like the human eye and is something just like tracing.
8 0
3 years ago
Implement the function calcWordFrequencies() that uses a single prompt tonread a list of words (separated by spaces). Then, the
Morgarella [4.7K]
The function it puts those consoles
4 0
3 years ago
Other questions:
  • You just read a restaurant review on the internet of the newest restaurant in town. The writer of the article said the food was
    15·1 answer
  • A ___________ organizes related commands together, under a tab.
    15·1 answer
  • Can someone help me, please
    7·1 answer
  • Which of the following is a strategy used to enhance communication in a presentation?
    14·1 answer
  • How can the function abcfunc change the address in its local copy of intpoint?
    11·1 answer
  • What does t'challa actions reveal about his character( black panther movie)​
    6·1 answer
  • Which is a good way to improve your credit score
    5·1 answer
  • In the context of computer and network security, a security system is said to possess _____ when it does not allow data to be co
    13·1 answer
  • What is the main difference between a peripheral device and other types of devices? Choose the best answer.
    12·1 answer
  • Why does a computer need memory​
    15·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!