CSE111 Project
CSE111 Project
Submission details:
Date of Demonstration: 24th December, after the final exam. Room: UB80713
Rules:
This document contains all the information you will be provided with. The project is open-ended,
there is no “perfect” project/ answer that you can submit. This document can be updated with
time, to provide more clarification/ information. So please read this thoroughly and often. New
changes will be highlighted using different colors. Like this.
Your target is to implement the required features, alongside design at least 2 features
that you feel would be suitable for this project. You must use the 3 principles of OOP
discussed thoroughly in class (Encapsulation, Polymorphism, Inheritance) in your
project as much as you can, using Abstraction is not mandatory, but highly appreciated.
The use of Polymorphism is tricky and often ignored, but you will lose marks if you don’t use it.
You can refer to the following resources to better understand when to use which principle, why,
and how:
1. Class Diagrams
2. Encapsulation
3. Class methods
4. Polymorphism
5. Inheritance
Do NOT take input directly into constructors (as in don’t keep input statements inside __init__
function.
The concept of Class diagrams is very easy, even though it has not been discussed in class. Try
to start your project WITH A CLASS DIAGRAM first. Try to theoretically determine the classes
you will need, the variables they will contain and the methods that they will use- including the
parameters they take and data type they return. You can submit this class diagram document
as your extra documentation in the Submission form.
As your project progresses, you will learn and understand that your final solution is changing
from your original design, and that is okay. It will clarify the drawbacks of your original design,
and you can discuss those with me in your demonstration. This will also help you make
conscious decisions about your design, and I will definitely ask you WHY you designed
everything the way you did.
You are free to use any number of classes you need, I have only mentioned the
mandatory ones. Methods, return types, are all part of your design choices.
while True:
option = input("Input 1 to login, 2 to signup")
if option == '1':
user_name = input("Input Username:")
password = input("Input Password: ")
result = Account.CheckUsernamePassword(user_name, password)
#here result variable will be the object of the Account if username and
password matched, and it will be something else if the username and password did
not match
Project Topic:
Step 1:
Design a Log-in System. Your program will start by asking the user whether they want to create
a new account or log in to an existing account. If they choose to login, you must match their
username and password with existing accounts. Try to emulate a real log-in system as much as
you can: Proper error messages (if username and/or password doesn’t match), number of
wrong attempts allowed, etc. If they choose to create a new account, you must ask for proper
inputs to create a new account. Key points:
1. Make an Account class that will contain all relevant information of an Account object
2. Think about the security of each variable, should a password variable even have
Getter/Setter functions?
3. If someone chooses to make a new account, ask for relevant user inputs needed to
create a new account, then you must ask them to log in to the account again.
4. Passwords should never be saved in their original form. Implement an encryption
algorithm that will change the password before saving it. The encryption algorithm can
be as simple as: adding 2 to the ASCII code of each character and saving that [you can’t
use exactly this one as it’s given in the question], so do not worry about the difficulty of
implementing a complex encryption algorithm. As long as you are NOT saving the
password exactly as it was given, it's fine.
5. If you encrypt a password before saving it, you must decrypt that password before
matching it with a user-input password (when they try to log in). So you need to be able
to implement the algorithm that converts your encrypted password back into its original
form.
6. You will definitely need a method that matches a given input with an existing password
and returns the result. Your target is to check whether an Account object exists which
has the same username as the one given by the user, if that exists, match the object’s
password with the user’s given input
7. Make sure to keep an account_type variable. It can have 2 possible values: Student and
Staff. You will need this for step 2.
8. Think of an extra feature that can be implemented in this Log-in System.
9. After someone logs in, the options they get will depend on whether their account type is
Student or Staff
Try to finish Step 1 within the 1st week of December. You already have all the theoretical
knowledge you need to complete it.
Step 2:
Each account can be of two types: StudentAccount and StaffAccount. When someone creates a
new account and selects the account type as Student, they will not have any information
regarding courses, grades etc. Key points:
1. You must have a StudentAccount class. Remember, all StudentAccounts are Accounts,
but all Accounts are not StudentAccounts
2. If a Student has logged in, they should be able to do the following tasks (keep in mind
that they should be able to view their own information only):
a. View Course information
b. Update Semester information
On the other hand, a staff will be able to view all students’ information together. Key points:
3. You must have a StafftAccount class. Remember, all StaffAccounts are Accounts, but all
Accounts are not StaffAccounts
4. If a Staff has logged in, they should be able to do the following tasks :
a. View all Students’ COURSE information (Which information should you not
display here? Example: gender/ DOB of a student do not need to be displayed,
but their Name and ID should be)
b. Update own information
5. What is another feature that you can implement for either StudentAccount or
StaffAccount class?