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
SpyIntel [72]
2 years ago
10

Write a Person class with a constructor that accepts the following details:

Engineering
1 answer:
Liono4ka [1.6K]2 years ago
3 0

The person class is an illustration of constructors;

In computer programs, constructors are automatically called when the object of a class is created

<h3>The program in C++</h3>

The class and the constructor program written in C++ programming language is as follows:

int main(){

   string fname, lname,dob,idno,mobileno;

   cin>>lname; cin>>fname; cin>>dob;  cin>>idno; cin>>mobileno;

Person c(fname,lname,dob,idno,mobileno);

if(mobileno.length() == 12){

    if(mobileno[3] == '-' && mobileno[7] == '-'){

        cout << "Name: " << c.getfname() << " " << c.getlname() << endl

 << "Date of birth: " << c.getdob() << endl

 << "ID number: " << c.getid() << endl

 << "Mobile: " << c.getmobile() << endl

 << "Age: "<< getAge(dob)<<endl;

 ;

    }

}

The complete program is added as an attachment

Read more about C++ programs at:

brainly.com/question/13168905

#SPJ1

Download cpp
You might be interested in
All machines have three fundamental hazards: moving parts, point of operation, and?
OlgaM077 [116]

Answer:

All machines have three fundamental hazards: moving parts, point of operation, and the power transmission.

Explanation:

The unit that supplies power to the machine is a critical hazard due to high energy sources being potential fatal if proper protocols are not followed. This is why lockout tagout (LOTO) measures are put in place in order to protect people while they work on equipment.

3 0
2 years ago
Technician A says white smoke in the exhaust of a diesel engine can be the result of a cylinder misfire in a warm engine. Techni
Arturiano [62]

Answer:

Both

Explanation:

Because of water, fuel does not burn completely. This brings about water fumes that are white in color and looks like white smoke. If engine is cold and water is heating, it leads to steam formation like water vapor. The white times are because of not firing properly in the heated engine. Technician A is right.

Blue fine is caused by this scoring. It is also caused by dirty oil. Technician b is right too

7 0
3 years ago
16. Which polymers are recyclable?
MrRissso [65]

Answer:

Number 2 is HDPE, or High-Density Polyethylene. It is most commonly found in plastic bags, oil and detergent bottles, and toys. It is one of the simplest polymers to recycle. It is broken down into flakes, decontaminated and then reused for pipes, flower pots or reused as (non-food) bottles.

8 0
3 years ago
A levee will be constructed to provide some flood protection for a residential area. The residences are willing to accept a one-
777dan777 [17]

Answer:

1709.07 ft^3/s

Explanation:

Annual peak streamflow = Log10(Q [ft^3/s] )

mean = 1.835

standard deviation = 0.65

Probability of levee been overtopped in the next 15 years = 1/5

<u>Determine the design flow ins ft^3/s </u>

P₁₅ = 1 - ( q )^15 = 1 - ( 1 - 1/T )^15 = 0.2

                         ∴  T = 67.72 years

Q₁₅ = 1 - 0.2 = 0.8

Applying Lognormal distribution : Zt = mean + ( K₂ * std ) --- ( 1 )

K₂ = 2.054 + ( 67.72 - 50 ) / ( 100 - 50 ) * ( 2.326 - 2.054 )

    = 2.1504

back to equation 1

Zt = 1.835 + ( 2.1504 * 0.65 )  = 3.23276

hence:

Log₁₀ ( Qt(ft^3/s) ) = Zt  = 3.23276

hence ; Qt = 10^3.23276

                  = 1709.07 ft^3/s

4 0
3 years ago
why would it be inappropriate to dimension to a feature on a surface that is not perpendicular to the line of sight?
bazaltina [42]
If you are drawing and dimensioning with a computer program the dimension will be inaccurate... If it is mechanical drawing then the fabricator would not have enough information to accurately measure the component. ie a circle turned a few degrees away from perp. would appear to be an ellipse. and may actually dimension that way
4 0
3 years ago
Other questions:
  • The direction of rotation of a dc series motor or a universal motor connected to a dc power source A) depends on the polarities
    15·1 answer
  • Tech A says that a faulty vacuum booster can affect engine operation. Tech b says that steal brake Ponce can be replaced with a
    6·1 answer
  • The assembly consists of two blocks A and B, which have a mass of 20 kg and 30 kg, respectively. Determine the distance B must d
    14·2 answers
  • Saturated water at 25C enters a tank through a 10-cm diameter pipe at a velocity of 3 m/s. At the bottom of the tank, water exi
    5·1 answer
  • Q.17) A 50-acre catchment containing cropland is converted ot a Qatar mail
    13·1 answer
  • VICTV
    11·2 answers
  • Which is one factor that scientists use to classify orders of soil?Which phrase best describes the biosphere?
    9·1 answer
  • You are developing a mind map for measuring the viscosity of fluid. At which stage in the process will you specify the equipment
    10·1 answer
  • What parts of a ship have plastic? And what type of plastic?
    8·1 answer
  • Multiple Choice
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!