Deck 14: Trees
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/31
العب
ملء الشاشة (f)
Deck 14: Trees
1
Write a driver program to test the Administrator class from Exercise 1.
Problem Plan:
• Includes the header file "SalariedEmployee.h"
o Declare the constructor for initialize all the variables
o Declare the function "Display()" to print the object
• Define the inline constructor for initialize the variables
• Define the inline function "display()" for print the object
• Declare the class "Administrator" that inherit the class "SalariedEmployee"
o Declare the constructor for initialize all the variables
o Declare the function "Print()" to display the object
• Define the inline constructor for initialize the variables and initialize the "SalariedEmployee" variables
• Define the inline function "Print()" for display the object
• Define the "main()" function
o Create the object for "Administrator" class with parameterized constructor
o Display the object
Program:
/ **********************************************************
* Program to test the administrator class *
********************************************************** /
Administrator.h:
/ / Including required header files
#include
/ * Include "SalariedEmployee.h" which is referred from book page no: 806 * /
#include "SalariedEmployee.h"
#ifndef ADMINISTRATOR
#define ADMINISTRATOR
/ / Definition of 'Administrator' class
class Administrator : public SalariedEmployee
{
/ / Access specifier
public:
/ / Declaration of constructor
Administrator(long admin_id = 0, string admin_last = "",
string admin_first = "", char admin_init = ' ', int admin_dept = 0,
double admin_salary = 0, double admin_bonus = 0);
/ / declaration of 'Print()' function
virtual void Print(ostream out) const;
/ / Access specifier
private:
/ / Declaration of variable
double my_bonus;
};
/ * Definition of inline constructor 'Administrator()' for initialize the variables * /
inline Administrator::Administrator(
long admin_id, string admin_last, string admin_first, char admin_init,
int admin_dept, double admin_salary, double admin_bonus)
: SalariedEmployee(admin_id, admin_last, admin_first, admin_init, admin_dept, admin_salary),
my_bonus(admin_bonus)
{}
/ / Definition of inline function 'Print()' for display 'Administrator' object
inline void Administrator::Print(ostream out) const
{
/ * Call the SalariedEmployee's member function 'display()' * /
SalariedEmployee::display(out);
out "Bonus: $" my_bonus endl;
}
#endif
Main.cpp:
/ / Including required header files
#include
using namespace std;
#include "Administrator.h"
/ / Definition of main
int main()
{
cout "Administrator Details";
/ * Create the object for 'Administrator' class with parameterized constructor * /
Administrator admin(123, "zenith", "victor", 'V', 3, 23499, 3450);
/ / Print the object
cout
}
Sample Output
Administrator Details123 zenith, victor V 3
$23499
• Includes the header file "SalariedEmployee.h"
o Declare the constructor for initialize all the variables
o Declare the function "Display()" to print the object
• Define the inline constructor for initialize the variables
• Define the inline function "display()" for print the object
• Declare the class "Administrator" that inherit the class "SalariedEmployee"
o Declare the constructor for initialize all the variables
o Declare the function "Print()" to display the object
• Define the inline constructor for initialize the variables and initialize the "SalariedEmployee" variables
• Define the inline function "Print()" for display the object
• Define the "main()" function
o Create the object for "Administrator" class with parameterized constructor
o Display the object
Program:
/ **********************************************************
* Program to test the administrator class *
********************************************************** /
Administrator.h:
/ / Including required header files
#include
/ * Include "SalariedEmployee.h" which is referred from book page no: 806 * /
#include "SalariedEmployee.h"
#ifndef ADMINISTRATOR
#define ADMINISTRATOR
/ / Definition of 'Administrator' class
class Administrator : public SalariedEmployee
{
/ / Access specifier
public:
/ / Declaration of constructor
Administrator(long admin_id = 0, string admin_last = "",
string admin_first = "", char admin_init = ' ', int admin_dept = 0,
double admin_salary = 0, double admin_bonus = 0);
/ / declaration of 'Print()' function
virtual void Print(ostream out) const;
/ / Access specifier
private:
/ / Declaration of variable
double my_bonus;
};
/ * Definition of inline constructor 'Administrator()' for initialize the variables * /
inline Administrator::Administrator(
long admin_id, string admin_last, string admin_first, char admin_init,
int admin_dept, double admin_salary, double admin_bonus)
: SalariedEmployee(admin_id, admin_last, admin_first, admin_init, admin_dept, admin_salary),
my_bonus(admin_bonus)
{}
/ / Definition of inline function 'Print()' for display 'Administrator' object
inline void Administrator::Print(ostream out) const
{
/ * Call the SalariedEmployee's member function 'display()' * /
SalariedEmployee::display(out);
out "Bonus: $" my_bonus endl;
}
#endif
Main.cpp:
/ / Including required header files
#include
using namespace std;
#include "Administrator.h"
/ / Definition of main
int main()
{
cout "Administrator Details";
/ * Create the object for 'Administrator' class with parameterized constructor * /
Administrator admin(123, "zenith", "victor", 'V', 3, 23499, 3450);
/ / Print the object
cout
}
Sample Output
Administrator Details123 zenith, victor V 3
$23499
2
Write a driver program to test the FactoryErnployee class from Exercise 2.
Problem Plan:
• Includes the header file "Employee.h"
o Declare the constructor for initialize all the variables
o Declare the function "display()" to print the object
• Define the inline constructor for initialize the variables
• Define the inline function "display()" for print the object
• Declare the class "FactoryEmployee" that inherit the class "Employee"
o Declare the constructor for initialize all the variables
o Declare the function "display()" to display the object
• Define the inline constructor for initialize the variables and initialize the "Employee" variables
• Define the inline function "display()" for display the object
• Define the "main()" function
o Create the object for "FactoryEmployee" class with parameterized constructor
o Display the object
Program:
/ **********************************************************
* Program to test the FactoryEmployee class *
********************************************************** /
FactoryEmployee.h:
/ / Include required header files
#include
/ * Include 'Employee.h' which is referred on book at page no : 805 * /
#include "Employee.h"
#ifndef FACTORYEMPLOYEE
#define FACTORYEMPLOYEE
/ / Definition of class 'FactoryEmployee'
class FactoryEmployee : public Employee
{
/ / Access specifier
public:
/ / Declaration of constructor
FactoryEmployee(long factory_emp_id = 0, string factory_emp_last = "",
string factory_emp_first = "", char factory_emp_initial = ' ', int factory_emp_dept = 0,
double unitPay = 0, int no_Units = 0);
/ / declaration of 'display()' function
virtual void display(ostream out) const;
/ / Access specifier
private:
/ / Declaration of variable
double payUnit;
int noUnits;
double wages;
};
/ * Definition of inline constructor 'FactoryEmployee()' for initialize the variables * /
inline FactoryEmployee::FactoryEmployee(
long factory_emp_id, string factory_emp_last, string factory_emp_first, char factory_emp_initial,
int factory_emp_dept, double unitPay, int no_Units)
: Employee(factory_emp_id, factory_emp_last, factory_emp_first, factory_emp_initial, factory_emp_dept),
payUnit(unitPay), noUnits(no_Units)
{
/ / Assign 'wages' is equal to 'payUnit' * 'noUnits'
wages = payUnit * noUnits;
}
/ * Definition of inline function 'display()' for display 'FactoryEmployee' object * /
inline void FactoryEmployee::display(ostream out) const
{
/ * Call the Employee's inherited member function 'display()' * /
Employee::display(out);
/ / Display result
out noUnits
" units at $" payUnit
" gives wages = $" wages endl;
}
#endif
Main.cpp:
/ / Include required header files
#include
using namespace std;
#include "FactoryEmployee.h"
/ / Definition of 'main()'
int main()
{
cout "Factory Employee Details\n\n\n";
/ * Create the object for 'FactoryEmployee' class with parameterized constructor * /
FactoryEmployee factory_emp(123, "zenith", "victor", 'V', 3, 234, 34);
/ / Print the object
cout factory_emp endl;
system("pause");
}
Sample Output
Factory Employee Details
123 zenith, victor V 3
34 units at $234 gives wages = $7956
• Includes the header file "Employee.h"
o Declare the constructor for initialize all the variables
o Declare the function "display()" to print the object
• Define the inline constructor for initialize the variables
• Define the inline function "display()" for print the object
• Declare the class "FactoryEmployee" that inherit the class "Employee"
o Declare the constructor for initialize all the variables
o Declare the function "display()" to display the object
• Define the inline constructor for initialize the variables and initialize the "Employee" variables
• Define the inline function "display()" for display the object
• Define the "main()" function
o Create the object for "FactoryEmployee" class with parameterized constructor
o Display the object
Program:
/ **********************************************************
* Program to test the FactoryEmployee class *
********************************************************** /
FactoryEmployee.h:
/ / Include required header files
#include
/ * Include 'Employee.h' which is referred on book at page no : 805 * /
#include "Employee.h"
#ifndef FACTORYEMPLOYEE
#define FACTORYEMPLOYEE
/ / Definition of class 'FactoryEmployee'
class FactoryEmployee : public Employee
{
/ / Access specifier
public:
/ / Declaration of constructor
FactoryEmployee(long factory_emp_id = 0, string factory_emp_last = "",
string factory_emp_first = "", char factory_emp_initial = ' ', int factory_emp_dept = 0,
double unitPay = 0, int no_Units = 0);
/ / declaration of 'display()' function
virtual void display(ostream out) const;
/ / Access specifier
private:
/ / Declaration of variable
double payUnit;
int noUnits;
double wages;
};
/ * Definition of inline constructor 'FactoryEmployee()' for initialize the variables * /
inline FactoryEmployee::FactoryEmployee(
long factory_emp_id, string factory_emp_last, string factory_emp_first, char factory_emp_initial,
int factory_emp_dept, double unitPay, int no_Units)
: Employee(factory_emp_id, factory_emp_last, factory_emp_first, factory_emp_initial, factory_emp_dept),
payUnit(unitPay), noUnits(no_Units)
{
/ / Assign 'wages' is equal to 'payUnit' * 'noUnits'
wages = payUnit * noUnits;
}
/ * Definition of inline function 'display()' for display 'FactoryEmployee' object * /
inline void FactoryEmployee::display(ostream out) const
{
/ * Call the Employee's inherited member function 'display()' * /
Employee::display(out);
/ / Display result
out noUnits
" units at $" payUnit
" gives wages = $" wages endl;
}
#endif
Main.cpp:
/ / Include required header files
#include
using namespace std;
#include "FactoryEmployee.h"
/ / Definition of 'main()'
int main()
{
cout "Factory Employee Details\n\n\n";
/ * Create the object for 'FactoryEmployee' class with parameterized constructor * /
FactoryEmployee factory_emp(123, "zenith", "victor", 'V', 3, 234, 34);
/ / Print the object
cout factory_emp endl;
system("pause");
}
Sample Output
Factory Employee Details
123 zenith, victor V 3
34 units at $234 gives wages = $7956
3
Write a driver program to test the SalesPerson class from Exercise 3.
Problem Plan:
• Includes the header file "SalariedEmployee.h"
o Declare the constructor for initialize all the variables
o Declare the function "display()" to print the object
• Define the inline constructor for initialize the variables
• Define the inline function "display()" for print the object
• Declare the class "FactoryEmployee" that inherit the class "SalariedEmployee"
o Declare the constructor for initialize all the variables
o Declare the function "display()" to display the object
• Define the inline constructor for initialize the variables and initialize the "SalariedEmployee" variables
• Define the inline function "display()" for display the object
• Define the "main()" function
o Create the object for "Salesperson" class with parameterized constructor
o Display the object
Program:
/ **********************************************************
* Program to test the Salesperson class *
********************************************************** /
Salesperson.h:
/ / Include required header files
#include
/ / Include 'SalariedEmployee.h' which is referred from book at page no: 806
#include "SalariedEmployee.h"
#ifndef SALES_PERSON
#define SALES_PERSON
/ / Definition of class 'Salesperson
class Salesperson : public SalariedEmployee
{
/ / Access specifier
public:
/ / Declaration of constructor
Salesperson(long sales_id = 0, string sales_last = "",
string sales_first = "", char sales_initial = ' ', int sales_dept = 0,
double sales_salary = 0, double sales_commission = 0);
/ / declaration of 'display()' function
virtual void display(ostream out) const;
private:
/ / Declaration of variable
double commision;
};
/ / Definition of inline constructor 'Salesperson()' for initialize the variables
inline Salesperson::Salesperson(
long sales_id, string sales_last, string sales_first, char sales_initial,
int sales_dept, double sales_salary, double sales_commission)
: SalariedEmployee(sales_id, sales_last, sales_first, sales_initial, sales_dept, sales_salary),
commision(sales_commission)
{ }
/ * Definition of inline function 'display()' for display 'Salesperson' object * /
inline void Salesperson::display(ostream out) const
{
/ * Call the SaleriedEmployee's inherited member function 'display()' * /
SalariedEmployee::display(out);
/ / Display result
out "Commision: $"
commision endl;
}
#endif
Main.cpp:
/ / Include required header files
#include
using namespace std;
#include "Salesperson.h"
/ / Definition of 'main()'
int main()
{
cout "Sales Person Details\n\n\n";
/ * Create the object for 'Salesperson' class with parameterized constructor * /
Salesperson sales(123, "zenith", "victor", 'V', 3, 23400,345.6);
/ / Print the object
cout sales endl;
}
Sample Output
Sales Person Details
123 zenith, victor V 3
$23400
Commision: $345.6
• Includes the header file "SalariedEmployee.h"
o Declare the constructor for initialize all the variables
o Declare the function "display()" to print the object
• Define the inline constructor for initialize the variables
• Define the inline function "display()" for print the object
• Declare the class "FactoryEmployee" that inherit the class "SalariedEmployee"
o Declare the constructor for initialize all the variables
o Declare the function "display()" to display the object
• Define the inline constructor for initialize the variables and initialize the "SalariedEmployee" variables
• Define the inline function "display()" for display the object
• Define the "main()" function
o Create the object for "Salesperson" class with parameterized constructor
o Display the object
Program:
/ **********************************************************
* Program to test the Salesperson class *
********************************************************** /
Salesperson.h:
/ / Include required header files
#include
/ / Include 'SalariedEmployee.h' which is referred from book at page no: 806
#include "SalariedEmployee.h"
#ifndef SALES_PERSON
#define SALES_PERSON
/ / Definition of class 'Salesperson
class Salesperson : public SalariedEmployee
{
/ / Access specifier
public:
/ / Declaration of constructor
Salesperson(long sales_id = 0, string sales_last = "",
string sales_first = "", char sales_initial = ' ', int sales_dept = 0,
double sales_salary = 0, double sales_commission = 0);
/ / declaration of 'display()' function
virtual void display(ostream out) const;
private:
/ / Declaration of variable
double commision;
};
/ / Definition of inline constructor 'Salesperson()' for initialize the variables
inline Salesperson::Salesperson(
long sales_id, string sales_last, string sales_first, char sales_initial,
int sales_dept, double sales_salary, double sales_commission)
: SalariedEmployee(sales_id, sales_last, sales_first, sales_initial, sales_dept, sales_salary),
commision(sales_commission)
{ }
/ * Definition of inline function 'display()' for display 'Salesperson' object * /
inline void Salesperson::display(ostream out) const
{
/ * Call the SaleriedEmployee's inherited member function 'display()' * /
SalariedEmployee::display(out);
/ / Display result
out "Commision: $"
commision endl;
}
#endif
Main.cpp:
/ / Include required header files
#include
using namespace std;
#include "Salesperson.h"
/ / Definition of 'main()'
int main()
{
cout "Sales Person Details\n\n\n";
/ * Create the object for 'Salesperson' class with parameterized constructor * /
Salesperson sales(123, "zenith", "victor", 'V', 3, 23400,345.6);
/ / Print the object
cout sales endl;
}
Sample Output
Sales Person Details
123 zenith, victor V 3
$23400
Commision: $345.6
4
Write a complete payroll program for a company in which each employee falls into one of the five categories described in the text and in Exercises 1-3-salaried, hourly, administrative, factory, or salesperson.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 31 في هذه المجموعة.
فتح الحزمة
k this deck
5
Write a driver program to test the Document class from Exercise 4.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 31 في هذه المجموعة.
فتح الحزمة
k this deck
6
Write a driver program to test the LookAheadStack class from Exercise 5.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 31 في هذه المجموعة.
فتح الحزمة
k this deck
7
In an ordered list, all operations that modify the list are designed to ensure that the elements remain in ascending order. Build and test an OrderedList class template derived from class List that exhibits this characteristic.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 31 في هذه المجموعة.
فتح الحزمة
k this deck
8
Write a program that processes a heterogeneous list of the five different kinds of employees in Problem 4. Instead of the simple creation of list elements in the driver program in Figure 14.6, use other list operations to input the list, output the list, add to the list, remove from the list, search the list, and sort the list so that id-numbers are in ascending order.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 31 في هذه المجموعة.
فتح الحزمة
k this deck
9
Contrast public, private, and protected inheritance.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 31 في هذه المجموعة.
فتح الحزمة
k this deck
10
Contrast the is-a, has-a , and uses-a relationships between classes.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 31 في هذه المجموعة.
فتح الحزمة
k this deck
11
For Exercises 3-18, determine which of the following best describes the relationship between the given objects: is-a , has-a, uses-a , none of the preceding.
Lines and rectangles
Lines and rectangles
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 31 في هذه المجموعة.
فتح الحزمة
k this deck
12
For Exercises 3-18, determine which of the following best describes the relationship between the given objects: is-a , has-a, uses-a , none of the preceding.
Squares and rectangles
Squares and rectangles
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 31 في هذه المجموعة.
فتح الحزمة
k this deck
13
For Exercises 3-18, determine which of the following best describes the relationship between the given objects: is-a , has-a, uses-a , none of the preceding.
Triangles and rectangles
Triangles and rectangles
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 31 في هذه المجموعة.
فتح الحزمة
k this deck
14
For Exercises 3-18, determine which of the following best describes the relationship between the given objects: is-a , has-a, uses-a , none of the preceding.
Students at Universal University and GPAs
Students at Universal University and GPAs
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 31 في هذه المجموعة.
فتح الحزمة
k this deck
15
For Exercises 3-18, determine which of the following best describes the relationship between the given objects: is-a , has-a, uses-a , none of the preceding.
Students and the library at Universal University
Students and the library at Universal University
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 31 في هذه المجموعة.
فتح الحزمة
k this deck
16
For Exercises 3-18, determine which of the following best describes the relationship between the given objects: is-a , has-a, uses-a , none of the preceding.
Professors and employees at Universal University
Professors and employees at Universal University
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 31 في هذه المجموعة.
فتح الحزمة
k this deck
17
For Exercises 3-18, determine which of the following best describes the relationship between the given objects: is-a , has-a, uses-a , none of the preceding.
Employees and persons at Universal University
Employees and persons at Universal University
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 31 في هذه المجموعة.
فتح الحزمة
k this deck
18
For Exercises 3-18, determine which of the following best describes the relationship between the given objects: is-a , has-a, uses-a , none of the preceding.
Stacks and queues
Stacks and queues
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 31 في هذه المجموعة.
فتح الحزمة
k this deck
19
For Exercises 3-18, determine which of the following best describes the relationship between the given objects: is-a , has-a, uses-a , none of the preceding.
Stacks and ADTs
Stacks and ADTs
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 31 في هذه المجموعة.
فتح الحزمة
k this deck
20
For Exercises 3-18, determine which of the following best describes the relationship between the given objects: is-a , has-a, uses-a , none of the preceding.
Binary trees and trees
Binary trees and trees
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 31 في هذه المجموعة.
فتح الحزمة
k this deck
21
For Exercises 3-18, determine which of the following best describes the relationship between the given objects: is-a , has-a, uses-a , none of the preceding.
Binary trees and binary search trees
Binary trees and binary search trees
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 31 في هذه المجموعة.
فتح الحزمة
k this deck
22
For Exercises 3-18, determine which of the following best describes the relationship between the given objects: is-a , has-a, uses-a , none of the preceding.
vectors and containers
vectors and containers
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 31 في هذه المجموعة.
فتح الحزمة
k this deck
23
For Exercises 3-18, determine which of the following best describes the relationship between the given objects: is-a , has-a, uses-a , none of the preceding.
Computers and electronic equipment
Computers and electronic equipment
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 31 في هذه المجموعة.
فتح الحزمة
k this deck
24
For Exercises 3-18, determine which of the following best describes the relationship between the given objects: is-a , has-a, uses-a , none of the preceding.
Computers and operating systems
Computers and operating systems
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 31 في هذه المجموعة.
فتح الحزمة
k this deck
25
For Exercises 3-18, determine which of the following best describes the relationship between the given objects: is-a , has-a, uses-a , none of the preceding.
Computers and highway systems
Computers and highway systems
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 31 في هذه المجموعة.
فتح الحزمة
k this deck
26
For Exercises 3-18, determine which of the following best describes the relationship between the given objects: is-a , has-a, uses-a , none of the preceding.
Computers and CPUs
Computers and CPUs
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 31 في هذه المجموعة.
فتح الحزمة
k this deck
27
The following exercises ask you to develop classes or class templates. You should also write driver programs to test them as instructed in the programming problems at the end of this chapter.
Administrative employees are paid a salary, but they also receive a bonus at regular intervals during the year. Add a class Administrator to the Employee class hierarchy described in the text.
Administrative employees are paid a salary, but they also receive a bonus at regular intervals during the year. Add a class Administrator to the Employee class hierarchy described in the text.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 31 في هذه المجموعة.
فتح الحزمة
k this deck
28
The following exercises ask you to develop classes or class templates. You should also write driver programs to test them as instructed in the programming problems at the end of this chapter.
Factory workers are paid a certain amount for each unit they make and their total pay is the number of units produced times the pay per unit. Add a class Factory Employee to the Employee class hierarchy described in the text.
Factory workers are paid a certain amount for each unit they make and their total pay is the number of units produced times the pay per unit. Add a class Factory Employee to the Employee class hierarchy described in the text.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 31 في هذه المجموعة.
فتح الحزمة
k this deck
29
The following exercises ask you to develop classes or class templates. You should also write driver programs to test them as instructed in the programming problems at the end of this chapter.
Salespersons are paid a salary plus a commission on their sales; their total pay, therefore, is their salary plus the amount of their sales times the commission rate. Add a class Sales Person to the Employee class hierarchy described in the text.
Salespersons are paid a salary plus a commission on their sales; their total pay, therefore, is their salary plus the amount of their sales times the commission rate. Add a class Sales Person to the Employee class hierarchy described in the text.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 31 في هذه المجموعة.
فتح الحزمة
k this deck
30
The following exercises ask you to develop classes or class templates. You should also write driver programs to test them as instructed in the programming problems at the end of this chapter.
Add the abstract class Document to the Employee class hierarchy as described in the text.
Add the abstract class Document to the Employee class hierarchy as described in the text.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 31 في هذه المجموعة.
فتح الحزمة
k this deck
31
The following exercises ask you to develop classes or class templates. You should also write driver programs to test them as instructed in the programming problems at the end of this chapter.
Design LookAheadStack as a class template derived from a Stack class template. A look-ahead stack differs from a standard stack only in the push operation. An item is added to the stack by the push method only if it is different from the top stack element.
Design LookAheadStack as a class template derived from a Stack class template. A look-ahead stack differs from a standard stack only in the push operation. An item is added to the stack by the push method only if it is different from the top stack element.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 31 في هذه المجموعة.
فتح الحزمة
k this deck