XYZ University needs a system for student’s courses and their semester details. A data entry operator needs to enter student’s data in to the system, and then the system will show the report of student semester information. Following data will be used by the system.




 xyz university needs a system for students and there semester detail .  A data entry operator needs to enter student data in to system and then system will show the report of the student  semester information ..

Assignment No.  3
Semester: Fall 2016
CS201 – Introduction to Programming

Total Marks: 20

Due Date: 16th Jan. 2017


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

o        Assignment is submitted after due date.
o        Submitted assignment does not open or file is corrupt.
o        Assignment is copied (From internet/students).
o        Assignment is implemented other than using structure method. 

Software allowed to develop Assignment
-          Dev C++

Objectives:
To enable students to write, compile and execute a program in Dev C++. Moreover to familiarize students with  the concepts of:
  • Structure
  • User define functions
  • String functions
  • Formatting

Assignment Submission Instructions
You have to submit only.cpp file on the Assignments interface of CS201 at VULMS. Assignment submitted in any other format will not be accepted and will be graded zero marks.

Assignment


XYZ University needs a system for student’s courses and their semester details. A data entry operator needs to enter student’s data in to the system, and then the system will show the report of student semester information. Following data will be used by the system.

  • Course code
  • Course name
  • Semester

The system will allow entering data for five courses at a time and will input course code along with course name, later the system will format the report in a more readable form.

Your task is to:
Write a C++ program to implement the above mentioned interface

  • Your program should provide the user with options to enter data for courses along with course code. e.g.
Enter course name along with course code: CS201 Introduction to Programming


  • After taking course information from user your program should prompt user to enter semester information.
e.g. Enter Semester: Fall 2016

  • The program should input data for five courses and semester.
  • Use structure name “course” in your program.
  • Use separate functions for taking user inputs, displaying and formatting outputs.
e.g. InputCourses(),DisplayHeader(),DisplayCourses(),FormatCourse(---) etc.

Note: Use structure to implement above program, no credit will be awarded if structure is not used.
      
Sample output:




Deadline:
The deadline to submit your assignment solution is 16th January, 2017. Your assignment must be submitted within the due date through VULMS. No assignment will be accepted through email after the due date.


 

xyz university needs a system for students and there semester detail .  A data entry operator needs to enter student data in to system and then system will show the report of the student  semester information .. perfect solution ..

XYZ University needs a system for student’s courses and their semester details. A data entry operator needs to enter student’s data in to the system, and then the system will show the report of student semester information. Following data will be used by the system.

  • Course code
  • Course name
  • Semester

The system will allow entering data for five courses at a time and will input course code along with course name, later the system will format the report in a more readable form.

Your task is to:
Write a C++ program to implement the above mentioned interface

  • Your program should provide the user with options to enter data for courses along with course code. e.g.
Enter course name along with course code: CS201 Introduction to Programming


  • After taking course information from user your program should prompt user to enter semester information.
e.g. Enter Semester: Fall 2016

  • The program should input data for five courses and semester.
  • Use structure name “course” in your program.
  • Use separate functions for taking user inputs, displaying and formatting outputs.
e.g. InputCourses(),DisplayHeader(),DisplayCourses(),FormatCourse(---) etc.










#include <iostream>
#include <string>
#include <iomanip>
using namespace std;

struct Student



{

 string Course_codea ;
char Course_namea[100];
char Semestera[50] ;            // for student 1



 string Course_codeb ;
char Course_nameb[100];  // fore student   2
char Semesterb[50] ;

string Course_codec ;
char Course_namec[100];  // fore student   2
char Semesterc[50] ;


};



Student InputCourses(Student);
void DisplayData(Student);



int main()


{
    Student s;
    s = InputCourses(s);
    DisplayData(s);
system("pause");
}




 Student InputCourses(Student s){
   
 

    cout<<"enter course code:\t";
    cin>>s.Course_codea;
    cin.ignore();
    cout<<"enter course namee:\t";
    cin.getline (s.Course_namea , 100) ;  // student no one input
    cout<<"enter semester:\t";
    cin.getline(s.Semestera , 50);
    cout<<"\n";
   
    cout<<"enter course code:\t";
    cin>>s.Course_codeb;
    cin.ignore();                          //student no 2
    cout<<"enter course namee:\t";
    cin.getline (s.Course_nameb , 100) ;
    cout<<"enter semester:\t\t";
    cin.getline(s.Semesterb , 50);

    cout<<"\n";

    cout<<"enter course code:\t";
    cin>>s.Course_codec;
    cin.ignore();                          //student no 3
    cout<<"enter course namee:\t";
    cin.getline (s.Course_namec , 100) ;
    cout<<"enter semester:\t\t";
    cin.getline(s.Semesterc , 50);

   

    return s;


    }

    void DisplayData(Student s)
    {

          cout << "\n#       CourseCode         CourseName        Semester         LaunchingYear." << endl;
cout<<setfill('-')<<setw(75)<<endl<<endl;
     
     
     
                cout<<"\n" <<""<< "\t " << s.Course_codea <<"\t\t   " <<s.Course_namea  << " \t\t\t " << s.Semestera<<"\n";
                cout<<"\n" <<"2"<< "\t " << s.Course_codeb <<"\t\t   " <<s.Course_nameb  << " \t\t\t " << s.Semesterb<<"\n";
                cout<<"\n" <<"3"<< "\t " << s.Course_codec <<"\t\t   " <<s.Course_namec  << " \t\t\t " << s.Semesterc<<"\n";

}