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.

 

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)

 

 

Objective:

 

The objective of this assignment is to provide an on hand experience of:

  • Learn to use object oriented concept
  • Learn to map real world problem in the context of computer programming

Guidelines:

 

  • Create a class for “StaffRegistration”.
  • Provide getter and setter functions for each data member.
  • Use two member functions “InputStaffData()” and “DisplayStaffData()” for getting input and displaying it respectively.
  • Code should properly be indented and well commented.
  • Follow C/C++ rules for code documentation.
  •  Use only Dev-C++ for this assignment. If you are using any other tool then mention it at top of your code file as comments.

 

Assignment Description

 

Etradehouse is an online shopping store, which deals with selling of goods across Europe. They have regional offices in different countries (Pakistan, China & UK). The support, purchase and sales staff works in regional office (Pakistan).

They hire new employees in order to run their business smoothly, but currently they have no automated system for hiring of their employees. As a C++ programmer, your task is to write a computer program in C++ which could register the newly hired staff and then display summary of it.

 

 

The data about the staff, that the company is interested are as follows:-

  • CNIC ( National Identity Card Number in the form XXXXX-XXXXXXX-X)
  • Name ( Name of employee)
  • Father Name
  • Date of Birth
  • Qualification
  • Designation
  • Salary
  • Joining Date
  • Contact Number
  • Address

Your Task

Your task is to create the program which produces the output as shown in “screenshot”.

Screenshot of the desired  output:

Here display your name & VU ID.

 

 

Note

Object oriented approach MUST be used in order to implement the assignment.

Submission

You are required to submit your assignment through LMS in zip format containing two files.

  • Your solution C++ program i.e .cpp file
  • An MS Word document containing screenshot of your program output/execution

 

 

CS201_ Assignment # 2, Due Date: 04/08/2015

+ 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: 5695

.

+ 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)

Replies to This Discussion

Aslam o alikum 

yar muje 1 masla a rha ha wo ye k jb me cinic likh ker enter kerta ho to ye show kerta ha input your name or us k sath hi ajaata ha k enter father name....means ye name k liye or isi trh kuch or data members k liye values ni leta un ko skip ker jata ,,,,,,, is ki kiya waja ha .....

no getter setter are used for any data member in any solution. Read guideline.

// Correct Editing by Adam Ki Beti

#include <iostream>
#include <stdlib.h>
using namespace std;
class StaffRegistration
{
private:
char cnic[18];
char name[30];
char fname[50];
char dob[11];
char degree[10];
char desig[15];
char sal[10];
char joinDate[11];
char cell[13];
char address[40];
public:
void InputStaffData()
{
//enter your full name//

cout"Program developed By: "endl;
//enter your vu id
cout"My VU ID : "endl;

cout"\nPlease enter National Identity Card Number(CNIC)"endl;
cin.getline(cnic,18);
cout"Please enter name"endl;
cin.getline(name,30);
cout"Please enter father name"endl;
cin.getline(fname,50);
cout"Please enter date of birth (dd/mm/yyyy)"endl;
cin.getline(dob,11);
cout"Please enter qualification"endl;
cin.getline(degree,10);
cout "Please enter designation:" endl;
cin.getline(desig,15);
cout"Please enter salary"endl;
cin.getline(sal,10);
cout"Please enter joining date (dd/mm/yyyy)"endl;
cin.getline(joinDate,11);
cout"Please enter contact number"endl;
cin.getline(cell,13);
cout"Please enter address information"endl;
cin.getline(address,40);
cout"\nRecord added successfully !!!"endl;
}
void DisplayStaffData()
{
cout"CNIC: \t\t\t"cnicendl;
cout"Name: \t\t\t"nameendl;
cout"Father Name: \t\t"fnameendl;
cout"DoB: \t\t\t"dob endl;
cout"Qualification: \t\t"degreeendl;
cout"Designation: \t\t"desigendl;
cout"Salary: \t\t"salendl;
cout"Joining Date: \t\t"joinDateendl;
cout"Contact Number: \t"cellendl;
cout"Address: \t\t"addressendl;
}
};
main()
{
system("cls");
StaffRegistration emp;
emp.InputStaffData();
cout"---------------------------------------------------------------------------"endl;
cout"\t \t \t DISPALAY STAFF INFORMATION"endl;
cout"---------------------------------------------------------------------------"endl;
emp.DisplayStaffData();
cout"---------------------------------------------------------------------------"endl;
system("pause");
}

