ex39 and ex40

finished ex39 and new ex40 OOP must read more about classes and etc..