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

Create an application for a Pizza Delivery Company. You might check out the grap

ID: 3680080 • Letter: C

Question

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. 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.). BE 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.

Explanation / Answer

Hi below i have written application sample function for your reference,

HTML>

<HEAD>

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

</HEAD>

<BODY>

<H1></H1>

<CENTER><B><FONT color="#0000FF" face="Verdana" size="4">Welcome to Vicky'sPizza</FONT></B></CENTER>

<H1></H1>

<P><FONT color="#FF0000" face="Tahoma">Enter your order.</FONT> </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);

}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote