Object Oriented Paradigm: Faculty of Information Technology UCP Lahore, Pakistan
Object Oriented Paradigm: Faculty of Information Technology UCP Lahore, Pakistan
Object Oriented Paradigm: Faculty of Information Technology UCP Lahore, Pakistan
Instructions:
Lab Tasks:
Lab Task 1:
Write a function Largest which takes 2 integers as parameters and returns the largest
number among them.
Lab Task 2:
Write a function Convert_To_Uppercase that takes a valid English sentence and converts
all of its letters to uppercase (Hint: Use a character array to store the sentence. You can also
add checks for invalid characters).
Sample Input
Object oriented programming is so cool!
Expected Output
OBJECT ORIENTED PROGRAMMING IS SO COOL!
Lab Task 3:
Write a program that read a list of students containing their name and test scores and output
the following:
a. Class average
b. Names of all students with score less that the class average
c. Highest test score and the name of student having the highest test score.
The program should take input of at least 5 students (could be more) from user in console.
Lab Task 4:
Create a struct called Student which has registration no, name, admission date and cgpa as member
variables. Create a dynamic array of type Student.
1. Write a function Input_Records for getting record of a student. Also write a function Display
to print contents of the struct student on screen.
2. Write a function that stores the list of students information in a text file.
3. Write a function to read the list of students from the file
4. Search and display the students information by registration number and by name from the file.
5. Display all the students information that are admitted 2 years before the current date.
Hint: Write a menu driven program. Each menu should call a separate function to perform an
operation. To store date use structure date that contains three members namely date, month and
year.