Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

H1 Since some of you may be without the textbook, I have decided NOT to use the assignments from the text, which actually is good

H1

Since some of you may be without the textbook, I have decided NOT to use the assignments from the text, which actually is good for you as it gives you more freedom and flexibility while giving me more interesting pieces of work to grade.

For this assignment I would like you to create an online store. There is an images folder with images you can use (in the module called Student Data Files), or there are lots of images on the web. Decide what you will be selling - two or three items will be sufficient. Just make a pretty page. Then we need to practice what you have just learned in Chapter1 so far, which means whatever you did in Lab1.

Use functions wherever possible.

1. Add prompts to get the buyer's name, phone, and email address (three prompts) . Display this information using document.write in a new window or use an alert

2. Add buttons to select the item required . All items should have different prices, and as yet you don't know how to use if else. However by clicking on the button for a particular item you can set the cost depending on which item they choose. You could put the image on the button , or you could have a button and an image - you would need to let the user know they needed to click a button to say how many they wanted.

Then you need to display the item requested, the quantity, and the total price (don't forget the dollar sign). You will need to put this html file as well as the images in a folder and zip it and submit. You will lose points if the images are linked to your computer and don't display for me, so verify it all works before submitting.

Example

image text in transcribed image text in transcribed image text in transcribed

image text in transcribed

image text in transcribed

H2

Building on H1. Include a check for the email address. This should prompt the user to re-enter the email address and check the second entry with the first to confirm they are the same. If they are different, output a message to that effect. If they are the same, output the name, phone and email to a small window.

For each item you sell, have a different price for different features OR have it in different sizes with different prices. For example, an ice cream cone or a sweater can come in different sizes. If your site is a cinema, you could have different prices for matinees. (Basically I want you to be able to handle if/else). Output to a small window.

Note: Comparison is mentioned in Chapter 2, but if/else is in Chapter 3, so I put the Chapter 3 PowerPoints in the module in case you needed them - but it is basically the same as in java or python. example:

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

H3

For this homework, we are going to tweak H2. If I made some comments about the appearance of H2, you should fix that first as I will only make the same remarks again (and cut points again).

You should put your html file, your css (if you used one), and your images all in a folder and zip it and upload it. It is your responsibility to verify your images open and are not linked to your machine. Easiest way to verify this is to copy your folder to some other location on your machine and verify your page still loads correctly.

1. Something similar to #1 on the lab. When you collect the users name, phone number, email, trap the user in a loop until both email addresses are the same. DO NOT ask the user to enter their name and phone again just the email address.

2. In each instance where you ask the user how many items they want, trap them in a loop until they give you a whole, positive number (there is a slide in the PowerPoints for this).

3. When you ask what size, or whether new or used, or (in my case) Weekend or weekday lessons, trap them in a loop until they give you a valid option.

4. Allow the user to order many items. For example, with my site they can have 4 weekday lessons on Happy, 2 weekend lessons on Happy, 3 weekend lessons on Buster.

5. Add a button which, when clicked, calls a function to calculate the cost for all of these (you may need to use parameters and/or global variables), and display the results in a table.

a. The table should list each item ordered in one column, the size or choice (in my case Weekend or Weekday) in other columns, and the cost of this item in the last column. After all items have been listed, put the total cost in the last row of the table.

b. This may be easier to understand if you look at my solution in the video.

Example:

image text in transcribed

image text in transcribed

please state in the steps which parts are html and css for the answers

Welcome to Mehta's Riding School We offer individual riding lessons at the following rates On the horse called Happy (a) $60 per lesson And on the horse called Buster @$100 per lesson Welcome! Please tell us your name We of rates And on the horse called Buster @ $100 per lesson And on the horse called Buster aQ \$100 per lesson this page says How many lessons do you want on Happy We of ] I rates And on the horse called Buster (a) \$100 per lesson On the horse called Happy (a) $60 per lesson And on the horse called Buster $$100 per lesson Welcome to Mehta's Riding School We effer individual riding lessens at the following rates On the horse called Happy (a, S60 per lesson ( $80 on weekends) And on the horse called Buster (a) $100 per lesson (\$120 on weekends) On the horse called Happy (a) S60 per lesson ( $80 on weekends) And on the horse called Buster (a) $100 per lesson (\$120 on weekends) We ofrer inarviauat raing ressons at the ronowing rates On the horse called Happy (a \$60 per lesson ( $80 on weekends) And on the horse called Buster (a) $100 per lesson (\$120 on weekends) On the horse called Happy (a) S60 per lesson (\$80 on weekends) And on the horse called Buster (a) $100 per lesson (\$120 on weekends) On the horse called Happy (a) S60 per lesson (\$80 on weekends) And on the horse called Buster (a) $100 per lesson (\$120 on weekends) On the horse called Happy (a) S60 per lesson (\$80 on weekends) And on the horse called Buster (a) $100 per lesson (\$120 on weekends) We ofrer marviauat raing ressons at the rourwing rates On the horse called Happy @ $60 per lesson (\$80 on weekends) And on the horse called Buster (a) \$100 per lesson (\$120 on weekends) Welcome to Mehta's Riding School We offer individual riding lessons at the following rates On the horse called Happy @ $60 per lesson ( $80 on weekends) And on the horse called Buster @ $100 per lesson ( $120 ou weekends) Thank you for your order

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle Autonomous Database In Enterprise Architecture

Authors: Bal Mukund Sharma, Krishnakumar KM, Rashmi Panda

1st Edition

1801072248, 978-1801072243

More Books

Students also viewed these Databases questions