#include #include #include class RepairJob { void friend displayRepairJob(RepairJob rj, Technician tech); private: int jobNum; int mo; int day; int yr; double amount; int techNum; public: RepairJob(int job, int m, int d, int y, double amt, int tech); }; RepairJob::RepairJob(int job, int m, int y, double amt, int tech) { jobNum = job; mo = m; day = d; yr = y; amount = amt; jobNum = tech; } class Technician { friend void displayRepairJob(RepairJob rj, Technician tech); private: int techId; char name[20]; public: Technician(int id, char nm[]); }; Technician::Technician(int id, char nm[]) { techId = id; name = nm; } void displayRepairJob(RepairJob rj, Technician tech) { cout<<"RepairJob "< _____________________________________
Debug 2)
#include #include #include class College; class Student { void friend displayStudent(Student student, College school); private: int studentNum; char studentName[30]; char college[30]; public: Student(int id, char name[], char col[]); }; Student::Student(int id, char name[], char col[]) { studentNum = id; strcpy(studentName,name); strcpy(college,col); } class College { private: char collegeName[30]; char collegeCity[30]; public: College(char col[], char city[]); }; College::College(char col[], char city[]) { strcpy(collegeName,col); strcpy(collegeCity,city); } void displayStudent(Student student, College school) { cout< ________________________________________
#include #include #include class Player; class League { friend int canPlayerJoin(Player aPlayer, League aLeague); private: char leagueName[35]; int minimumAge; int maximumAge; public: void setValues(char leagueName[], int min, int max); void displayValues(); }; void League::setValues(char leagueName[], int min, int max) { int temp; strcpy(leagueName, leagueName); if(min > max) { temp = min; min = max; max = temp; } minimumAge = min; maximumAge = max; } void League::displayValues() { cout<= aLeague.minimumAge && aPlayer.age <= aLeague.maximumAge) leagueFlag = 1; return(leagueFlag); } void main() { int x; League aLeague[8]; Player aPlayer; aLeague[0].setValues("PeeWee Softball",4,6); aLeague[1].setValues("PeeWee Soccer",4,7); aLeague[2].setValues("Shooting Stars Soccer",7,10); aLeague[3].setValues("White Lightning Basketball",6,9); aLeague[4].setValues("Track Trekkers",9,11); aLeague[5].setValues("Junior Shots",11,14); aLeague[6].setValues("Senior Shots",12,16); aLeague[7].setValues("Travelling Homers",13,17); aLeague[8].setValues("Key Trotters",14,18); aPlayer.setValues("Katie",7); cout<<"Acceptable Leagues this player can join: "< ______________________________________
Debug 4)
#include #include #include class Order { Order yearEndTotal(Order summary, Order oneOrder); private: char customerName[20]; int orderQuantity; public: Order(); setValues(); displayValues(); }; Order::Order() { strcpy(customerName,"Total"); orderQuantity=0; }; void setValues() { cout<<"Enter customer name "; cin>>customerName; cout<<"Enter quantity ordered: "; cin>>orderQuantity; } void Order::displayValues() { cout<