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

BookmarkBookmarked What patterns or principles will your design use to separate

ID: 3583787 • Letter: B

Question

BookmarkBookmarked

What patterns or principles will your design use to separate the UIs from business objects?

The problem: Berta's Pizzeria needs a website where customers may order pizzas.

Description: Customers must register to use the website. Customers may order a small, medium or large sized pizza and select up to 3 toppings. Customers may choose delivery or carry out and add beverages and side items to their orders.

Website Requirements

R1. Customer registration

R1.1 The customer shall enter their information into a website registration form

R1.2 After a customer clicks the “Submit” button, the system shall store a cookie on the customer’s computer and send a verification email to the customer.

R1.3 The customer shall click the link in the verification email to verify their email address to finalize their registration.

R2. Customer order

R2.1 Customers shall have the ability to select pizza size

R2.2 Customers shall have the ability to select up to three pizza toppings

R2.2 The customer shall have the ability to add sides

R2.3 The customer shall have the ability to add beverages

R2.4 The customer shall have the ability to choose delivery or carryout

R3. Customer checkout

R3.1 The customer shall have the ability to review the order

R3.2 The customer shall have the ability to change the order and checkout again

R3.3 The customer shall have the ability to confirm the order

R3.4 The customer shall have the ability to enter payment information

R3.5 The website shall encrypt and store the customer’s payment information

R3.6 The customer shall have the ability to submit the order

R3.7 The system shall transfer the order to Berta’s order fulfilment system

R3.8 The system shall archive the order after submitting it to Berta’s system

R4. The website system processes the customer credit card

R4.1 The system shall send the customer's payment information to the processor through a secure internet connection

R4.2 The system shall process the payment and return an order confirmation number to the customer

R5. Berta’s website maintenance

R5.1 Authorized employees shall have the ability to add or remove menu categories

R5.2 Authorized employees shall have the ability to add or remove menu items

R5.3 Authorized employees shall have the ability to access automated reports

R5.4 Authorized employees shall have the ability to create custom reports that contains fields selected from a predetermined list of data fields.

Explanation / Answer

Customer Registration Form

<form accept-charset="utf-8" name="customerregistrationform" method="post" action="#">

                        <!--<div class="customerregistrationform">-->

                        <div class="customerregistration-default">

                       

                        <table width="450px" class="customerregistrationform"

                        <tr>

                        <td colspan="2">

                        <h2>Customer Registration Form</h2>

                        <p class="feedback_comments">An asterisk (<span class="required_star"> * </span>) indicates a mandatory field.</p><br />

                        </td>

                        </tr>

                        <tr>

                        <td valign="top">

                        <label for="Name">Name<span class="required_star"> * </span></label>

                        </td>

                        <td valign="top">

                        <input class="customer_registration_text" type="text" name="Name" id="Name" maxlength="100" />

                        </td>

                        </tr>

                        <tr>

                        <td valign="top">

                        <label for="Email">Email<span class="required_star"> * </span></label>

                        </td>

                        <td valign="top">

                        <input class="customer_textbig" type="text" name="Email" id="Email" maxlength="100" />

                        </td>

                        </tr>

        <tr>

                        <td valign="top">

                        <label for="Password">Password<span class="required_star"> * </span></label>

                        </td>

                        <td valign="top">

                        <input class="customer_textbig" type="text" name="Password" id="Password" maxlength="100" />

                        </td>

                        </tr>

                       

                       

                        <tr>

                        <td colspan="2" >

                        <div class="antispammessage">

                        To help prevent automated spam, please answer this question

                        <br /><br />

                                    <div class="antispamquestion">

                                       <span class="required_star"> </span>

                                       3 + 2= &nbsp;

                                       <input type="text" name="AntiSpam" id="AntiSpam" maxlength="100">

                                    </div>

                        </div>

                        </td>

                        </tr>

                        <tr>

                        <td colspan="2" align="center">

                       

                       

                        <input type="submit" value="Cancel" id="form_submit_button" class="cancel_button" />

                        <input type="submit" value="Register" id="form_submit_button" class="register_button" />

                        </td>

                        </tr>

                        </td>

                        </tr>

                        </table>

                       

                        </form>Form submitting data we have to create database

