Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please write the program with c++ language, and provide an output example, print everything in the main not inside the function. solve it in 2

Please write the program with c++ language, and provide an output example, print everything in the main not inside the function. solve it in 2 ways: 1- make the class as local class. 2-make the class as global class.

image text in transcribed

Example: Define a class named "Employee" with four private variables: the name (String), surname (String), ID number (integer), and age (integer) of the employee. Write a constructor for the class that takes two Strings and two integers. Also write a void function named printEmployee that prints the ID, name, and surname of the employee. Define another class named "Company" with three private variables: the name of the company (String), the employees of the company (Employee(l), and the employee count (int). Write a constructor and two functions named addEmployee and find YoungestEmployee. Write a program that reads the information of 8 people (i.e., names, surnames, ID numbers, and ages), finds and prints the information of the youngest and oldest employees

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

6. Explain how to train managers to coach employees.

Answered: 1 week ago