Write a Person class with a constructor that accepts the following details:
1. First name
2. Middle name
3. Last name
4. Date of birth (entered in this pattern 22-02-2000)
5. Gender (male, female)
6. Identity number (private attribute)
7. Mobile number (if any)
Provide a method getAge that calculates the persons' age from his date of birth.
If the user provided his mobile number you have to check if it is a valid number with the pattern 999-
999-9999 if not, show him an error message and do not save the number Provide a method getAge that calculates the persons' age from his date of birth.
If the user provided his mobile number you have to check if it is a valid number with the pattern 999-
999-9999 if not, show him an error message and do not save the numberWrite two classes called Student and College that represents a student and a college in a university. College class: - The constructor of the College class should accept the name of the college and the capacity, and you have to generate a shortcut of the name by taking the first character of each word in the name (e.g., Information Technology becomes IT). - Provide a method called updateTotalStudents that increments the total number of students at this college. You have to check if the total number is in the range of the capacity, if not you have to present a suitable message for the student and let him/her choose another college. You can set the capacity as 3 students for testing purposes. - Provide a method called getInfo that prints the information about specific college in a wellorganized appearance.​

Answers

Answer 1

The person class is an illustration of constructors;

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

The program in C++

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:

https://brainly.com/question/13168905

#SPJ1


Related Questions

A binomial probability experiment is conducted with the given parameters. n=12, p=0.45, x<4 compute the probability of x success in the n independent trials of the experiment
a binomial probability experiment is conducted with the given parameters compute the probability of X successes in the n independent trials with experiment

Answers

Answer:0.1088 or 10.88%

Step-by-step

q = 1 - 0.35 = 0.65

P(X=2) = 12C2 × (0.35)² × (0.65)¹⁰

= 0.1088

Explanation:

what is an example of continuous delivery?

Answers

Answe:updating software automatically on a mobile phone

Explanation:updating software automatically on a mobile phone let the developers can tackle different situations before delivering anything to the customer

Safety nets must absorb the force of a 400 this is referred to as.

Answers

Force of a “400” what? Let’s assume it is pounds. If a 400 pound of something drops onto the safety net, it is referred as a “Drop Test”.

Answer: Drop Test

Write a code about Sum of Natural Numbers using loop in c++

Answers

Answer:

Sum of Natural Numbers using loop #include <iostream> using namespace std; int main() { int n, sum = 0; cout << "Enter a positive integer: "; cin >> n; for (int i = 1; i <= n; ++i) { sum += i; } cout << "Sum = " << sum; return 0; } Output. Enter a positive integer: 50 Sum = 1275

Explanation:

A 90° elbow in a horizontal pipe is used to direct water flow upward at a rate of 45 kg/s. Another identical elbow is attached to the existing elbow such that the water flow makes a U-turn as shown in the second figure. The diameter of the entire elbow is 10 cm. The elbow discharges water into the atmosphere, and thus the pressure at the exit is the local atmospheric pressure. The elevation difference between the centers of the exit and the inlet of the elbow is 50 cm. The weight of the elbow and the water in it is considered to be negligible. Take the momentum-flux correction factor to be 1.03 at both the inlet and the outlet. Take the density of water to be 1000 kg/m3.

Answers

When a liquid flows in a horizontal pipe, the force component in horizontal direction is 650 N.

What is force?

The force which acts on the liquid depends upon the density of fluid, it volume and acceleration due to gravity.

Given, mass flow rate m = 45 kg/s, D1 =D2 =10cm, density ρ =1000 kg/m³ and momentum flux correction factor is K =1.03.

Using the Bernoulli's theorem, we have

P1/ρg +V1²/2g +z1 =P2/ρg +V2²/2g +z2

P1/ ρg =z2 - z1  = 0.5 m

P1 = 4.905kPa

The force in horizontal direction is

Fx = P1A1 +ρQ(V1 - V2cosθ) x K

here θ =180°

