Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Create a class "Skirt" which has variables for model name, material name, lenght and width of the material and percentage of the remnant. The sewing fabric sews 3 different models of skirts. Find out which one of these 3 models needs the biggest quantity of the material and which one has the smallest percentage of the remnant left.
- */
- #include <iostream>
- using namespace std;
- #include <string>
- //----------------------------------------------------
- class Skirt
- {
- private:
- int modelname, materialname, length, width, patternpercentage;
- public:
- Skirt() {}
- ~Skirt(){}
- Skirt(int modelnameValue, int materialnameValue, int lengthValue, int widthValue, int remnantpercentageValue);
- int TakeModelname();
- int TakeMaterialname();
- int TakeLength();
- int TakeWidth();
- int TakeRemnantpercentage();
- };
- //----------------------------------------------------
- int main()
- {
- cout << "Sewing Fabric\n";
- int modelname, materialname, length, width, remnantpercentage;
- cout << "Write model name: " << endl;
- cin >> modelname >> endl;
- cout << "Write material name: " << endl;
- cin >> materialname >> endl;
- cout << "Write the length of the material: " << endl;
- cin >> length >> endl;
- cout << "Write the width of the material: " << endl;
- cin >> width >> endl;
- cout << "Write the percentage of the remnant: " << endl;
- cin >> remnantpercentage >> endl;
- return 0;
- }
- // ---------------------------------------------------
- Skirt::Skirt(int modelnameValue, int materialnameValue, int lengthValue, int widthValue, int remnantpercentageValue) :
- modelname(modelnameValue), materialname(materialnameValue), length(lengthValue), width(widthValue), remnantpercentage(remnantpercentageValue)
- { }
- // ---------------------------------------------------
- int Skirt::TakeModelname()
- {
- return modelname;
- }
- // ---------------------------------------------------
- int Skirt::TakeMaterialname()
- {
- return materialname;
- }
- // ---------------------------------------------------
- int Skirt::TakeLength()
- {
- return length;
- }
- //----------------------------------------------------
- int Skirt::TakeWidth()
- {
- return width;
- }
- //----------------------------------------------------
- int Skirt::TakeRemnantpercentage()
- {
- return remnantpercentage;
- }
- //----------------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment