Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

0 Endorsements
~475 People Reached
Favorite Forums
Favorite Tags
c++ x 6
Member Avatar for bhuwanrc

[code=cplusplus] #include "Student.h" #include<iostream> #include<cstdlib> #include<string> using namespace std; Student::Student() { name=" "; surname=""; assignment1Mark=0; assignment2Mark=0; labTestMark=0; examMark=0; } Student::Student(string name,string surname,int a1, int a2, int test, int exam) { name=name; surname=surname; assignment1Mark=a1; assignment2Mark=a2; labTestMark=test; examMark=exam; } string Student:: getName()const { return name; } string Student:: getSurname()const { return surname; …

Member Avatar for vmanes
0
336
Member Avatar for bhuwanrc

[code=cplusplus] void fishing(vector<Fish*> &basket); int printBasket(vector<Fish*> &basket); int main() { vector<Fish*> FishVec; Fish* aFish; int totalweight=0; int i=0; while (totalweight<15000) { fishing(FishVec); aFish=FishVec.at(i); aFish->printMe(); if (aFish->acceptable()) { totalweight+=aFish->getWeight(); cout<<"total weight:"<<totalweight<<endl; cout<<" Has been put in the basket"<<endl; } else { cout<<" Was released"<<endl; } i++; cout<<endl; } } void fishing(vector<Fish*> …

Member Avatar for Salem
0
77
Member Avatar for bhuwanrc

[code=cplusplus] #include<iostream> #include<vector> using namespace std; int main() { const int TYPE_OF_FISH=4; vector<Fish*>FishVec(TYPE_OF_FISH); FishVec[0]=new AustralianBass(); FishVec[1]=new EelTailedCatfish(); FishVec[2]=new GippslandPerch(); FishVec[3]=new ShortFinedEel(); cout<<"welcome for fish catching \n"; cout<<"press any to go out \n"; cout<<"keep pressing enter to get catch\n"; int i; Fish* aFish; char response; RandomInt d4(0,TYPE_OF_FISH-1); for(;;) { cin.get(response); if(response!='\n') …

Member Avatar for bhuwanrc
0
60