#include

using namespace std;
class StaffRegistration
{
private:
char cnic[16];
char name[20];
char fname[20];
char dob[11];
char degree[10];
char desig[15];
int sal;
char joinDate[11];
char cell[13];
char address[40];
public:
void InputStaffData()
{
cout"program devloped by : Mamoon-Ur-Rashid"endl;
cout"My VU ID : BC130401694"endl;
cout"\nPlease enter National Identity Card Number(CNIC)"endl;
cin>>cnic;
cout"Please enter name"endl;
cin >> name;
cout"Please enter father name"endl;
cin >> fname;
cout"Please enter date of birth (dd/mm/yyyy)"endl;
cin>>dob;
cout"Please enter qualification"endl;
cin>>degree;
cout"please enter designation"endl;
cin>>desig;
cout"Please enter salary"endl;
cin>>sal;
cout"Please enter joining date (dd/mm/yyyy)"endl;
cin>>joinDate;
cout"Please enter contact number"endl;
cin>>cell;
cout"Please enter address information"endl;
cin>>address;
cout"Record added successfully !!!"endl;
}
void DisplayStaffData()
{
cout"CNIC: \t\t\t"cnicendl;
cout"Name: \t\t\t"nameendl;
cout"Father Name: \t\t"fnameendl;
cout"DoB: \t\t\t"dobendl;
cout"Qualification: \t\t"degreeendl;
cout"designation: \t\t"desigendl;
cout"Salary: \t\t"salendl;
cout"Joining Date: \t\t"joinDateendl;
cout"Contact Number: \t"cellendl;
cout"Address: \t\t"addressendl;
}

};
main()
{
system("cls");
StaffRegistration emp;
emp.InputStaffData();
cout"---------------------------------------------------------------------------"endl;
cout"\t\t\t\ DISPALAY STAFF INFORMATION"endl;
cout"---------------------------------------------------------------------------"endl;
emp.DisplayStaffData();
cout"---------------------------------------------------------------------------"endl;
system("pause");
}

 i have some problem in this program plz anyone help me

sir Tariq ap ne yeh jo 2 program upload kiye hain is mai mere pas kafi error arhae hain program run hi nhi hora 

#include <iostream>

using namespace std;
class StaffRegistration
{
private:
char cnic[16];
char name[20];
char fname[20];
char dob[11];
char degree[10];
char desig[20];
int sal;
char joinDate[11];
char cell[13];
char address[40];
public:
void InputStaffData()
{
cout"program devloped by : ABCD...XYZ"endl;
cout"My VU ID : MC151845684"endl;
cout"\nPlease enter National Identity Card Number(CNIC)"endl;
gets(cnic);
fflush(stdin);
cout"Please enter name"endl;
gets(name);
fflush(stdin);
cout"Please enter father name"endl;
gets(fname);
fflush(stdin);
cout"Please enter date of birth (dd/mm/yyyy)"endl;
gets(dob);
fflush(stdin);
cout"Please enter qualification"endl;
gets(degree);
fflush(stdin);
cout"please enter designation"endl;
gets(desig);
fflush(stdin);
cout"Please enter salary"endl;
cin>>sal;
fflush(stdin);
cout"Please enter joining date (dd/mm/yyyy)"endl;
gets(joinDate);
fflush(stdin);
cout"Please enter contact number"endl;
gets(cell);
fflush(stdin);
cout"Please enter address information"endl;
gets(address);
fflush(stdin);
cout"\nRecord added successfully !!!"endl;
}
void DisplayStaffData()
{
cout"CNIC: \t\t\t"cnicendl;
cout"Name: \t\t\t"nameendl;
cout"Father Name: \t\t"fnameendl;
cout"DoB: \t\t\t"dobendl;
cout"Qualification: \t\t"degreeendl;
cout"designation: \t\t"desigendl;
cout"Salary: \t\t"salendl;
cout"Joining Date: \t\t"joinDateendl;
cout"Contact Number: \t"cellendl;
cout"Address: \t\t"addressendl;
}

};
main()
{
system("cls");
StaffRegistration emp;
emp.InputStaffData();
cout"---------------------------------------------------------------------------"endl;
cout"\t\t\t DISPALAY STAFF INFORMATION"endl;
cout"---------------------------------------------------------------------------"endl;
emp.DisplayStaffData();
cout"---------------------------------------------------------------------------"endl;
system("pause");
}

