• Nie Znaleziono Wyników

Program components, STL

N/A
N/A
Protected

Academic year: 2021

Share "Program components, STL"

Copied!
1
0
0

Pełen tekst

(1)

DPOB LI0 Object programming - classes 6

This document contains information about laboratory exercises.

Object programming - classes 6

Subjects - Program components, Standard Template Library.

1. Program components.

1. Open file Supermarket.cpp.

2. Define and initialize two variables (T AX,P ROM OT ION ). First from them should store the value of tax (called in Polish VAT) for every product added to basket. Second variable should store the value of promotion given to Customers that buy products of overall value more than 300.

3. Change value of products in basket that it will be enlarged by VAT tax.

Give promotion in CashDesk for every Customer that have in basket product for value higher than 300.

4. Create new project and add to it file Supermarket.cpp.

5. Move declaration of classes to appropriate header files ∗.h 6. Move definitions of classes to appropriate files ∗.cpp.

7. In header files use variables (T AX,P ROM OT ION ) defined in the main file. Use keyword extern.

2. Standard Template Library

1. Create vector of Customers and vector of CashDesks. Add to each vector at least three different objects.

2. Write a function that process every Customer from vector at given Cash- Desk. Let the declaration of this function be as below:

process(vector<Customer> wektor, CashDesk kasa)

3. Using function transform process all Customers from vector in such a way that every Customer would go to a CashDesk with the smallest account turnover (smallest profits).

3. Do it yourself tasks

Look at documentation at webpage http://www.cplusplus.com/

1. Write to file information about Customers and CashDesks.

2. Read form file description of Customers and CashDesks.

1

Cytaty

Powiązane dokumenty

Let us now recall the notion of α-proper forcing for a countable ordinal α saying that, given an ∈-chain of length α of countable elementary sum- bodels of some large enough structure

For general k the proof is very long and involved (it is worth mentioning that the proof offered by Marcinkiewicz and Zygmund has a lacuna filled by Fejzic and Weil [3]).. The

The problem has been considered only for local vector fields and the full and positive answer is known whenever X has a nonvanishing germ.. From now on the notation X(R n ) will be

In Section 3 we extend Noether’s Theorem to a result about minimizing trajectories of a family of Hamiltonians of class C 1 , and explain why this result does not extend to families

We now follow Green’s walk of projective resolutions until we reach a vertex v 1 , where (note that the graph is locally embedded into the plane) the final edge on the walk is

The proposition (and Lemma 0.3) shows that in order to find a finitely generated group of subexponential growth and with a threading tuple we may consider only periodic groups with

One of its corner stones is the Erd˝os–Rado theorem which says that if κ, µ are arbitrary cardinals then the complete graph on a large enough set has the property that whenever

However, we use instead a forcing construction, which seems to be somewhat simpler: We will work in an iterated forcing extension, and use a ∆-system argument to ensure that