Suppose you are a programmer in Agha Khan Hospital. Agha Khan Hospital Chairman has assigned a task you
to develop an application in regards to handle the data related to COVID-19 Vaccination Registration. Each
patient is provided with a security code needed for verification at the time of vaccination. Range of security
code is 1 to 10.
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
1. input ( ) function to input the attributes of patient
2. verify ( ) function to check security code provided at the time of registration
3. display ( ) function to display the patient cnic if security code is verified
4. show ( ) function to display the message NOT REGISTERED if security code doesn’t match
Define verify function outside the class using scope resolution operator
1
6. Which of the following statements about constructors is false?
a) Constructors doesn’t have a return value
b) Constructors are always user defined
c) Constructors are overloaded with different signature
d) Constructors may or may not have any arguments being accepted
7. Why do we utilise constructor overloading in the first place?
a) To use different types of constructors
b) because it’s a feature provided
c) To initialize the object in different ways
d) To differentiate one constructor from another
Apply nested loop concept to generate following pattern in output. However, number of times “$” sign get repeated in first row will be defined by the last digit of your SAP-ID+1
Form Rectangle from Triangles A rectangle shall be formed from many triangles. Given vertices of 'n' triangles ,with some triangles among them that can form a rectangle, design an algorithm and write a C++ code to determine the triangles that can form a rectangle. Print the vertices of the triangle in sorted order. That is triangles should also be sorted and the vertices in a triangle also should be sorted. A rectangle may contain four triangles as shown in figure below: For example, consider six triangles with the following vertices: Triangle 1 – (10, 6), (10, 16), (5, 6) Triangle 2 - (25, 8), (20, 4), (28, 6) Triangle 3 – (0, 6), (0, 16), (5, 6) Triangle 4 – (0, 16), (10, 16), (5, 6) Triangle 5 – (15,10), (20, 15), (25, 8) Triangle 6 – (0, 6 ), (5, 6 ), (10, 6) Triangle 1,3 and 4 can form a rectangle.
Professor Student data base system project
write a c++ program to make cricket game in which we have 2 teams and each team should hy 11 players.boling and bating full detail and we should print it on console no need for gui.
Implement a square class in C++. Each object of the class will represent a square
storing it’s side as float. Include a default constructor. Write a function area() to
calculate area of square and perimeter() to calculate the perimeter of square.
Due to upcoming end of financial year, you are being called in to write a program which will read in an input file called IncomeRec.txt, which contains a list of Annual (Gross) income records of employees in a firm, and produce various reports as outlined.
1. You must read this input file (IncomeRec.txt) and store the records of gross incomes into appropriate arrays.
2. Your program should then be able to process the following commands. i.e. program should provide user with the following menu.
▪ 1. Print the entire list.
▪ 2. Print list sorted by Gross income.
▪ 3. Print list of employees which match a given lastname initial
▪ 4. Calculate: a) the Tax corresponding to the provided gross income of each employee using Table 1; and b) the Net Income and c) Print in a file called IncomeTax.txt where the tax and Net income are displayed in separate columns.
[NB. The tax is calculated according to the Tax Calculation Table provided and the Net Income = Gross income – Tax]
▪ 5. Exit program
Make a class cricket team.full detail cricket team program.input value user.display output.
Vertical Line that Passes through Maximum Number of Points Given 'n' points, design an algorithm and write a C++ code to find the end points of the vertical line that may be formed and that passess through maximum number of points. If there are more than one line that passess through maximum number of points then print the end points of the vertical line that passes through maximum number of points and of maximum length. For example, consider the ten points (3,5), (3, 10), (3, 15), (14, 15), (3, 85), (4, 11), (4, 15), (2, 2), (4, 70), (4,72), there are two vertical lines passing through four points and their end points are (3,5) - (3, 85) and (4,11) – (4, 72). Since both pass through same number of points, print the line with maximum length and it is (3,5) and (3, 85).