PRACTICAL 4 Q1: Define a class named Person that contains the data fields for the first name and last name. Define anoth

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

PRACTICAL 4 Q1: Define a class named Person that contains the data fields for the first name and last name. Define anoth

Post by answerhappygod »

Practical 4 Q1 Define A Class Named Person That Contains The Data Fields For The First Name And Last Name Define Anoth 1
Practical 4 Q1 Define A Class Named Person That Contains The Data Fields For The First Name And Last Name Define Anoth 1 (36.15 KiB) Viewed 25 times
PRACTICAL 4 Q1: Define a class named Person that contains the data fields for the first name and last name. Define another class named Movie that stores a title, and year of production. Include non-default constructors to both Person and Movie. Write a single function that displays information about Person and Movie. Write a short main() demonstration program to test your classes and function. Save the file as Cinema2.cpp Q2: Complete the following tasks: a) Design a Job class with three data fields-Job number, time in hours to complete the Job, and per-hour rate charged for the Job. b) Include overloaded extraction and insertion operators that get and display a Job's values. c) Include overloaded + and operators that return integers that indicate the total time for two Jobs, and indicate the difference in time between two Jobs, respectively. d) Write a main() function demonstrating that all the functions work correctly. Save the file as Jobs.cpp.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply