Latest Activity In Study Groups

Join Your Study Groups

VU Past Papers, MCQs and More

We non-commercial site working hard since 2009 to facilitate learning Read More. We can't keep up without your support. Donate.

CS201: Introduction to Programming Assignment No. 03 Semester: Spring 2013 Due Date:26/06/2013

Assignment No. 03
Semester: Spring 2013

CS201: Introduction to Programming

Total Marks: 20


Due Date:26/06/2013



Please read the following instructions carefully before submitting assignment. It should be clear that your assignment will not get any credit if:


  • The assignment is submitted after due date.
  • The submitted assignment does not open or file is corrupt.
  • 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 or .zip no reward will be given in any case.





The objective of this assignment is to provide hands on experience of:


  • Basic concepts of classes and objects in C/C++ language
  • Dealing with member functions
  • Parameterized constructors
  • File handling





  • Code should be properly indented and well commented.
  • Follow C/C++ rules while writing variable names, function names etc
  • Use only dev-C++ for this assignment.


















Problem Statement:     

Write the C++ program having class name studentinfo, that is used to store the VU student information: This class should store your VUID, campus id, name and father name in the following character type data members:


Data members:

  • VUID
  • campusID
  • Studentname
  • Fathername


Studentinfo class should have the parameterized constructor that is used to initialize the data members of the studentinfo class,


Studentinfo class should have following member functions.

  • Storefile()
  • Display()


Storefile() member function should store the value of all data members in the text file named “record.txt”, on separate lines in the text file as follows:  




Muhammad Hussain

Muhammad Ali.


Display() member function reads your VUID, campusID, name and father name from the file named “record.txt”, stores them in the respective data members and displays the record.



In main() function, create the object of the class by using parameterized constructor and then call the storefile() member function to store the record of all the data members in the text file. Finally call the display() function to read the data from text file and store it in the respective data members and display all the records.


Sample Output:


Note: You have to upload only .cpp file of your assignment, do not send your assignment in .txt, .zip, .rar .doc or .docx format.


Views: 6483


Replies to This Discussion

do submit it on ur LMS then:)

yes Sir, we want to to modify our code????

please help muje abe tk c programming ke kuch b smg nhe aye

Please Discuss here about this assignment.Thanks

Our main purpose here discussion not just Solution

We are here with you hands in hands to facilitate your learning and do not appreciate the idea of copying or replicating solutions.

yeh bohat lamba program ha mera programm srf 52 lines ka bana ha woo be perfect according to assignment 100%%%%%%% yeha pa app set value kr rhay hoo menay just pass ke ha value aur assign ke ha

Ali ap apny program ki file attach ne b program bnaya he Or work b sahi kr raha he....but wo 79 lines ka he....ap ka 52 lines me kesy bn gaya?

according to assignment 100% sai bana dia ha lakin is bar upload nei kroo ga last time be 0 marks milay! menay ose din submit kr dia tha jis din assignmet mile the

mein nay looping sa help he file read krnay k liaya app sab with out loop file read kr rhay hoo yeh complexity bara rha ha..

Attention Please:

Now nobody do not share here personal coding.......

here show error..

don't worry....we will resolve it....just a little wait,I'm busy in my extended assigns.....

it's good Sariya....

it was sad to know that u got zero marks for a mistake u didnt make from all the discussion there i can understand that someone copied ur provided idea and shared that on another forum and u got accused as u mentioned ur name and id in that solution, bt its not the end of the world life goes on and u cant contain ur expertise in a piece of paper i.e degree

i think thats why u didnt share any idea this time but u shouldnt just refrain bcoz of a bad incident its always nice to see ali raza marchal actively participating in every discussion bt this time jus an image

i hope u ll rethink 


© 2021   Created by + M.Tariq Malik.   Powered by

Promote Us  |  Report an Issue  |  Privacy Policy  |  Terms of Service