ρAV1 =m =45

1000 x π/4x (0.1)² x V1 =45

V1 = 5.732 m/s

Fx =(4.905 x π/4 x 0.1²) x 10³ + 42 x 5.732 x 2

Fx = 650N

Thus, the force component in horizontal direction is 650N.

Learn more about Force.

https://brainly.com/question/13191643

#SPJ1

On the suction side of a pump, a Bourdon pressure gage reads 40 kPa vacuum. What is the corresponding absolute pressure if the local atmospheric pressure is 100 kPa (abs)

Answers

The corresponding absolute pressure if the local atmospheric pressure is 100 kPa (abs) is 60 PKA.

What is an atmospheric strain?

An atmospheric (atm) is a unit of size identical to the common air stress at sea stage at a temperature of 15 levels Celsius (fifty-nine levels Fahrenheit). One ecosystem is 1,013 millibars or 760 millimeters (29. ninety-two inches) of mercury. Atmospheric stress drops as altitude increases.

Atmospheric pressure absolute - absolute pressure = vacuum pressure.Atm p - abs p = vacc p.100 - abs= 40 .60 pkA.

Read more about the vacuum pressure :

https://brainly.com/question/1020696

#SPJ1

Arnold has a contract to design hospital which factors should he incorporate into the design of the building?

Answers

Answer:

first one is (a) next one is (b)

Explanation:

Linkage-style clutch control systems use a system of _______ between the clutch pedal and the clutch fork.

Answers

Linkage-style clutch control systems use a system of levers, cables, and rods between the clutch pedal and the clutch fork.

What is a clutch?

A clutch can be defined as a mechanical device that is designed and developed to play the role of engaging and disengaging power transmission in the input shaft, so that the speed of input shaft can be changed as necessary.

In Mechanical engineering, linkage-style clutch control systems can use a system of levers, cables, and rods between the clutch pedal and the clutch fork.

Read more on clutch here: https://brainly.com/question/13262716

#SPJ1

I need a description of a train station. Urgent. Thanks a lot

Answers

Answer:

The entire place was dark and cold as the train whooshed by. This place was nothing like Platform 9 and 3/4. The rain was loud on the roof of the station, but you could still hear the faint noises of a violin. "20 pence for requests" read a sign from a man who's just trying to get by.

Explanation:

hope this helps:)

The ________ is considered the normal operating control of an air conditioner, according to the Standards of Practice. thermostat electrical breaker at the panel compressor override switch pressure valve of the refrigerant

Answers

Answer:

Thermostat

Explanation:

The thermostat is considered the normal operating control of an air conditioner, according to the Standards of Practice.

Which type of astm c150 standard portland cement is best suited for a concrete where minimal total heat evolution and minimal rate of heat evolution is a requirement, so that polymeric conduit running through the concrete is at low risk of enduring thermal expansion stresses or - worse - softening or creeping as the surrounding concrete hardens? group of answer choices

Answers

IV is the answer to your question…

An overload is the same as a short or ground fault

Answers

One of the major difference between the short circuit and the overload is that the short circuit occurs because of the fault between the lines or line-to-earth whereas the overload means the equipment draw the excess of current from the supply

The pattern of the new wallpaper in Kathleen’s bedroom is made of regular heptagons. Each heptagon can be decomposed into congruent triangles. What is the area of fabric in one heptagon?

Answers

Answer:

the given statement is true.

Explanation:

How long do graduate degrees typically take (per degree)?


1-2 years


3-6 years


5-7 years


7-10 years

Answers

The time taken typically for completing  gradate degree is 3-6 years.

What is a graduate degree?

The graduate degree is the advanced level of academics after 12th standard. It depots advanced academic degree that is beneficial for students to brush-up their learnings of under graduation.

The time taken may vary degree to degree but it limits from 3 years until 6 years.

Learn more about graduate degree, here:

https://brainly.com/question/17181100

#SPJ1

