ми і можливостями проектування додатків в даному середовищі.
Список літератури
1. Реалізація інтерфейсу з використання Borland C ++ Builder за курсом Об'єктно-орієнтоване програмування raquo ;, Рязань, 2004 р.
комп'ютер збірка програма деталь
Програми
Тексти основних класів
Клас BaseGoods
# include lt; vcl.h gt;
# pragma hdrstop
# include BaseGoods.h
# include ChoiseComp.h
# pragma package (smart_init) :: Goods (float parPrice, AnsiString parManufacturer, AnsiString parModel, int parGuarantee, float parWeigth)
{= parPrice;=parManufacturer;=parModel;=parGuarantee;=parWeigth;
} Goods :: Show (int parNumber)
{ gt; SGComp- gt; Cells [1] [parNumber + 1]=FormatFloat ( 0.00 , Price); gt; SGComp- gt; Cells [2] [parNumber + 1 ]=Manufacturer; gt; SGComp- gt; Cells [3] [parNumber + 1]=Model; gt; SGComp- gt; Cells [4] [parNumber + 1]=Guarantee; gt; SGComp- gt; Cells [5] [parNumber + 1]=FormatFloat ( 0.000 , Weigth);
} Goods :: price ()
{Price;
} Goods :: model ()
{Model;
} Goods :: manufacturer ()
{Manufacturer;
} Goods :: guarantee ()
{Guarantee;
} Goods :: weigth ()
{Weigth;
}
Додаток 2
Клас Components
# pragma hdrstop
# include BaseGoods.h
# include ComputerComponents.h
# include ChoiseComp.h
# pragma package (smart_init) :: Components (float parPrice, AnsiString parManufacturer, AnsiString parModel, int parGuarantee, float parWeigth, int parFrequencySpeed): Goods (parPrice, parModel, parManufacturer, parGuarantee, parWeigth)
{= parFrequencySpeed;
} Components :: Show (int parNumber)
{:: Show (parNumber); gt; SGComp- gt; Cells [6] [parNumber + 1]=FrequencySpeed;
} Components :: frequencySpeed ??()
{FrequencySpeed;
}
Додаток 3
Клас Peripheral
# pragma hdrstop
# include BaseGoods.h
# include RemoteTerminalUnits.h
# include ChoiseComp.h
# pragma package (smart_init) :: Peripheral (float parPrice, AnsiString parModel, AnsiString parManufacturer, int parGuarantee, float parWeigth, int parDistance): Goods (parPrice, parModel, parManufacturer, parGuarantee, parWeigth)
{= parDistance;
} Peripheral :: Show (int parNumber)
{:: Show (parNumber); gt; SGComp- gt; Cells [6] [parNumber + 1]=Distance;
} Peripheral :: distance ()
{Distance;
}
Додаток 4
Клас Processor
# pragma hdrstop
# include lt; stdio.h gt;
# include lt; math.h gt;
# include ComputerComponents.h
# include Processor.h
# include ChoiseComp.h
# pragma package (smart_init) * Good; * Component; :: Processor (float parPrice, AnsiString parManufacturer, AnsiString parModel, int parGuarantee, float parWeigth, parFrequencySpeed, AnsiString parAbout, float parTechnology, AnsiString parNest, int parCache, int parCountOfNucleus, parPressure, float parCritTemp):Components(parPrice,parManufacturer,parModel,parGuarantee,parWeigth,parFrequencySpeed)
{= parAbout;=parTechnology;=parNest;=parCache;=parCountOfNucleus;=parPressure;=parCritTemp;
} Processor :: Show (int parNumber)
{:: Show (parNumber); gt; SGComp- gt; Cells [7] [parNumber + 1]=About; gt; SGComp- gt; Cells [8] [parNumber + 1]= FormatFloat ( 0.000 , Technology); gt; SGComp- gt; Cells [9] [parNumber + 1]=Nest; gt; SGComp- gt; Cells [10] [parNumber + 1]=Cache; gt; SGComp- gt; Cells [11] [parNumber + 1]=CountOfNucleus; gt; SGComp- gt...