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
Ordan has _ 5 8 can of green paint and _ 3 6 can of blue paint. If the cans are the same size, does Jordan have more green paint
Morgarella [4.7K]

Answer:

Jordan has more green paints

Explanation:

Given

Green = \frac{5}{8}

Blue = \frac{3}{6}

Required

Which paint does he have more?

For better understanding, it's better to convert both measurements to decimal.

For the green paint:

Green = \frac{5}{8}

Green = 0.625

For the blue paint:

Blue = \frac{3}{6}

Blue = 0.5

By comparison:

0.625 > 0.5

<em>This means that Jordan has more green paints</em>

3 0
3 years ago
Write a statement that calls the recursive method backwardsAlphabet() with parameter startingLetter.
Tcecarenko [31]

Recursion refers to the act of calling a function itself. With the use of this strategy, complex problems can be reduced to more manageable, simpler ones. Recursion might be a little challenging to comprehend. The best method to figure out how it works is to experiment with it.

<h3>How to write a programme by recursive method ?</h3>

The process of making a function call itself is known as recursion. With the use of this strategy, complex problems can be reduced to more manageable, simpler ones. Recursion might be a little challenging to comprehend. Experimenting with it is the most effective way to learn how it functions.

public class Recursive Calls {

public static void backwards Alphabet(char currLetter) {

if (currLetter == 'a') {

System.out.println(currLetter);

}

else {

System.out.print(currLetter + " ");

backwards Alphabet(--currLetter);

}

return;

}

public static void main (String [] args) {

char starting Letter = '-';

starting Letter = 'z';

// Your solution goes here

backwards Alphabet(starting Letter);

return;

}

}

To learn more about recursive method refer to :

brainly.com/question/24167967

#SPJ4

6 0
2 years ago
A steady stream (1000 kg/hr) of air flows through a compressor, entering at (300 K, 0.1 MPa) and leaving at (425 K, 1 MPa). The
AleksandrR [38]

Answer:

The work furnished by the compressor is 69.77kJ/s

The minimum work required for the state to change is 55.26kW

Explanation:

The explanation to these solution is on the first, second , third and fourth uploaded image respectively

8 0
3 years ago
Compare electromagnets and solenoids
natta225 [31]

An electromagnet is a made coil associated with a ferromagnetic core. This way, the strength of the magnet is controlled by the input current. A solenoid is a simple shape used in magnetostatics or magnetics. ... A solenoid is a cylindrical coil of wire whose diameter is small compared to its length.

8 0
3 years ago
Select a research proposal topic that relates to electrical and electronics engineering and write a proposal report taking into
fiasKO [112]

Expand your technical knowledge, form global networks and balance life & work commitments. Our advanced diplomas remain current with technological and industry developments.

8 0
3 years ago
Other questions:
  • A Michelson interferometer operating at a 500 nm wavelength has a 3.73-cm-long glass cell in one arm. To begin, the air is pumpe
    9·1 answer
  • Describe the steps, tools, and technology needed in detail and
    12·1 answer
  • In a fluid power system, if energy is not transferred to work, what form does it take?
    6·1 answer
  • Yield and tensile strengths and modulus of elasticity . with increasing temperature. (increase/decrease/independent)
    11·1 answer
  • Opposition to current flow, restricts or resists current flow
    15·1 answer
  • which one of the following appliance parts gets the hardest services? A. Heating elementwhich one of the following appliance par
    10·2 answers
  • 5) /
    12·1 answer
  • Resistors of 150 Ω and 100 Ω are connected in parallel. What is their equivalent resistance?
    13·1 answer
  • The figure below appeared three heat treatments processes of steel (A, B and C),
    14·1 answer
  • When bending metal, the material on the outside of the curve stretches while the material on the inside of the curve compresses.
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!