Topic: Files and Streams
Codes discussed will be posted here. Write your conclusion on the File stream discussion.
Filename: "Test.txt"
Given problem:
Andrew Miller 87 89 65 37 98*Note: Need the proper codes
*Note need proper codes and conclusion on how its done and about the results. And please give the proper solution and explanation.
*Note: Show complete solution and give a conclusion on why did you use that code for the given problem
Topic: Files and Streams
Codes discussed will be posted here. Write your conclusion on the File stream discussion.
File name: "zCh4_AverageTestScore.cpp"
Code:
*Note: use the link below to view the codes
--->> https://drive.google.com/file/d/1oGJvoH9fkwtj3htKhDvv9WlAqLdiahgh/view?usp=sharing
*Note: need proper codes and conclusion on how it's done and about the results. And please give the proper solution and explanation.
*Note: When doing the code it needs a conclusion based on the results and codes since the topic is about Files and Streams
Create a C++ program to demonstrate the working of pure virtual function. Thus, you are required to implement the following code tasks: Write a base class called person that describes a person of either gender. Define two derived classes called man and woman that define gender specific items. Write pure virtual functions in the base class for operations that are common to both sexes yet are handled in different ways by each of them.
create a class COVID with 6 private data members name, cnic, security code, age, address and blood pressure of patient. Class include public member functions
Task is to create a class COVID with 6 private data members name, cnic, security code, age, address and blood pressure of patient. Class include public member functions
input ( ) function to input the attributes of patient
verify ( ) function to check security code provided at the time of registration
display ( ) function to display the patient cnic if security code is verified
show ( ) function to display the message NOT REGISTERED if security code doesn’t match Define verify function outside the class using scope resolution operator
Write a class Medical Staff that contains an attribute ID to store staff’s identity. The class contains member functions to input and display ID. Write a child class Doctor that inherits Medical Class. It additionally contains an attribute to store doctor’s PMDC number. It also contains member functions to input and show the PMDC number. Write another class Skin Specialist that inherit Doctor Class. It additionally contains an attribute to store working experience as specialist. It also contains member functions to input and show the experience. Test these classes from main() by creating objects of derived classes and testing functions in a way that clear concept of multi-level Inheritance.
Write a program to compute the area of circle and triangle by using the pure virtual function.
Write a class Medical Staff that contains an attribute ID to store staff’s identity. The class contains
member functions to input and display ID. Write a child class Doctor that inherits Medical Class. It
additionally contains an attribute to store doctor’s PMDC number. It also contains member functions
to input and show the PMDC number. Write another class Skin Specialist that inherit Doctor Class. It
additionally contains an attribute to store working experience as specialist. It also contains member
functions to input and show the experience. Test these classes from main() by creating objects of
derived classes and testing functions in a way that clear concept of multi-level Inheritance.
b) Recall the Complex class that we implemented in operator overloading concept. Your task is to
provide implementation of the following method. friend ostream& operator<< (ostream& , const
Complex& )
Write the program, which has three classes one, is StudentRecord having members (degree,year) and functions (getdata), the 2nd class is called EmployeeRecordwhich has data members (emp_id and salary). The 3rd class is Manager having title, dues and an object of EmployeeRecord as well as StudentRecord. Create a function of getdata in all of these classes and call where necessary. Using this scenario, show how the concept of Composition works.
a) Write a class Medical Staff that contains an attribute ID to store staff’s identity. The class contains member functions to input and display ID. Write a child class Doctor that inherits Medical Class. It additionally contains an attribute to store doctor’s PMDC number. It also contains member functions to input and show the PMDC number. Write another class Skin Specialist that inherit Doctor Class. It additionally contains an attribute to store working experience as specialist. It also contains member functions to input and show the experience. Test these classes from main() by creating objects of derived classes and testing functions in a way that clear concept of multi-level Inheritance.