Earn in Dollars

PaidVerts

CS304: Object Oriented Programming Assignment No. 01

Due Date:20/11/2014
Instructions:
Please read the following instructions carefully before submitting assignment. It should be clear that your assignment will not get any credit if:
§1 The assignment is submitted after due date.
§2 The submitted assignment does not open or file is corrupt.
§3 Assignment is copied(partial or full) from any source (websites, forums, students, etc)
Note: You have to upload only .cpp file. Assignment in any other format (extension) will not be accepted and will be awarded with zero marks. For example, if you submit code in .doc (Word document) or .txt files or .exe file, no reward will be given in any case.

Objective:
The objective of this assignment is to provide hands on experience of:
§1 Basic concepts of classes and objects in C/C++ language
§2 Dealing with member functions
§3 Dealing with Constructors
§4 Calling member functions through objects of classes
§5 Saving a program
§6 Compiling a program
§7 Executing the program
Guidelines:
§ Code should be properly indented and well commented.
§1 Follow C/C++ guide lines while writing variable names, function names etc
§2 Use only dev-C++ for this assignment.

Assignment 
Problem Statement: 
Write the C++ language program that should fulfill the following requirements:
Program should contain two classes as “Student” and “Instructor”. Within main() function, create the objects of these two classes. Display your student ID and name by passing as attributes(student ID, name) while instantiating the object of the “Student” class. Using the object of the Instructor Class, call its member function Input() to take input for the height of the 8 instructors then call its member function print() to display the average height of the instructors.
Declare data members by private and member functions by public access specifier for both classes.
Function
Description
main() function
Objects of both classes will be created in it, and respective member functions of these objects will be called.
Student(char *, char *)
Constructor of the Student class to display your own student ID and name
input()
Function of Instructor class , it will take heights as input of 8 instructors
print()
Function of Instructor class, it will display average height of 8 instructors.

Detailed Description:
Your program should display your own student ID and name on the top of the screen through passing as attributes at the time of instantiating object of the Student class i.e. 
Student ID : MC104403787 
Student Name : Rehman
Member function input() of the “Instructor” class should take height as input of the 8 instructors from the user i.e.
Enter Instructor 1 Height in Feet : 5.5
Member function print() of the “Instructor” class should display average height of the Instructors.
Sample output of the program:

BEST OF LUCK!
For any query about the assignment, contact at cs304@vu.edu.pk






Solution file attach
 
Top