In addition to science courses like physics and chemistry, what other types of courses are becoming increasingly relevant to space science careers?


history


computer science


religious studies


civil engineering

Answers

Computer science and Civil engineering


What is Space science?

Space science is the study of the area beyond the earth’s atmosphere. Computer science cuts across most disciplines as computers is useful almost all areas. Civil engineering is a broad engineering discipline studying necessities of continuous human existence. The study is not directly involved to space science but gives fundamental knowledge that will be useful to space scientists The knowledge of civil engineering will help in determining the possibility of human survival in space

The figure shows the region of integration for the integral.

Rewrite this integral as an equivalent iterated integral in the five other orders. Assume y(x) = 5 − x and z(x) = 25 − x2.

Answers

Answer:

first one is (a) next one is (b)

Explanation:

Discuss the microstrucral transformation of eutectic reaction, hypo-eutecticand hyper eutectic. Including temperature, reactions and microstrucral development/phases(draw diagrams)​

Answers

Answer:

how will i draw diagram

Explanation:

Answer:

At eutectic there are 3phases present.

Explanation:

The __________ is normally inspected when high-side pressures are too high and the system is not cooling well.

Answers

The condenser is normally inspected when the high-side pressures are too high in a refrigerator etc.

What is a Condenser?

This is defined as a device which reduces a gas or vapour to a liquid and is normally inspected when the high-side pressures are too high.

When this occurs , it therefore means the system is not cooling well which could damage other parts.

Read more about Condenser here https://brainly.com/question/15049508

#SPJ1

4 Select the correct answer. A brand selling home appliances conducts a customer survey. The following table indicates the results of the survey. What percent of people are satisfied with the company and are likely to be loyal to the brand? OA 9% B. 12% О с. 14% OD. 45% О Е. 60%​

Answers

E- would be your correct answer
It is the answer E like the person said above!

contrast moral and immoral creativity and innovation

Answers

Moral creativity and innovation are based on original discoveries,  whereas immoral innovation is based on unscrupulous actions.

What is innovation?

Innovation refers to the practices aimed at developing new products and services for the well-being of society.

Moral innovation is an expression generally used to describe technological advancements based on intellectual property rights.

In conclusion, moral creativity and innovation are based on original discoveries,  whereas immoral innovation is based on unscrupulous actions.

Learn more about innovation here:

https://brainly.com/question/19969274

#SPJ1

Consider the function f(n) = n

2 + 1000n, and do the following:

a) Prove that f(n) = O(n

3

) by finding a c0 and n0 such that f(n) ≤ c0 · n

3

for n > n0.

b) Prove that f(n) = O(n

2

) by finding a c1 and n1 such that f(n) ≤ c1 · n

2

for n > n1.

c) Prove that f(n) = Ω(n

2

) by finding a c2 and n2 such that f(n) ≥ c2 · n

2

for n > n2.

d) Prove that f(n) = Θ(n

2

) by finding a c3, c



3

, and n3 such that c3 · n

2 ≤ f(n) ≤ c



3

· n

2

for n > n3

Answers

get off this

Explanation:

Drawdown at a 0. 20-m diameter well, which has been pumping at a rate of 1,000 m3/day for a long enough time that steady-state conditions have been reached, is determined to be 0. 70 m. The aquifer is 10. 0 m thick. An observation well located 10 m away has been drawn down by 0. 20 m. Determine the hydraulic conductivity of the aquifer

Answers

Answer:the aquifer’s hydraulic conductivity  is K = 10.039 m/day

transmissivity T = 331.287 m/day

the drawdown 100 m away from the well is s = 1.452 m

Explanation:Given that :

The  constant pumps rate Q = 2000 m³/day

R₁ =160 m     →    H₁  = 249 m

R₂ = 453 m    →    H₂ = 250 m

The  confined aquifer B is 33 m thick

The hydraulic conductivity K =

K =

K =

K = 10.039 m/day

Transmissivity T = K × B

T = 10.039×33

