Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ Debug 1) #include #include #include class RepairJob { void friend displayRepairJob(RepairJob rj, Technician tech); private: int jobNum; int mo; int day; int yr; double

C++

Debug 1)

#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<

________________________________________

Debug 3)

#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<

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Beginning Databases With PostgreSQL From Novice To Professional

Authors: Richard Stones, Neil Matthew

2nd Edition

1590594789, 978-1590594780

More Books

Students also viewed these Databases questions

Question

Does your message reiterate its main idea?

Answered: 1 week ago

Question

Tell the merits and demerits of Mendeleev's periodic table.

Answered: 1 week ago

Question

13. You always should try to make a good first impression.

Answered: 1 week ago