0% found this document useful (0 votes)
46 views6 pages

IT8118 Midterm Exam Instructions and Procedures

Uploaded by

ahmed KHLIFI
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
46 views6 pages

IT8118 Midterm Exam Instructions and Procedures

Uploaded by

ahmed KHLIFI
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

IT8118 Midterm Exam Instructions and procedures

Part 1: Moodle Quiz: (10 questions x 5 marks each = 50 marks)


The following learning outcome will be tested:
• Propose an appropriate technology for a particular problem
• Use object-oriented techniques to design and implement custom database entity classes

Complete the Moodle quiz using Safe Exam Browser. Note: there is a time limit of 15 minutes for this at the
beginning of the exam.

Part 2: Practical Exam:

From your H:\ Drive, Open the folder with the practical exam package, then double click Chinook.sln. If
prompted, open the solution using Visual Studio 2022.

Question 1 – Visual Studio Class Library project. (30 marks)


The following learning outcome will be tested:
• Use object-oriented techniques to design and implement custom database entity classes

Open the project called ChinookBusinessObjects inside the Visual Studio Solution. Complete the project
according to the instructions in the following pages.

Question 2 – Visual Studio Forms project. (220 marks)


The following learning outcomes will be tested:
• Design and implement desktop applications that access and manipulate a database
• Manage a multi-tier application which uses custom entity classes to access and manipulate a database

Open the project called Chinook inside the Visual Studio Solution. Complete the project according to the
instructions in the following pages.

Complete all tasks as per the instructions below and save all your work.

At the end of the exam, your entire work (which includes the .sln file, and both projects) as well as the cover
page with your Name and Student ID should be on the H: Drive.

Reminder: Take constant backups of your work. Your uncompressed folder inside H:\ Drive will be considered
your final submission.

Total marks (Moodle Quiz + Practical Exam) (300 marks)


Weighted /30

Page 1 of 6
Practical Exam
IMPORTANT NOTES
• Make sure you have installed the Chinook database on your local PC, using the ChinookDatabaseScript.sql
file. Select (localDB)\MSSQLLocalDB server or host when installing the database.

This is the diagram of the database you will be working with:

Track
TrackId
Name Album
Genre AlbumId AlbumId
GenreId GenreId Title
Name UnitPrice ArtistId Artist
ArtistId
FirstName
LastName

• Before you start coding you MUST CHANGE the connection string in the class library to the correct
server/host and database on your local machine.

• Note that if you forget this step the existing database connection string will not work and thus you will not
be able to test your code.

• You can refer to the General Troubleshooting Tips at the end of this file in case you faced any unexpected
errors.

Question 1 [30 marks]


Instructions:

Open the project called ChinookBusinessObjects inside your Visual Studio Solution. This is a Class Library
project containing existing working code.

• Set the connection string code that already exists in the class library to connect to the Chinook
database on your local PC’s local server. [8 marks]

Do not change any existing code. Your task is to add 1 new property and an override as described below,
which will later be used in a desktop Forms application in Question 2.

• In Artist entity, and add a new Property called FullName, which will concatenate and return the
FirstName and LastName. [14 marks]
• In Genre entity, and add a ToString override, to display the Genre name by default [8 marks]

Question 2: [220 marks]


General Tips:

− The Chinook project contains 2 forms with controls. You will not need to add any new controls to the
forms or change the existing controls.
− The task is to successfully implement the logic of the interface described below by making use of the
ChinookBusinessObjects Class Library.
− You must make use of the new Property in the Class Library which you created in Question 1.
− Your solutions should work and must be coded according to professional coding standards with a high
level of code quality.

Page 2 of 6
Instructions:

Overall Project – General Criteria: [35 marks]


• Reference the Class Library ChinookBusinessObjects in the Chinook project. [5 marks]
• Add comments your code. At least 15 good quality meaningful comments are expected throughout
your project. [30 marks]

Form 1 (frmHome): [76 marks]


Description: List all the Albums from the database and allow the user to filter them or select one and navigate
to other forms.

• Make sure to include any references or class level variables you need
• On form load, you need to:
o Populate the Drop Down List with data from the database. Make sure to display the FullName
of the Artist.
o Populate all Albums in the Data Grid View (considering a reusable approach), using Projection
to have the same column names and values as displayed in the screenshot below [AlbumID,
Title, Artist, TracksCount], where Artist will show the full name, and TracksCount will calculate
how many tracks are inside the album.

• When the user clicks Filter, the grid view is filtered (considering a reusable approach) either by:
o Name: find the albums that contain the text written in their title

Page 3 of 6
o Or, by Artist: find the albums that are published by the selected artist

o When the user clicks Reset, all filter controls will be emptied, and gridview reset to show all
albums.
• Implement the View Tracks button which, when pressed, passes the selected Album to the second
form (frmTracks) using the best method of your choice.
• Include error handling / validations and follow best coding practices.

Form 2 (frmTracks): [109 marks]


Description: In the Tracks form, you should retrieve all Tracks from the Album selected in the previous form
and display them in the data grid view. You should also display the album artist and album names, implement
Insert & Delete functionality, and calculate total price as described below.

• Make sure to include any references or class level variables you need, and to retrieve the Album
selected and passed from the previous form
• On form load, you need to:
o Display the selected Album Name, and Artist Name at the top

Page 4 of 6
o Populate all Tracks in the Data Grid View for the selected Album considering a reusable
approach (No need for projection. You can simply hide columns 2,3,5 from the grid view after
you bind the data source)
o Calculate the total price for the album, by adding the UnitPrice of all tracks inside it.

• Implement the Insert functionality:


o Check that Unit price entered is decimal, and should between 0 and 100, otherwise display an
error message:

o If no errors, insert a new Track to the same Album selected, show success message, and
refresh the grid view as well as the total price (considering a reusable approach):

• Implement the Delete functionality:


o Add a message to confirm, then delete the selected Track

o Refresh the gridview as well as the total price (considering a reusable approach)
• Include error handling / validations and follow best coding practices.

End of Instructions Document. Good Luck!

Page 5 of 6
Appendix: General Troubleshooting Tips
If you face any issues while working on your project, please consider the following troubleshooting tips:

1. If you got any error messages related to Resx files blocked, you will have to manually unblock all .Resx
files in your project (by opening the project in file explorer > right click the .Resx files, Properties > tick
Unblock > Apply/Ok) to resolve the issue.

2. If you receive any error message related to Database connection issue, database does not exist, or you
do not have permission to access the Database, check that you have executed the database from the
“.sql” file provided with the exam package, verify it exists from SQL Server Database Explorer view, and
verify that your connection string is correct.

3. If you got any error messages related to the Form Designer cannot be loaded, Right Click on the Tab >
close all tabs in Visual Studio:

Open the Form again and check if the issue persists.

Note: Never change or update the Designer.cs file of any form otherwise the form can get corrupted.

4. Optionally, after you are done with the exam, to make your overall Project files size smaller:
Before you close Visual Studio, Right click on your solution from Solution Explorer > Clean Solution.

Now your overall file size will be much smaller.

Page 6 of 6

You might also like