Using function input data and print data.
how to define a class student with data members student roll no,student name,adress,fees with function input data and print data?
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.

Wim SturkenboomRank #2,527 · 554 reputationPosted Dec 10, 2014, 7:11 PM EST
class student
{
int rollno;
string name;
string address;
double fees;
///
/// update student information
///
///
///
///
///
public void update(int iRollno, string strName, string strAddress, double dblFees)
{
rollno = iRollno;
name = strName;
address = strAddress;
fees = dblFees;
}
///
/// get printable data
///
///
public string print()
{
string result = String.Format("{0,-15}{4}\n{1,-15}{5}\n{2,-15}{6}\n{3,-15}{7}",
"Name:",
"RollNo:",
"Address:",
"Fees:",
name, rollno, address, fees);
return result;
}
}