object oriented concept, Exercises of Computer Science

main programing concept and home work

Typology: Exercises

2017/2018

Uploaded on 08/30/2018

mohsanshah
mohsanshah 🇵🇰

2 documents

1 / 1

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Lab No 15
Q No 1: Write a class distance of private member feet and inch. It make
public function of get data () and display data using operator overloading<<
& >> (using friend function) .and sum of the two object using operator
overloading
Q No 2:
Make this question again with the help of the template classes.
Q No 3 : add exception handling on the input and output
Q no 3: Write a program that reads in a text file containing names, ages
and gender of persons, which are separated using tabs and each person
separated using a new line.
For example:
aKHTAR 19 male
ammar 18 male
faheem 19 male
nazia 19 female
each field above is separated by tab characters.
Program reads the file when the program start to load the information
for the user.
At the end of program, the program writes the all information back to
file so that it can be used next time program is launched.

Partial preview of the text

Download object oriented concept and more Exercises Computer Science in PDF only on Docsity!

Lab No 15

Q No 1: Write a class distance of private member feet and inch. It make public function of get data () and display data using operator overloading<< & >> (using friend function) .and sum of the two object using operator overloading Q No 2: Make this question again with the help of the template classes. Q No 3 : add exception handling on the input and output

Q no 3: Write a program that reads in a text file containing names, ages and gender of persons, which are separated using tabs and each person separated using a new line.

For example: aKHTAR 19 male ammar 18 male faheem 19 male nazia 19 female each field above is separated by tab characters.

  • Program reads the file when the program start to load the information for the user.
  • (^) At the end of program, the program writes the all information back to file so that it can be used next time program is launched.