We are here with you hands in hands to facilitate your learning & don't appreciate the idea of copying or replicating solutions. Read More>>

Looking For Something at vustudents.ning.com? Click Here to Search

www.bit.ly/vucodes

+ Link For Assignments, GDBs & Online Quizzes Solution

www.bit.ly/papersvu

+ Link For Past Papers, Solved MCQs, Short Notes & More


Dear Students! Share your Assignments / GDBs / Quizzes files as you receive in your LMS, So it can be discussed/solved timely. Add Discussion

How to Add New Discussion in Study Group ? Step By Step Guide Click Here.

CS201 - Introduction to Programming Assignment No. 2 Solution and Discussion Spring 2014 of Virtual University (VU) Due Date: July 14, 2014

Instructions:
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, no reward will be given in any case.

Objective:

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

  • Basic concepts of C/C++ classes and objects
  • Dealing with Data members and member functions
  • Initialization of objects
  • Constructor
  • Destructor

Guidelines:

  • 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.

Assignment Problem Statement:

You are required to write a C++ program which contains a class studentInfo having following data members:

  • Student ID
  • Course ID
  • Course Name

The class must have the following member functions:

• Parameterized constructor
• Setter functions
• Getter functions
• Display function

Detailed Description:

Parameterized constructor: It should take three strings as arguments (Student Id, Course Id and Course Name) and initializes the data members of class using setter functions
Setter functions: There must be a setter function for each data member of class
Getter functions: There must be a getter function for each data member of class
Display function: It should display the values of each data member of class by calling getter functions.

Within main() function, create an object of studentInfo class by using the parameterized constructor and pass three strings (student id, course id and course name) as arguments to this parameterized constructor. Then, call the display function which will display the values of student id, course id and course name.

You must display your own VU Id.

Sample output of program:

+ How to Follow the New Added Discussions at Your Mail Address?

+ How to Join Subject Study Groups & Get Helping Material?

+ How to become Top Reputation, Angels, Intellectual, Featured Members & Moderators?

+ VU Students Reserves The Right to Delete Your Profile, If?


See Your Saved Posts Timeline

Views: 9527

.

+ http://bit.ly/vucodes (Link for Assignments, GDBs & Online Quizzes Solution)

+ http://bit.ly/papersvu (Link for Past Papers, Solved MCQs, Short Notes & More)

+ Click Here to Search (Looking For something at vustudents.ning.com?)

+ Click Here To Join (Our facebook study Group)

Attachments:

Replies to This Discussion

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.

help plzzzzzzzzzzzzzzzz

jeee

Enjoy....

Attachments:

its really gud work..

Now, just

1_change variables,

2_Cut uper n lower part of commenting made by Lion.

3_ in main function,

main(){
StudentInfo s1 ( "LION", "cs201", "introduction to programming");
s1.display();

here give ur own VU ID.

4_ change cout "\n\t ------Hit Any Key to EXIT----";

with

cout "Press any key to continue...";

if u want to do..

Best of Luck..

yes you are right 

Enjoy.....

Attachments:

///////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////// Say Thanks 2 LION ------------- X Student of CS201 /////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////

#include<iostream>
#include <conio.h>

using namespace std;

class StudentInfo{

private:
char * studentID;
char * courseID;
char * courseName;

public:
// Parameterized constructor
StudentInfo(char *,char *,char *);

// Standard Setter Function
void setStudentID(char *);
void setCourseID(char *);
void setCourseName(char *);

// Standard Getter Funtion
char getStudentID();
char getCourseID();
char getCourseName();

void display();
};

// Definition of all Functions
// Conctructor
StudentInfo::StudentInfo(char *studentID,char *courseID, char *courseName)
{
this->setStudentID(studentID);
this->setCourseID(courseID);
this->setCourseName(courseName);
}

// setter function fo StudentID
void StudentInfo::setStudentID(char * studentID){
this->studentID = studentID;
}

// Setter Function of Course ID
void StudentInfo::setCourseID(char * courseID){
this->courseID = courseID;
}

// Setter Function for Course Name
void StudentInfo::setCourseName(char * courseName){
this->courseName = courseName;
}

// Getter Function for StudentID
char StudentInfo::getStudentID(){
return *studentID;
}

// Getter Function of course ID
char StudentInfo::getCourseID(){
return * courseID;
}

// Getter Function for Course Name
char StudentInfo::getCourseName(){
return *courseName;
}

// Display func
void StudentInfo::display(){
cout endl endl;
cout"\n Student ID : " studentIDendl;
cout"\n Course ID : " courseID endl;
cout"\n Course Name: " courseNameendl;
}
// End of Class Definition

main(){
StudentInfo s1 ( "LION", "cs201", "introduction to programming");
s1.display();

cout endl;
cout "\n\t ------Hit Any Key to EXIT----";
getch();
}

//----------------------------------------------------------------------------------------------------
// Good Bye Students ....... See this and try to make ur own...... Enjoy.............................
// ------------------ #Lion #theBadBoy

Lion  thanks for sharing 

kindly help on this assigmnt...

Attachments:

please submit the solution of assignment 

RSS

Today Top Members 

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

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

.