Latest Activity In Study Groups

Join Your Study Groups

VU Past Papers, MCQs and More

CS304 Object Oriented Programming Assignment No 02 Spring 2020 Solution & Discussion

Views: 949

Replies to This Discussion

#CS304 #CS304assignment2solution2020
CS304 Assignment 2 Complete Correct Solution Solved 2020 || Spring 2020

CS304 Assignment 2 Complete Correct Solution Solved 2020 || Spring 2020
CS304 SolutionAssignment no. 2 2020 || Complete Correct Spring 2020 Solved. CS304 Assignment 2 Complete Solution Spring 2020,CS304 Assignment 2 Complete Solution,CS304 Assignment 2,CS304,CS304 Assignment 2 solution,CS304 assignment spring 2020,CS304 assignment solution spring 2020,CS304 assignment, Assignment 2 CS304 solution, solution CS304 Assignment 2, CS304 Assignment 2 solution 2020,CS304 assignment solution 2020,CS304 Assignment 2,CS304 Assignment 2 solution spring 2020,CS304 assignment no 2 solution spring 2020,CS304 assignment no 2 solution 2020,CS304 2nd assignment solution 2020,CS304 2nd assignment solution,CS304 2nd assignment solution spring 2020,assignment solution spring 2020, #CS304 #CS304assignment2solution2020

cs304 asgmnt 2 solution.ccp 

below link 

cs304 asgmnt 2 solution.ccp (1)

CS304 Assignment # 2 Correct Solution Spring 2020

CS304 Object Oriented Programming Assignment 2 Solution & Discussion Spring 2020


CS304 Assignment 2 Solution Idea:

Credit: Faisal

 

#include<iostream>
using namespace std;

class Question
{
private :
int QuestionID;
string QuestionType;
int QuestionMarks;

public :
Question()
{
cout"Enter Question ID : ";
cin>>QuestionID;
cout"Enter Question Type : ";
cin>>QuestionType;
cout"Enter Question Marks : ";
cin>>QuestionMarks;
}
void setQueID(int id)
{
QuestionID=id;
}

void setQueType(string type)
{
QuestionType=type;
}
void setQueMarks(int marks)
{
QuestionMarks=marks;
}
int getQueID() const
{
return QuestionID;
}
string getQueType() const
{
return QuestionType;
}
int getQueMarks() const
{
return QuestionMarks;
}

};

class Exam
{
private :
string ExamType;
string CourseCode;
static const int NoOfQuestions=2;
Question *questions[NoOfQuestions];

public :
Exam(string EType, string CCode)
{
ExamType=EType;
CourseCode=CCode;
for(int i=0; i<NoOfQuestions; i++)
{
cout"\n***** Enter Data of Question No. "i+1" *****\n";
questions[i] = new Question();
}
}
void DisplayInfo()
{
cout"----------------------------\n";
cout"**** Displaying Exam Information ****";
cout"\n----------------------------";
cout"\nExam Type : "ExamType;
cout"\nCourse Code : "CourseCode;
cout"\nTotal No of Questions for Exam : "NoOfQuestions;

cout"\n----------------------------\n";
cout"**** Displaying Question Information ****";
cout"\n----------------------------";
for(int i=0; i<NoOfQuestions; i++)
{
cout"\nQuestion No. : "i+1;
cout"\nQuestion Id : "questions[i]->getQueID();
cout"\nQuestion Type : "questions[i]->getQueType();
cout"\nQuestion Marks : "questions[i]->getQueMarks();
cout"\n----------------------------";
}
}

};

main()
{

cout"\n\t\tCS304 Assignment No. 2 Solution by VU ACADEMY\n";
cout"\nSubcribe my Youtube Channel to get Solutions of all Programming Assignments\n\n";
string type, code;
cout"Enter Exam Type : ";
getline(cin, type);
cout"Enter Course Code : ";
getline(cin, code);

Exam exm1(type,code);

exm1.DisplayInfo();
}

RSS

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

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