文件名称:CPPexam9
-
所属分类:
- 标签属性:
- 上传时间:2013-11-22
-
文件大小:1006.8kb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
1. 声明 Point 类,有坐标_x,_y 两个成员变量;对 Point 类重载“++”(自增)、“--”(自减)运算符,实现对坐标值的改变。
2. 声明一个车(vehicle)基类,有 Run、Stop 等成员函数,由此派生出自行车(bicycle)类、汽车(motorcar)类,从 bicycle 和 motorcar 派生出摩托车(motorcycle)类,它们都有 Run、Stop 等成员函数。观察虚函数的作用。
1. 编写程序 Node.h 实现例 9-5 的节点类,并编写测试程序 lab9_1.cpp 实现链表的基本操作。
2. 编写程序 link.h 实现例 9-6 的链表类。在测试程序 lab9_2.cpp 中声明两个整型链表 A和 B,分别插入 5 个元素,然后把 B 中的元素加入 A 的尾部。
3. 编写程序 queue.h,用链表实现队列(或栈)类。在测试程序 lab9_3.cpp 中声明一个 整型队列(或栈)对象,插入 5 个整数,压入队列(或栈),再依次取出并显示出来。
-1 Point class declaration, coordinates _x, _y two member variables pairs Point class overloads " ++" (increment), " -" (decrement) operator to achieve the coordinate values change. (2) declare a car (vehicle) base class, with Run, Stop and other member functions, and derives a bike (bicycle), automobiles (motorcar) class derived from the bicycle and motorcar motorcycle (motorcycle) class, which are with Run, Stop and other member functions. Observe the role of virtual function. 1 Write a program to achieve cases 9-5 Node.h node classes and preparation of test procedures lab9_1.cpp realize list of basic operations. (2) Write a program link.h achieve cases 9-6 objectlist. In the test program lists lab9_2.cpp declare two integers A and B, five elements were inserted, and then B is added to A end of the elements. 3 programming queue.h, using chain queue (or stack) classes. In the test program lab9_3.cpp declare an integer queue (or stack) object, insert fiv
2. 声明一个车(vehicle)基类,有 Run、Stop 等成员函数,由此派生出自行车(bicycle)类、汽车(motorcar)类,从 bicycle 和 motorcar 派生出摩托车(motorcycle)类,它们都有 Run、Stop 等成员函数。观察虚函数的作用。
1. 编写程序 Node.h 实现例 9-5 的节点类,并编写测试程序 lab9_1.cpp 实现链表的基本操作。
2. 编写程序 link.h 实现例 9-6 的链表类。在测试程序 lab9_2.cpp 中声明两个整型链表 A和 B,分别插入 5 个元素,然后把 B 中的元素加入 A 的尾部。
3. 编写程序 queue.h,用链表实现队列(或栈)类。在测试程序 lab9_3.cpp 中声明一个 整型队列(或栈)对象,插入 5 个整数,压入队列(或栈),再依次取出并显示出来。
-1 Point class declaration, coordinates _x, _y two member variables pairs Point class overloads " ++" (increment), " -" (decrement) operator to achieve the coordinate values change. (2) declare a car (vehicle) base class, with Run, Stop and other member functions, and derives a bike (bicycle), automobiles (motorcar) class derived from the bicycle and motorcar motorcycle (motorcycle) class, which are with Run, Stop and other member functions. Observe the role of virtual function. 1 Write a program to achieve cases 9-5 Node.h node classes and preparation of test procedures lab9_1.cpp realize list of basic operations. (2) Write a program link.h achieve cases 9-6 objectlist. In the test program lists lab9_2.cpp declare two integers A and B, five elements were inserted, and then B is added to A end of the elements. 3 programming queue.h, using chain queue (or stack) classes. In the test program lab9_3.cpp declare an integer queue (or stack) object, insert fiv
(系统自动生成,下载前可以参看下载内容)
下载文件列表
9_1/node.h
9_1/array.txt
9_1/StdAfx.h
9_1/StdAfx.cpp
9_1/ReadMe.txt
9_1/Desktop_.ini
9_1/Debug/vc60.pdb
9_1/Debug/StdAfx.obj
9_1/Debug/Desktop_.ini
9_1/Debug/9_1.pdb
9_1/Debug/9_1.exe
9_1/Debug/
9_1/9_5.h
9_1/9_1.plg
9_1/9_1.opt
9_1/9_1.ncb
9_1/9_1.dsw
9_1/9_1.dsp
9_1/9_1.cpp
9_1/26+.h
9_1/
8_1/
8_1/8_1.cpp
8_1/8_1.dsp
8_1/8_1.dsw
8_1/8_1.ncb
8_1/8_1.opt
8_1/8_1.plg
8_1/Debug/
8_1/Debug/8_1.exe
8_1/Debug/8_1.obj
8_1/Debug/8_1.pdb
8_1/Debug/StdAfx.obj
8_1/Debug/vc60.pdb
8_1/ReadMe.txt
8_1/StdAfx.cpp
8_1/StdAfx.h
8_2/
8_2/8_2.cpp
8_2/8_2.dsp
8_2/8_2.dsw
8_2/8_2.ncb
8_2/8_2.opt
8_2/8_2.plg
8_2/Debug/
8_2/Debug/8_2.exe
8_2/Debug/8_2.obj
8_2/Debug/8_2.pdb
8_2/Debug/StdAfx.obj
8_2/Debug/vc60.pdb
8_2/ReadMe.txt
8_2/StdAfx.cpp
8_2/StdAfx.h
9_1/array.txt
9_1/StdAfx.h
9_1/StdAfx.cpp
9_1/ReadMe.txt
9_1/Desktop_.ini
9_1/Debug/vc60.pdb
9_1/Debug/StdAfx.obj
9_1/Debug/Desktop_.ini
9_1/Debug/9_1.pdb
9_1/Debug/9_1.exe
9_1/Debug/
9_1/9_5.h
9_1/9_1.plg
9_1/9_1.opt
9_1/9_1.ncb
9_1/9_1.dsw
9_1/9_1.dsp
9_1/9_1.cpp
9_1/26+.h
9_1/
8_1/
8_1/8_1.cpp
8_1/8_1.dsp
8_1/8_1.dsw
8_1/8_1.ncb
8_1/8_1.opt
8_1/8_1.plg
8_1/Debug/
8_1/Debug/8_1.exe
8_1/Debug/8_1.obj
8_1/Debug/8_1.pdb
8_1/Debug/StdAfx.obj
8_1/Debug/vc60.pdb
8_1/ReadMe.txt
8_1/StdAfx.cpp
8_1/StdAfx.h
8_2/
8_2/8_2.cpp
8_2/8_2.dsp
8_2/8_2.dsw
8_2/8_2.ncb
8_2/8_2.opt
8_2/8_2.plg
8_2/Debug/
8_2/Debug/8_2.exe
8_2/Debug/8_2.obj
8_2/Debug/8_2.pdb
8_2/Debug/StdAfx.obj
8_2/Debug/vc60.pdb
8_2/ReadMe.txt
8_2/StdAfx.cpp
8_2/StdAfx.h
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.