Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

cost to cover the Toom. Ticlude an opuon to Clear Selecuois. Flace botn the type

ID: 3890133 • Letter: C

Question

cost to cover the Toom. Ticlude an opuon to Clear Selecuois. Flace botn 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. Create an application for a Pizza Delivery Company. You might check out the graphical user interface shown in Figure 10-21. Your solution does not need to resemble this one; however, it might give you some ideas. You must provide a place for the user to enter their contact information (i.e., address phone number, and e-mail) and some of the contact information should be displayed when an order is placed 10. Your application should have a picture logo and company name. Provide selections such as Small, Medium, and Large for size. Allow users to select from at least a dozen items to place on their pizza. You might consider offering different types of sauce (i.e., tomato, pesto, or no sauce), different types of crust, different specialty types of pizza (Supreme, Veggie, etc.). BlE CREATIVE! You can also sell wings, bread sticks, chicken strips, or something else of your choosing. Consider offering beverages You must display the price for the order and allow the user to change their mind while they are ordering and reset the order form. Experiment, explore, change properties, and then review the .Designer.cs file. Copyright 2013 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights n Type here to search

Explanation / Answer

<!doctype html>

<html>
<head>

<TITLE>Inside Visual C++ HTML Form 1</TITLE>

</head>

<body>

<h1></h1>

<center><b color="#0000FF" face="Verdana" size="4">Welcome to Vicky'sPizza</b></center>

<p><b color="#FF0000" face="Tahoma">Enter your order.</b> </p>

<form action="scripts/myex34a.dll?ProcessPizzaForm" method="POST">

<P>Your Name: <INPUT type="text" name="name" value> </P>

<P>Your Address: <INPUT type="text" name="address" value> </P>

<P>Number of Pies: <INPUT type="text" name="quantity" value="1"> </P>

<P>Pizza Size: </P>

<MENU>

    <LI><INPUT type="radio" name="size" value="8">8-inch </LI>

    <LI><INPUT type="radio" name="size" value="10">10-inch </LI>

    <LI><INPUT type="radio" name="size" value="12" checked>12-inch </LI>

    <LI><INPUT type="radio" name="size" value="14">14-inch </LI>

</MENU>

<P>Toppings: </P>

<P><INPUT type="checkbox" name="top1" value="Pepperoni" checked> Pepperoni

<INPUT type="checkbox" name="top2" value="Onions"> Onions

<INPUT type="checkbox" name="top3" value="Mushrooms"> Mushrooms

<INPUT type="checkbox" name="top4" value="Sausage"> Sausage </P>

<P><EM>(you can select multiple toppings)</EM> </P>

<P><INPUT type="submit" value="Submit Order Now"><INPUT type="reset"> </P>

</form>

</body>

</html>

Optional Parameters:

The DLL's ProcessPizzaForm() function reads the parameter values and produces an HTML confirmation form, which it sends to the customer. Here is part of the function's code:

   *pCtxt << "<form action="myex34a.dll?ConfirmOrder" method=POST>";

        *pCtxt << "<p><input type="hidden" name="name" value="";

        *pCtxt << pstrName << "">"; // xref to original order

        *pCtxt << "<p><input type="submit" value="Confirm and charge my credit card">";

        *pCtxt << "</form>";

        // Store this order in a disk file or database, referenced by name

    }

    else {

        *pCtxt << "You forgot to enter name or address. Back up and try again. ";

    }

    EndContent(pCtxt);

Processing the Confirmation:

void CMyex34aExtension::ConfirmOrder(CHttpServerContext* pCtxt, LPCTSTR pstrName)

{

    StartContent(pCtxt);

    WriteTitle(pCtxt);

    *pCtxt << "<p>Our courteous delivery person will arrive within 30 minutes. ";

    *pCtxt << "<p>Thank you, " << pstrName << ", for using CyberPizza. ";

    // Now retrieve the order from disk by name, and then make the pizza.

    // Be prepared to delete the order after a while if the customer doesn't confirm.

    m_cs.Lock(); // gotta be threadsafe

    long int nTotal = ++m_nTotalPizzaOrders;

    m_cs.Unlock();

    *pCtxt << "<p>Total pizza orders = " << nTotal;

    EndContent(pCtxt);

}