Algonquin College CST8256 Lab 4: Web Forms and Master Page Integration

Verified

Added on  2019/09/20

|8
|897
|340
Homework Assignment
AI Summary
This assignment solution addresses the requirements of Algonquin College's CST8256 Web Programming I Lab 4, focusing on ASP.NET master pages and web forms. The lab involves creating four web form pages using a provided master page, dynamically setting image URLs based on the page, and implementing functionality similar to previous labs. The solution includes integrating images, a stylesheet, and a class library. The core of the assignment involves creating pages for course information and student registration, including handling different student types (full-time, part-time, and co-op) and sorting students by name and type. The implementation requires using classes from a pre-compiled class library and creating a comparer class to sort students as specified. The CoopStudent class must implement the TuitionPayable method, calculating tuition based on co-op fees and course hourly fees. The solution demonstrates the use of ASP.NET master pages, web forms, and data manipulation within a web application context.
Document Page
CST8256 Web Programming Language I
Lab 4
Objective
1. Use ASP.NET Master Page
2. Set Master Page properties inside content page.
Due Date
See Canvas posting for the due date. To earn 5 points, you are required:
1. Complete the lab as required.
2. Zip your website folder into one zip file and submit the zip file to the Blackboard before
the due date. Any late submission will have 2 points deducted automatically.
3. Demo me your lab work during the following week’s lab session. If for any reason, you
missed a lab, you can make up the demo in a future lab session.
Preparation
1. Download and unzip “Lab 4 Resources.zip” file. This file contains the following
resources needed to complete the lab:
An ASP.NET master page “AlgonquinMasterPage”
Two images “SAT.png” and “SMD.png”,
A style sheet “SiteStyles.css”
A class library “Lab4Entities.dll”
2. After creating a new ASP.NET empty web site Lab4, you will need to add the master
page to the web site. Right click on the web site and select “Add > Existing Item …”
3. Create an App_Themes folder inside the web site; Right click on the web site and select
“Add > Add ASP.NET Folder > Theme”
4. Add the images and the style sheet into App_Themes folder.
5. To use the class library “Lab4Entities.dll”, you have to add the reference to it from the
web site as:
CST8256 Web Programming Language I
Page 1
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
After completion, your Visual Studio Solution should look like the following:
CST8256 Web Programming Language I
Page 2
Document Page
Requirements
You are required to create 4 web form pages inside this web site.
1. Add three web forms, SatFirstPage.aspx, SatSecondPage.aspx and SatThirdPage.aspx,
using master page AlgonquiMasterPage.master.
CST8256 Web Programming Language I
Page 3
Document Page
2. Study master page AlgonquinCollege.Master. As you can see, it has an asp image control
as below:
<asp:image runat="server" id="programLogo"/>
3. All three pages should dynamically set this asp image control’s ImageUrl to the path of
the image “SAT.png”.
The three pages should function similar to your lab 2. You can copy and paste most of
your lab 2 code. After completion, the pages from this web site should look like:
CST8256 Web Programming Language I
Page 4
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
4. On the third page, next to the “Clear Session” button is button “Go to Registration”.
When “Go to Registration” button is clicked, the application navigate to a Course
Information page to let the user to enter the course data (course number, course name and
weekly hours) into the system if no course data have ever been entered into the system:
This page should dynamically set this asp image control’s ImageUrl to the path of the
image “SMD.png”.
Similar to lab 3, if a course information has been entered previously, the user will be
presented with a page for entering student registration information as described below in
5. You can copy and pasta some of your lab 3 code.
CST8256 Web Programming Language I
Page 5
Document Page
5. Add another page using the same master page “AlgonquinMasterPage.master” or another
panel to “SmdCoourseRegistration.aspx” page for users to enter students registered to the
course entered previously.
As shown in the above screen capture, the page accepts three types of students: full time,
part time and co-op students depending on the selection of the radio button.
When displaying the registered students, the students are sorted by name, for the students
having the same name, they are sorted by full time, followed by part time and then co-
op.. If two or more students have the same name and the same type, they are sorted by the
student ID (number).
Implementation Notes
1. In this lab, you will use the classes defined in the pre-compiled class library,
Lab4Entities.dll. This class library contains the definition of the four classes as
shown in the following UML class diagram:
CST8256 Web Programming Language I
Page 6
Document Page
CST8256 Web Programming Language I
Page 7
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
2. The student class implements interface IComparable to sort the students by name.
However, this implementation lists the students with the same name randomly which is
not what we want. You will have to create a comparer class with which a list of student
can be sorted as required:
Sort students by name alphabetically.
For those students with the same name, list the full time students first, followed by
the part time students and then followed by the co-op students.
For those students with the same name and the same type, the students are sorted by
their student ID (aka Number).
3. You will need to create a new class CoopStudent inheriting from the base class Student.
At minimum The CoopStudent class must implement the abstract method
TuitionPayable( ) defined in the base class in such a way as:
TuitionPayable = Co-op Fee
+ (Weekly Hours of the Registered Courses) * CourseHourlyFeeRate
Where
The Co-op Fee is a constant $300.
The CourseHourlyFeeRate is a static property of Course class.
CST8256 Web Programming Language I
Page 8
chevron_up_icon
1 out of 8
circle_padding
hide_on_mobile
zoom_out_icon
[object Object]