Hello, if you have any need, please feel free to consult us, this is my wechat: wx91due
Assignment 2:
An Online Car Rental System using AJAX and JSON
Introduction
The website should enable users (i.e., potential customers) to
• Browse cars by type or brand,• Search for cars using keywords,• Check basic info and availability of a car,• Make a rental request (reservation) for an available car,• Cancel or confirm a rental order.
Objectives
- Learn about design of practical websites with rich interactive features for a specific application.
- Learn how to design customised data structures using JSON.
- Learn how to load, parse, and store JSON files using JavaScript.
- Learn how to set, update, and delete cookie and/or session.
- Learn how to use AJAX technique to send and retrieve data from the web server asynchronously without interfering with the display and behaviour of existing web pages.
Visual Components
1) Website logo
There should be a logo for the website. The logo should appear on all pages of the website.
There should be a search box allowing users to look up cars by using keywords.
Cars should categorised by type (e.g., Sedan, Wagon, SUV) and brand (e.g., Ford, Mazda, BMW).
Users can click a category (if non-empty) to view all the cars in the category.
Search box and car categories should appear on all except the reservation and order confirmation pages.
When multiple cars are shown on a page (e.g., the homepage, the page showing cars by category, or search results), the cars should be aligned to grid (i.e., a nice tabular format).
Each car should show the key information, e.g., car model, image, price per day, and availability.
Beside each car, there is a button named “rent” through which users can enter the reservation.
User can view the car that she/he intends to ren (car model, price per day) and edit the quantity to rent, start date and end date of the renting, and the total price for the rental duration.
User can 1) cancel this reservation, 2) proceed to place an order for the car, or 3) simply leave this page.In the third case, the reservation information will be kept in Cookie/Session; so, the user can later resume the previous reservation. When the user presses the “rent” button next to another car, the reservation will change for making the rental booking for the new car.
User must provide name, mobile number, email address and valid driver’s license available to place an order. All are compulsory for the order to be placed.
User can only rent one car model at a time.
This confirmation will trigger an update of the JSON file and MySQL database.
Data Structures
- The total number of cars available for each car model should be 1, 2 or 3 by default.
Type |
Brand |
Car Model |
Image |
Mileage |
Fuel type |
Seats |
Quantity |
Price/day |
Description |
sedan |
Toyota |
Camry 2013 |
xxx |
10000 |
petrol |
5 |
2 |
$120 |
xxxxxxx |
Requirements
1) Upload a zip file of your source code to Canvas, then click “Submit Assignment”.