CREATE TABLE `customer_registration_form` (

`id` int(11) NOT NULL auto_increment,

`name` varchar2(100) NOT NULL '',

`password` varchar2(50) NOT NULL '',

`email` varchar(50) NOT NULL '',

)

For verification email:

function send_email($info){

         

    $body = format_email($info,'html');

    $body_plain_txt = format_email($info,'txt');

  $message ->setSubject('You are registered');

  $message ->setTo(array($info['email'] => $info['name']));

   $message ->addPart($body, 'text/html');

  $result = $mailer->send($message);

  return $result;

     

}

Customer Order Form

<form accept-charset="utf-8" name="customerorderform" method="post" action="#">

                        <!--<div class="customerorderform">-->

                        <div class="customerorder-default">

                       

                        <table width="450px" class="customerorderform"

                        <tr>

                        <td colspan="2">

                        <h2>Customer Order Form</h2>

                        <p class="feedback_comments">An asterisk (<span class="required_star"> * </span>) indicates a mandatory field.</p><br />

                        </td>

                        </tr>

                        <tr>

                        <td align="center">

                       

<label for="Name">Size of Pizza<span class="required_star"> * </span></label>

<select>

<option value="Pizza A">Pizza A</option>

<option value="Pizza B">Pizza B</option>

<option value="Pizza C">Pizza C</option>

<option value="Pizza D">Pizza D</option>

</select>                     

</td>

                       

                        </tr>

                       

<tr>

                        <td align="center">

                        <label for="Pizza Topping">Pizza Topping<span class="required_star"> * </span></label>

<select>

<option value="Pizza A">Topping A</option>

<option value="Pizza B">Topping B</option>

<option value="Pizza C">Topping C</option>

</select>                   

</td>

                       

                        </tr>

<tr>

                        <td align="center">

                        <label for="Add sides">Add sides<span class="required_star"> * </span></label>

<select>

<option value="Add sides">Yes</option>

<option value="Add sides">No</option>              

</select>

</td>

                       

                        </tr>

<tr>

                        <td align="center">

                        <label for="Add sides">Add beverages<span class="required_star"> * </span></label>

<select>

<option value="Add beverages">Yes</option>

<option value="Add beverages">No</option>                   

</select>

</td>

                       

                        </tr>

                       

<tr>

                        <td align="top">

                        <label for="Choose">Choose<span class="required_star"> * </span></label>

<form action="onsubmit">

<div c="radio center">

<input type="radio" name="choose" value="carryout"> Carryout<br>

<input type="radio" name="choose" value="Delivery"> Delivery <br>

</div>

</form>                      

</td>

                       

                        </tr>

                        <tr>

                        <td colspan="2" align="center">

                        <br /><br />

                       

                       

                        <input type="submit" value="Cancel" id="form_submit_button" class="cancel_button" />

                        <input type="submit" value="Register" id="form_submit_button" class="register_button" />

                        </td>

                        </tr>

                        </td>

                        </tr>

                        </table>

                       

                        </form>

<label for="Name">Size of Pizza<span class="required_star"> * </span></label>

<select>

<option value="review">Review</option>

<option value="change">Change</option>

<option value="confirm">Confirm</option>

<option value="payment">Make Payment</option>

<option value="submit the order">submit the order</option>

</select>

Customer Checkout Form

<p align="center">

<form name="jump" class="center">

<select name="menu">

<option value="#">Select an option</option>

<option value="/review.shtml">Review</option>

<option value="/change.shtml">Change</option>

<option value="/confirm.shtml">Confirm</option>

<option value="/payment.shtml">Payment</option>

</select>

<input type="button" value="GO">

</form>

</p>

For order confirmation email:

function send_email($info){

         

    $body = format_email($info,'html');

    $body_plain_txt = format_email($info,'txt');

  $message ->setSubject('Your order confirmation number is …..');

     $message ->addPart($body, 'text/html');

  $result = $mailer->send($message);

  return $result;

     

}

This is the table for required Pizza database. Authorize person can change, edit or modify this.

CREATE TABLE Pizza
(
SizeofPizza int(1000),
PizzaTopping int(3),
AddSides int(255),
Beverages varchar2(255),
);

Customer Registration Form

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