#include <iostream>
#include <stdlib.h>
#define N 3
using namespace std;
class Vehicle_Service
{ private:
	int ak;
	double h;
	double cost;
	double total;
public:
	// default constructor
	Vehicle_Service()
	{ak=0; h=0.0; cost=0.0; total=0.0;}

	// constructor with parameters' list !!!! (input data)
	Vehicle_Service(int in_ak, double in_h, double in_cost, double in_total)
	{ ak=in_ak; 	h=in_h;  cost = in_cost;  total=in_total;
	}; // end input data


	int get_ak() {return ak;}
	double get_h() {return h;}
	double get_cost() {return cost;}
	double get_total() {return total;}

	void print()
	{ cout<<ak<<"  "<<h<<"   "<<cost <<"  "<<total<<endl;

	}; // end print
}; // end class definition


void main()
{ 
	Vehicle_Service a[N];
	int i,in_ak; double in_h, in_cost, in_total;

	// data entry
	for (i=0;i<N;i++)
	{	in_ak=rand()%9000 + 1000;
		in_h=(rand()%100+1)*1.0;
		in_cost=(rand()%1000+1)*1.0;
		in_total=(rand()%1500+1)*1.0;
		
		// EXPLICIT CALL TO CONSTRUCTOR with parameters' list !!!!!!
		a[i]=Vehicle_Service(in_ak, in_h, in_cost,  in_total);
		
	} // end for i
	cout<<"-------------------------------------------------"<<endl;
	
	for (i=0;i<N;i++) a[i].print();
	cout<<"--------------------end  print -------------------"<<endl;

	for (i=0;i<N;i++)
	{
		cout<<a[i].get_ak()<<"       ";
		cout<<a[i].get_cost()<<"     ";
		cout<<a[i].get_h()<<"    ";
		cout<<a[i].get_total()<<endl;
		cout<<"***********************************************"<<endl;
	}
} // end main