T = 331.287 m/day

TO find the drawdown 100 m away from the well; we have:

K =

H₃ = 248.548 m

Drawdown (s) = H₂ - H₃

s = (250 -  248.548)m

s = 1.452 m

Engine measurement is being discussed. technician a says the bore is the distance the piston moves within the cylinder. technician b says the stroke is the diameter of the cylinder. who is correct?

Answers

Answer:

Bore is the diameter of the cylinder.

Explanation:

Stroke is the distance the piston moves up and down in the cylinder.

i wouldn't listen to technician A anymore.

elements of parallel computing

Answers

[tex]\huge{\orange}\fcolorbox{purple}{cyan}{\bf{\underline{\green{\color{pink}Answer}}}} [/tex]

Elements of parallel computing:

Computer systems organization. Computing methodologies. General and reference. Networks. Software and its engineering.Theory of computation.

Casein, a dairy product used in making cheese, contains 25% moisture when wet. A dairy sells this product for $40/100 kg. If requested, they will dry the casein to 12% moisture. The drying costs are $5/100 kg of water removed. Assume that that the dairy has 1000 kg of the original product (wet casein) that will be dried to 12% moisture and then sold. How much dried casein is produced (in kg)?

The answer is 852 (with margin 1). Why is it?

Answers

Based on the percent moisture content of the dried product, the mass of dried casein produced os 852.3 kg.

What is the mass of casein in wet casein?

The mass of casein in 1000 Kg of wet casein is 75% 1000 kg = 750 Kg

Mass of water 250 kg

The mass of casein is constant while the moisture content can be changed.

At 12% moisture content;

750 kg = 88%%

100 % = 100 ×750/88 = 852.27 kg

Therefore, the mass of dried casein produced os 852.3 kg.

Learn more about mass at: https://brainly.com/question/24658038

#SPJ1

What is the minimum level of isolation required on T2 such that T2 never sees a value of zero in its output

Answers

Answer:

The speed is minimum at  t = 4 seconds.

The position function of a particle is given by

                     

The velocity is given as,

       

Speed is computed as,

 

Differentiate above expression and equate to zero.

Thus, speed is minimum at  t = 4 seconds.

Learn more:

brainly.com/question/954654

Explanation:

Discuss the microstrucral transformation of eutectic reaction, hypo-eutecticand hyper eutectic. Including temperature, reactions and microstrucral development/phases(draw diagrams)​

Answers

Answer:

where do i draw

Explanation:

A shaft encoder is mounted on a 50 mm radius tracking wheel to monitor linear displacement. If the encoder produces 400 pulses per revolution. What is the linear displacement in mm per pulse?

Answers

The linear displacement in mm per pulse is gotten as; 254.64 mm per pulse

How to Calculate Linear Displacement?

Circumference of a circle is;

C = 2πr

We have;

Radius; r = 50 mm = 0.05 m

Thus;

C = 2π * 0.05

C = 0.3142 m

Angular displacement = 0.2/0.3412

Angular displacement = 0.6366

Formula for linear displacement is;

Linear Displacement = angular displacement * number of pulses per revolution

Linear Displacement = 0.6366 × 400

Linear displacement = 254.64 mm per pulse

Read more about Linear Displacement at; https://brainly.com/question/14918934

#SPJ1

If you are exposed to potentially infectious material via a sharps injury, what should you do immediately?
select the best option.

get the blood tested before washing it away.


report the injury.


wash the area with soap and water.


blot the area with a dry tissue.

Answers

Answer:

Soap and water

Explanation:

   then report the injury....

An 8cm water jet with a velocity of 25m/s impinges on a single vane in same direction at a velocity of 20m/s. If β2 = 160o and friction losses over the vane are such that v2 = 0.8v1, calculate the force exerted by water on the vane, and its direction.

Answers