//Ub Kya .....Han....! :-)

#include <iostream>
using namespace std;
class StaffRegistration {
private:
    char cnic[16];
    char name[20];
    char fname[20];
    char dob[11];
    char degree[10];
    char desig[20];
    int sal;
    char joinDate[11];
    char cell[13];
    char address[40];
public:
void InputStaffData()      {
    cout"program devloped by : ABCD...XYZ"endl;
    cout"My VU ID : MC151845684"endl;
    cout"\nPlease enter National Identity Card Number(CNIC)"endl;
    gets(cnic);
    fflush(stdin);
    cout"Please enter name"endl;
    gets(name);
    fflush(stdin);
    cout"Please enter father name"endl;
    gets(fname);
    fflush(stdin);
    cout"Please enter date of birth (dd/mm/yyyy)"endl;
    gets(dob);
    fflush(stdin);
    cout"Please enter qualification"endl;
    gets(degree);
    fflush(stdin);
    cout"please enter designation"endl;
    gets(desig);
    fflush(stdin);
    cout"Please enter salary"endl;
    cin>>sal;
    fflush(stdin);
    cout"Please enter joining date (dd/mm/yyyy)"endl;
    gets(joinDate);
    fflush(stdin);
    cout"Please enter contact number"endl;
    gets(cell);
    fflush(stdin);
    cout"Please enter address information"endl;
    gets(address);
    fflush(stdin);
    cout"\nRecord added successfully !!!"endl;
                       }
void DisplayStaffData()    {
    cout"CNIC: \t\t\t"cnicendl;
    cout"Name: \t\t\t"nameendl;
    cout"Father Name: \t\t"fnameendl;
    cout"DoB: \t\t\t"dobendl;
    cout"Qualification: \t\t"degreeendl;
    cout"designation: \t\t"desigendl;
    cout"Salary: \t\t"salendl;
    cout"Joining Date: \t\t"joinDateendl;
    cout"Contact Number: \t"cellendl;
    cout"Address: \t\t"addressendl;
    }
};
    main()    {
    system("cls");
    StaffRegistration emp;
    emp.InputStaffData();
    cout"---------------------------------------------------------------------------"endl;
    cout"\t\t\t   DISPALAY STAFF INFORMATION"endl;
    cout"---------------------------------------------------------------------------"endl;
    emp.DisplayStaffData();
    cout"---------------------------------------------------------------------------"endl;
    system("pause");
    }

Aslam o alikum 

kiya koi muje bta skta ha k getter and setter fuctions kese use kerne ha. q k ager hum 2 member function bnathe hain jise kaha giya ha ....to hume getter function inputdata function k ander use kerna pare ga or setter function display function k andr use kerna pare ga to ye to illegal howa na...qk C++ nested function allow ni kerta ...means a function into a fuction ...

g hamy is me getter aur setter function use karna ha .2 statment ek sath output me show ho rahi han to name me space use ni karo thik ho jay ge... means apka name agr shahzab khan ha to ap space k bager asi likho (shahzab-khan)to run ho ga sprately ....

thanks .....and jo beach me 1 ya 2 step skip ho jate ha ...means name k bad input ni mangta forn se father name k liye input mangta ha ...and isi trh se or b step b skip ho jate hain 

salam ,hope u will b fine ,i need assignment cs201!!plz

RSS

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

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

.