Web Final Paper

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

University of Sialkot, Pakistan

Faculty of Computing and IT


Final Examination- Fall 2020
Course Code: CS-2262 Course Title: Introduction to Web Application
Development
Teacher’s Name: Total Marks: 40 Marks
Date & Time: Total Time: 2:30 Hours
Student’s Name: Roll No.:
Invigilators Signature:

Question 1: (5+5+5+5=20 Marks)

Create a table “books” in the database (name:ebookshop) with the following fields

Table 1.

• Write a code to establish a connection with the data source you want to use.
• Create a webform request for the user to check the book information by id.
• Write a SQL query and execute the query via the SQL SELECT Statement and SQL UPDATE
Statement.
• Process the query result.

Question 2: (5+5+5+5=20 Marks)

The ‘XYZ’ company need a website for their organization. Its database and business tier are as
follows.

Database Tier:
• Use SQL database to store data on each worker as it is entered. Meeting our base requirements,
you will need at least the following fields: the worker’s Id, the worker’s first name, the worker’s
last name, the worker’s pay, and workers’ bonus percentage.
• Decisions you make regarding the types used, the properties of these fields, primary keys, and any
additional fields needed should be made carefully and with justifications in mind.
Page 1 of 2
• Your database must be persistent, meaning that it is maintained the next time the program runs.

Business Tier:
• The system should have a user-friendly form to enter and store worker’s data.
• There is one new validation requirement for our workers: they must enter a first name and
worker’s pay.
• The system should be able to calculate the worker’s gross pay (whereas gross pay= worker’s pay
+ workers’ bonus)
• The system should display workers processed information in tabular form.
• Class methods may generally require some adjustments to interact properly with the database, and
new ones may be introduced.

o Add a class method that writes a worker’s information to the database that could be called
from your form(s).
o You will also need a class method to somehow read all workers from the database to
display them on the HTML Table, The HTML table should have the following table heads
the worker’s Id, the worker’s first name, the worker’s last name, the worker’s pay,
workers’ bonus percentage, and workers’ gross pay.
o You may wish to abandon the summary variables and instead read the relevant values
(overall total pay) from the database.

According to the given requirements solve the following questions:

1. Steps to configure WebHost builder and the required services to be added in startup class are
properly listed.
2. Domain Model Class(s) and their respective properties are declared with proper validations,
getters, setters, and access specifiers.
3. Database context is registered, and Domain Model classes are included.
4. Client and server-side code are listed to fulfill the above-mentioned business requirement.

Page 2 of 2

You might also like