a. An 8cm water jet with a velocity of 25m/s impinges on a single vane in same direction at a velocity of 20m/s. If B2 = 1600 and friction losses over the vane are such that v2 = 0.8v1, calculate the force exerted by water on the vane, and its direction. (14 Marks) b. A closed vertical cylinder 400mm in diameter and 500mm high is filled with oil of relative density 0.9 to a depth of 340 mm, the remaining volume containing air at atmospheric pressure. The cylinder is rotated around its vertical axis at such a speed that oil just begins to uncover the base. Calculate the speed of rotation for this condition. (8 Marks) c. A point A on the free surface of a free vortex is at radius 250 mm and height 180mm above datum. If a free surface at a distance from the axis of the vortex, which is sufficient for its effects to be negligible, is 220mm above datum, calculate the height above datum of a point B on the free surface

Other Questions
Theperiod of a country is the period in which its new colonies try to grow.settlementindustrialcolonial Louis needs to secure his tent.He will use a rope to go down the edge of the tent, straight out to a post and back to the starting think fastener,as shown Sean scores a goal 60% of the time when he kicks the ball on goal. How many goals should he get during a game when he kicks on goal 10 times? 1. write the formula for the following ionic compound: Calcium Carbonate 6. Clark wants to transform a shape on thecoordinate plane by using a rigid transformation.Of the choices below, list any that Clark can use.I.DilationII. RotationIII. TranslationIV. Reflection What is the slope of the line passing through (9,-6) and (5, 10)? Which of the following statementswould have been made by those whowere opposed to FDR's New Dealpolicies in the 1930s?A. The New Deal was not involved in any socialprograms.B. The New Deal promoted the idea of ruggedindividualism.C. The New Deal was a form of socialism and do exercise from picture deliberate forgetting noxious experience Cmo se llama el padre de Makenna?A. JavierB. David 5. How do you determine the strength of the electric field of a charge?A. Putting a small test charge close to the electric field.B. Using a voltmeter.C. Using an ammeter.D. Putting a large test charge close to the electric field. Hi Each Question Is 10 points I Will Mark You As Branliest Please thank you Read the following excerpt from "The Passage" and answer the question that follows. "Monty," I said, and finally a balled-up blanket landed near me. When I stood my ears roared like a plan was right above me and I thought, Oh Jesus, I popped an eardrum, until I realized it wasn't in my head at all. Monty was also looking up, but nothing was in the sky except the moon and some early stars. What effect does the ending of "The Passage" have on the reader? The ending explains Andi's unique gift and the way it benefits the other characters, leaving the reader with a sense of calm and happiness. The ending breaks from the normal world created in the rest of the story, leaving the reader shocked and surprised. The event leaves the reader with a sense of resolution and closure, as it explains how Monty's father is freed. The reader sees the action coming and so is left with a sense of predictability and clarity. How many people have made it to the top of mount everest. Insurance that covers damage to your car from an accident is called:. A mass attached to a spring is pulled toward the floor so that its height above the floor is 10 mm (millimeters). The mass is then released and starts moving up and down reaching maximum and minimum heights of 20 and 10 mm , respectively, with a cycle of 0.8 seconds.a) Assume that the height h(t) of the mass is a sinusoidal function, where t is the time in seconds, sketch a graph of h from t = 0 to t = 0.8 seconds. t = 0 is the time at which the mass is released.b) Find a sinusoidal function for the height h(t).c) For how many seconds is the height of the mass above 17 mm over one cycle?(would anyone like to talk not to be weird or anything lol) 25 POINTS Which is the most important question to consider when analyzing a source?A) How long is this document?B) How is this source like others I have read?C) If this is true, what else is true?D) Why was this document created? PLSS HELP ASAPPP PLS What would be the sinuosity of this river: Sinuosity = 28 cm curved length and a 20 cm straight length. find the measure of the arcs around circle. For fifty points Consider the events that led up to the Tulsa Race Riots. Explain how a situation can become explosive. What specific elements made the situation worse? Describe a modern incident that was intensified in similar ways.