Create a Windows application for purchasing floor covering A

Create a Windows application for purchasing floor covering. Allow the length and width (feet and inches) of a room to be entered. Be sure to include program statements that will keep your program from crashing if they enter nonnumeric characters for the room dimensions. Have a control that displays different types along with the prices of floor covering. Using the tab control, provide selections such as Hardwood, Carpet, and Laminate. On each tab allow the user to select a type and price. Include, for example, options like Oak, Maple, Walnut, and Cherry Hardwood floors with prices such as $34.95 per square yard for Oak and $41.95per square yard for Cherry. After the users enter their room dimensions and selects the floor covering and price, display the total cost to cover the room. Include an option to clear selections. Place both the type of floor covering and the price in a single control, such as a ComboBox and use string manipulation techniques to strip the price out of the string.

Solution

the program statements to prevent it from crashing.I have a formula for getting SF, but I actually that in squre yards I can\'t get any formulas to work in the combobox to place the price into the labels on each tab screen.

        This includes string manipulation

#include <iostream>

#include <iomanip>

       

using std::cin;

using std::cout;

using std::endl;

using std::setw;

       

int main()

{

   const int MAX(20);                     

   double gas[ MAX ];                     

   long miles[ MAX ];                     

   int count(0);                          

   char indicator(\'y\');                   

       

   while( (\'y\' == indicator || \'Y\' == indicator) && count < MAX )

   {

      cout << endl << \"Enter gas quantity: \";

      cin >> gas[count];                  

      cout << \"Enter odometer reading: \";

      cin >> miles[count];                

      

      ++count;

      cout << \"Do you want to enter another(y or n)? \";

      cin >> indicator;

   }

       

   if(count <= 1)                    

{

      cout << endl << \"Sorry - at least two readings are necessary.\";

      return 0;

   }

       

      for(int i = 1; i < count; i++)

{

     cout << endl

          << setw(2) << i << \".\"            

          << \"Gas purchased = \" << gas[i] << \" gallons\"

          << \" resulted in \"                 //

          << (miles[i] - miles[i - 1])/gas[i] << \" miles per gallon.\";

}

   cout << endl;

return 0;

}

the program statements to prevent it from crashing.I have a formula for getting SF, but I actually that in squre yards I can\'t get any formulas to work in the combobox to place the price into the labels on each tab screen. This includes string manipulation.

Program:

#include <iostream>

#include <iomanip>

using std::cin;

using std::cout;

using std::endl;

using std::setw;

int main()

{

   const int MAX(20);                     

   double gas[ MAX ];                     

   long miles[ MAX ];                     

   int count(0);                          

   char indicator(\'y\');   

   while( (\'y\' == indicator || \'Y\' == indicator) && count < MAX )

   {

      cout << endl << \"Enter gas quantity: \";

      cin >> gas[count];                  

      cout << \"Enter odometer reading: \";

      cin >> miles[count];

      ++count;

      cout << \"Do you want to enter another(y or n)? \";

      cin >> indicator;

   }   

   if(count <= 1)                    

{

      cout << endl << \"Sorry - at least two readings are necessary.\";

      return 0;

   }

      for(int i = 1; i < count; i++)

{

     cout << endl

          << setw(2) << i << \".\"            

          << \"Gas purchased = \" << gas[i] << \" gallons\"

          << \" resulted in \"                 //

          << (miles[i] - miles[i - 1])/gas[i] << \" miles per gallon.\";

}

   cout << endl;

return 0;

}

Create a Windows application for purchasing floor covering. Allow the length and width (feet and inches) of a room to be entered. Be sure to include program sta
Create a Windows application for purchasing floor covering. Allow the length and width (feet and inches) of a room to be entered. Be sure to include program sta
Create a Windows application for purchasing floor covering. Allow the length and width (feet and inches) of a room to be entered. Be sure to include program sta

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site