dg

dg



-N.

w


Ex. 1. (20 p.).

Write a part of class template implementing a vector of elements of a parameterized type with a fixed size set during a declaration (construction). The vector should throw two kinds of exceptions for denoting invalid size of vector and for denoting invalid index of vector. The exception types should be type parameters of the template. The thrown exceptions should be constnicted by appropriate constructors without parameters. The part of codę should contain

•    all necessary data members of the template,

•    a constructor of vector throwing appropriate exception

•    the subscript operator throwing appropriate exception (the second one) Write a piece of codę with exception handling.

Eł. 2. (20 p.)

Let us have two classes. class X (

int data.;

static X* originals[MAX]; atafclo X* copiaa[MAX]; static int nuaOfOriginals;


Wyszukiwarka

Podobne podstrony:
48 (20) No part of this publication may bc rcproduced in whole or in part. or storcd in a rctneval s
w25d through the brigandine showing layers of cloth, and part of the exterior with fabric removed. J
1264233p0045906690324?5172905 o 1. You wil! hear part of an interview with Lukę Harding, a young stu
REIDER PART 219 Pectoralis major, palpation of, 39, 39 rupture of, 20-21,2/ testing of, 39,42-
362 (20) 335 FingerRings the form of a sexfoil, and which is likewise from London, forms part of the
EXIT TEST 1 10 cz 2 20    I like the.......of this song. A special effects B role C l
00058 *78c8eee8ef03439be90f7a748f77a0 57Adaptive Hierarchical Bayesian Kalman FilteringRelation to
skanowanie0082 (2) comprehension on the part of the students, they will not be able to reproduce it;
§1CHAPTER 1 General Provisions 1.    Part I of the Regulatiorrs on Opening, Holding a
174 RIKEN Accel. Próg. Rep. 24 (1990)V-2-20. Performance Test of Lumped NEG PumpS.R. In,1 T. Maruyam

więcej podobnych podstron