Abc Assignment Help

Build Website for Imaginary Three Sisters Hotel Assessment Answer

Web Development Project

This project is to build a website for the imaginary Three Sisters Hotel that is going to serve the Blue Mountains area, after the Covid-19 pandemic is possibly under control by the end of this year. This website should allow customers to search and book rooms, and allow administrators to manage bookings and view statistics, etc.

You are suggested to read the entire specification first, and then start with the tasks that are already covered by our lectures.

Creating project in Visual Studio (VS)

Since the project needs to support authentication for customers and administrators, it needs the  ASP.NET  Identity package in the very beginning. To include this package in your project, you should carefully follow the slides in our Lecture 9, which is released on vUWS already.

During the above process, you should name the SQLite database file "ThreeSisters.db". In this project, you are going to use it to store data not only for authentication, but also for the Three Sisters Hotel.

Moreover, you should follow the slides in Lecture 9 to scaffold the source code of the Identity package into your project.

Finally, when you run this project, you should see the Register and Login links appear in the right of the navigation bar.

Two roles of administrators and customers

Besides maintaining users’ credentials, the Identity package can also assign users with different roles. You are required to use this package to divide the users of this website into two roles: administrators and customersYou should create only one user with the 'administratorsrole, and set up his/her username to be 'admin@threesisters.com' and his/her password to be 'P@ssw0rd' when the web application starts. On the other hand, all users registering into the website by clicking the 'Register' link mentioned in the Section 3 below should be assigned the 'customers' role.

Moreover, source code should be added to the Pages/Shared/_Layout.cshtml file such that, after logging in, administrators and customers only see links that they should have access to in the  navigation bar. (see the details in the Section 3 below)

NB: We will discuss the above in our Lecture 09. You can start to implement them after Lecture 9.

Navigation and layout

All pages in your website should share a consistent layout, which has a navigation bar in the top.

This should be achieved by using _Layout.cshtml and Bootstrap.

The links contained in the navigation bar should be dynamic. The detailed requirements are as follows:

  • The links for non-logged-in users should include the following: Home, Register, and Login. Note  that the Login link here is used by both customers and administrators. You should have  source code to your project to determine the role of a logged-in user after he/she logs in.
  • The links for logged-in customers should include the following: Home, My Details, Search Rooms, Book A Room, My Bookings and Logout.
  • The links for logged-in administrators should include the following: Home, Manage Bookings,

Statistics and Logout.

Note: How to make the links dynamic are discussed in Lecture 9. You can start with include all the links in the navigation bar, and make them dynamic after Lecture 9.

Home page

The Home link in the navigation bar leads to this page, which should display:

  • A carousel below the navigation bar. This carousel should rotate four pictures about the Three Sisters Hotel. The pictures can be about buildings, rooms, dining, etc. and can be downloaded from Internet and then modified. When searching images on the Internet, you should use royalty-free image websites such as Pixabay and  Unsplash to  avoid copyright issues. Each picture needs to have a caption when being displayed by the carousel.
  • Two columns below the carousel. The left column should display a welcome message and a brief introduction to the hotel. The right column should display a list of useful links for the  Blue Mountains area (e.g., a link to Katoomba weather, a link to Blue Mountains City Council, etc.). The two columns should stack up when the viewport width is less than 768px (consider the proper column class to use in Bootstrap).

Models

This website should use the following three Model classes. Each class has certain properties. The requirements on these properties are also described below. You should apply appropriate data types and data annotations to fulfil these requirements.

You should fully create these Model classes first, and then scaffold them one by one, and then migrate them to database together. You are suggested to do these by following our Lecture 8.

NB: During scaffolding, you should choose the ApplicationDbContext used by Identity as the DbContext (i.e., select the database used by Identity). During migration, in case you see the complaint that SQLite does not support certain operation, you should comment out the migration code in the Up() and Down() methods related to that operation. These two methods can be found in the .cs file under the 'Migrations' folder. 

Room.cs

The Room class models the rooms in Three Sisters Hotel. It should have the following properties.


Property
Data Type
Requirements
ID
int
Primary key;
Level
string
Meaning the level of this room; Exactly one character of ‘G’, ‘1’, ‘2’, or ‘3’. Required.
BedCount
int
Meaning the number of beds in the room; can only be 1, 2, or 3.
Price
decimal
Meaning the price per night; Between $50 and $300.
TheBookings
ICollection<Booking>
This is a navigation property 

After scaffolding and migrating this class into database, you should use the https://localhost:xxx/Rooms web interface to manually populate the Room table with the following data. (NB: For the convenience of marking, you must use the data below.)


ID
Level
BedCount
Price
1
1
1
56.30
2
1
2
66.30
3
1
3
76.80
4
1
2
60.80
5
2
1
56.30
6
2
2
66.30
7
2
3
76.80
8
2
2
60.80
9
3
1
56.30
10
3
2
66.30
11
3
3
76.80
12
3
2
60.80
13
G
1
56.30
14
G
2
66.30
15
G
3
76.80
16
G
2
60.80

 Customer.cs 

The Customer class models all customers who have ever registered with Three Sisters Hotel. It should have the following properties.


Property
Data Type
Requirements
Email
string
Primary key; Required; Valid email address; Since its name


doesn't follow the convention to be the primary key, you



Answer

For solution, connect with our online professionals. 

Customer Testimonials