Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Using C++ Based on the comments in the files, determine the problems, correct them and run them. //Chapter 6 Debug 1 #include #include class Auto

Using C++

Based on the comments in the files, determine the problems, correct them and run them.

//Chapter 6 Debug 1 #include #include class Auto { private: int autoId; char mechanicName[20]; double fee; public: Auto(int id = 999, char name[], double amt = 25.00); void showAuto(); }; Auto(int id, char name[], double amt) { autoId = id; strcpy(mechanicName, name); fee = amt; } void showAuto() { cout<<"Auto #"<

_________________________________________

//Debug 6-2 #include #include class BirthdayCake { private: int orderNumber; char cakeFlavor[20]; char frostingFlavor[20]; int numCandles; BirthdayCake(int num, char cake[]="white", char frost[] = "vanilla", int numCandles = 1); void displayBirthdayCake(); }; BirthdayCake::BirthdayCake(int num, char cake[] = "white", char frost[] = "vanilla", int candles) { orderNumber = num; cakeFlavor =cake; frostingFlavor =frost; numCandles = candles; } void BirthdayCake::displayBirthdayCake() { cout<<"Order #"<

________________________________________

//Debug 6-3 #include #include class ClubMember { private: static int count; char name[20]; public: ClubMember(); ~ClubMember(); }; int ClubMember::count = 0; ClubMember::ClubMember(char name) { ++count; strcpy(name,name); cout<<"ClubMember #"<

// Debug 6-4 #include #include class Dress { private: char material[20]; int size; char style[10]; double price; public: Dress(char mtrl[] = "cotton",char stl[] = "daytime"); void displayDress(); }; Dress::Dress(char mtrl[], int sz, char stl[]) { strcpy(material,mtrl); sz = size; strcpy(style,stl); price = 29.99; if(strcmp(material,"silk") == 0) price += 20.00; if(strcmp(style, "evening")==0) price += 40.00; } void Dress::displayDress() { cout<<"A size "<

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_2

Step: 3

blur-text-image_step3

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

Objects And Databases International Symposium Sophia Antipolis France June 13 2000 Revised Papers Lncs 1944

Authors: Klaus R. Dittrich ,Giovanna Guerrini ,Isabella Merlo ,Marta Oliva ,M. Elena Rodriguez

2001st Edition

ISBN: 3540416641, 978-3540416647

More Books

Students also viewed these Databases questions

Question

help

Answered: 1 week ago

Question

Question What is a Roth 403 (b) plan?

Answered: 1 week ago

Question

Question Can a Keogh plan fund be reached by the owners creditors?

Answered: 1 week ago