CS 2316 Homework 9a GT Pizza Login Due: Wednesday November 6th Out of 100 points. Premise

Similar documents
CS 2316 Homework 9a GT Room Reservation Login

CS 2316 Homework 9a Login Due: Friday, November 2nd, before 11:55 PM Out of 100 points. Premise

CS 2316 Homework 9b GT Room Reservation

CS 2316 Homework 9b GT Thrift Shop Due: Wednesday, April 20 th, before 11:55 PM Out of 100 points. Premise

CS 1803 Pair Homework 3 Calculator Pair Fun Due: Wednesday, September 15th, before 6 PM Out of 100 points

CS 2316 Individual Homework 5 Joint Probability Out of 100 points

CS 1803 Pair Homework 4 Greedy Scheduler (Part I) Due: Wednesday, September 29th, before 6 PM Out of 100 points

CS 2316 Individual Homework 4 Greedy Scheduler (Part I) Due: Wednesday, September 18th, before 11:55 PM Out of 100 points

CS 1803 Pair Homework 10 Newsvendor Inventory Policy Due: Monday, November 29th before 6:00 PM Out of 100 points

CS 1803 Individual Homework 2 Conditionals & Loops Due: Wednesday, February 2 nd, before 6 PM Out of 100 points

Ascii Art. CS 1301 Individual Homework 7 Ascii Art Due: Monday April 4 th, before 11:55pm Out of 100 points

This homework has an opportunity for substantial extra credit, which is described at the end of this document.

CS 1803 Individual Homework 2 Conditionals & Loops Due: Wednesday, September 8th, before 6 PM Out of 100 points

CS Homework 4 Employee Ranker. Due: Wednesday, February 8th, before 11:55 PM Out of 100 points. Files to submit: 1. HW4.py.

CS 1301 Pair Homework 4 Conditionals & Loops Due: Friday, October 1, before 6 PM Out of 100 points

CS 1803 Individual Homework 1 Python Practice Due: Wednesday, January 26th, before 6 PM Out of 100 points

CS 2316 Pair 1: Homework 3 Enigma Fun Due: Wednesday, February 1st, before 11:55 PM Out of 100 points

CS 1301 Individual Homework 3 Conditionals & Loops Due: Monday February 8 th before 11:55pm Out of 100 points

CS Homework 4 Lifeguard Employee Ranker. Due: Tuesday, June 3rd, before 11:55 PM Out of 100 points. Files to submit: 1. HW4.py.

CS 1301 Homework Robot Web Writer

CMSC 201 Fall 2016 Homework 6 Functions

CS 2316 Individual Homework 1 Python Practice Due: Wednesday, January 20 th, before 11:55 PM Out of 100 points

WEB ASSIGN SHORT INTRODUCTION

Reading Wonders: Importing Students & Adding Students to your Class

Visit the TA Helpdesk (schedule posted on class website)

CS 2316 Individual Homework 1 Python Practice Due: Wednesday, August 28th, before 11:55 PM Out of 100 points

Functional Programming, Classes, and Recursion!

CS 1301 Pair Homework 2 Conversions Due: Monday January 27th, 2014, before 11:55pm Out of 100 points Files to submit: hw2.py

Go to SQA Academy the website address is

Steps in the screenshots correspond to the numbers in the headings.

Blackboard Essentials

Website: Set up for a free account by clicking on the Sign up button in the middle of the page (if you don t already have one)

OnePass Frequently Asked Questions

Employer Guide to the UCLan Careers System

Question Possible Points Earned Points Graded By GUI 22 SQL 24 XML 20 Multiple Choice 14 Total Points 80

Parent Canvas Accounts

Joule 101: Getting Started and the Basics University of Pikeville Information and Technology Services

Individual Homework- Create Your Own Password! Due: September 15 th, 2014 Before 11:55PM Out of 100 points

Welcome to the Contra Costa Community College District and InSite

CS 2316 Exam 3 Fall 2011

IPT NEW ACCOUNT INSTRUCTIONS (STUDENT)

PowerSchool 7.x Student Information System

PowerSchool Parent Portal Access - Account Setup Instructions

The aim of this guide is to offer specific support for the use of features and tools within Blackboard. This guide includes information on:

Power School Parent Portal User Guide

Revised as of 2/26/05. This version replaces the version previously distributed in class

HHH Instructional Computing Fall

Faculty Guide to Blackboard

My Te Kura Online Learning Basics for Students

TALENT Part 1 page 1 of 1

Book IX. Developing Applications Rapidly

Moodle Tutorial. Tak Auyeung. April 5, 2006

Introduction to Enlighten e-billing

Your (printed!) Name: CS 1803 Exam 3. Grading TA / Section: Monday, Nov. 22th, 2010

GeographyPortal Instructor Quick Start World Regional Geography Without Subregions, Fifth Edition Pulsipher

Moodle 2.2 Student User Guide My Private Files

Registering for classes Help

2017 Accenture. All Rights Reserved. PWM USER GUIDE

Requirements Document

Interim Registration

GradeConnect.com. User Manual

PsychPortal Instructor Quick Start for Myers, Psychology 10e In Modules

Homework 8 Lights, Camera, Robot Action! Due: Friday, April 13th, before 11:55 PM EST Out of 200 points Files to submit: {filmingcode.

Welcome to Blackboard

Supplier Response Guide. Access Supplier Portal to Review and Respond to Bid Opportunities

Cmpt 101 Lab 1 - Outline

Perch Documentation. U of M - Department of Computer Science. Written as a COMP 3040 Assignment by Cameron McKay, Marko Kalic, Riley Draward

CS 112 Project Assignment: Visual Password

EnviroPortal Instructor Quick Start for Friedland, Relyea, & Courard-Hauri Environmental Science: Foundations and Applications

PLAR e-portfolio Instructions. This is easier and faster than it looks! To create your e-portfolio, you will need to move through the following steps.

Blackboard 9.1

MTAT Introduction to Databases

Server Manager User and Permissions Setup

The following online tools will make it easier to know about school events and be immediately updated when changes to the online calendar occur.

Getting Started with Moodle WEB: elearning.wit.ie PHONE:

Top Notch, 2e. Instructor Walkthrough GETTING STARTED ACCESS

User Guide for Patients

GoLive will first ask you if your new site will be for one individual or a work group; select for a Single User, and click Next.

One of the fundamental kinds of websites that SharePoint 2010 allows

Faculty Web Page Management System. Help Getting Started

Secure Transfer Site (STS) User Manual

Faculty Quick Guide to Blackboard. Blackboard Version 9.1. Christine Paige Educational Technology Specialist.

University of Southern California. GRS For Instructors Submitting Final Grades

eformat Parent Portal User Guide Electronic Free or Reduced Meal Application Tracking

Navigating the Sona Sign-Up System: A Guide for Elementary Psychology Students

MMS Parent and Student Portals version

ARUP Connect Login User Manual November 2017

QuickQuote Algoma Hardwoods, Inc. Internet Estimating System Quick Start Guide

Developer s Tip Print to Scale Feature in Slide

Transitioning Teacher Websites

Faculty Administrator. Last Updated: March 31, 2015

Additionally, you may be able to change your password and enter challenge questions to be used if you forget your username or password.


New Website User Manual

Microsoft Word Advanced Skills

Palisades School District PowerSchool Parent Portal Guide

CCIS. Critical Care Information System. Login Guide. Version /12/2015. Prepared By: CCIS Provincial Implementation Team.

Getting Started in CAMS Enterprise

WGTC Basic BANNER Navigation

Read every line of the exam sheet before programming!

Transcription:

CS 2316 Homework 9a GT Pizza Login Due: Wednesday November 6th Out of 100 points Files to submit: 1. HW9.py This is an INDIVIDUAL assignment! Collaboration at a reasonable level will not result in substantially similar code. Students may only collaborate with fellow students currently taking CS 2316, the TA's and the lecturer. Collaboration means talking through problems, assisting with debugging, explaining a concept, etc. You should not exchange code or write code for others. For Help: - TA Helpdesk Schedule posted on class website. - Email TA's or use T-Square Forums Notes: Don t forget to include the required comments and collaboration statement (as outlined on the course syllabus). Do not wait until the last minute to do this assignment in case you run into problems. Read the entire specifications document before starting this assignment. Premise This homework is the first of a two-part assignment in which you will do some real world applications with databases and GUIs. For this first part of the assignment, you will be building a two page GUI that offers the user the chance to login, or in the case that the user does not have an account yet, register and then log in. You ll find this quite applicable to building programs with user accounts, and potentially your future CS4400 project. Although this program does not require much new information, it does test simple SQL query and insertion abilities as well as new coding practices to create two GUI windows that can be opened and closed with the click of a button. This new information may take some understanding, so please do not wait until the last minute to begin this assignment.

Database Format Information The database for this part of the assignment only has 1 table of users, conveniently called PizzaUsers. CREATE TABLE PizzaUsers (USERNAME VARCHAR(20) PRIMARY KEY, FirstName TEXT, Password TEXT NOT NULL) The code above was used to create the table. As can be seen, the USERNAME and Password are non-null variables, but FirstName can be left blank and Null will be assigned instead of a name. Note that the USERNAME and FirstName are different. A USERNAME is required, but a FirstName is not. A USERNAME can only be stored in the database if it is 20 characters or less. Multiple GUI Pages Multiple GUI window may not seem difficult, but it takes a certain method to show new windows while hiding old ones. It will involve the creation and button execution of several helper methods to transition between windows. Your init method, for instance, should not actually create a GUI window, but instead call a method to do so. There will be two methods for GUI creations, two windows for writing and retrieving user information, and several helper methods for transitioning between the windows. It s up to you as to how many transition methods you will need, but one per transition should be enough. In these transition methods, you will.withdraw() a certain TopLevel window instance created for a certain window, while calling a method that deiconifies a different TopLevel instance for a different window. This means that you will be using one main Tk() instance for your main window and a TopLevel window instance for your other windows. Method Name: init This method will only be used to call your first GUI creation method for the login page window. Method Name: LoginPage This method is called to create a new instance of your GUI class. This method is responsible for arranging and initializing your GUI. You should crate a GUI which looks like the one below:

You may generate this window however you wish, but it is highly suggested that you use the grid layout manager. Things to note about the GUI you see: The top image can be any logo that is GT related. You must use an image found anywhere online that allows webscraping and retrieve the image using the urllib.request module. (in other words, you must download and display the image dynamically from the URL, you may not include the image as a file!) The labels are sticky to the east and the entry boxes are width 30 and state normal. The window is titled Login Clicking on the Register button should call the Register method Clicking on the Login button should call the LoginCheck method Method Name: Register This method will simply create a new GUI window for filling out registration information. The GUI should look like this: You may generate this window however you wish, but it is highly suggested that you use the grid layout manager. Things to note about the GUI you see:

The top image is the same as the one in the login page. Each entry is width 30 and state normal The labels are all sticky to the west The window is titled GtPizza New User Registration Clicking on the Cancel button will call a helper method (which you could call BackToLogin for example...) to hide this GUI instance and redisplay the LoginPage window. Clicking on the Register button calls the RegisterNew method. Method Name: Connect Parameters: None Return Value: Database connection Description: This method will use a try/except statement to attempt to connect to the database. If it cannot connect, have it display a message box asking the user to check their Internet connection. This method returns the database connection object. Use the database username and password we provided you. Method Name: RegisterNew Parameters: None Return Value: None Description: This method will take the entries from the register page and put them into the database. You must check that both passwords entered in the two entries are the same (match) and that the username and password entries are not left blank. The password must contain at least one number and at least one uppercase letter. Use message boxes to describe any problems with the way the register page was filled out. Also, be sure to check to see if the username is already used within the database. Note that text in our database is considered the same regardless of case, so SummetJ and summetj would be considered the same username. You will need to check for existing usernames in a caseinsensitive way if you are using Python to do the check instead of using the SQL database engine with an SQL query. If so, use a message box to tell the user that the username already exists, and don't try and add it again! If everything is ok, you can insert the information into the database. (Hint: The FirstName entry can be left blank. In this case, no FirstName should be inserted into the database). Once registered, a message box should tell the user that they are now registered and a helper method should be called to hide the registration window and display the Login window. Be sure to.commit() the database when you re done inserting data! Method Name: LoginCheck

Parameters: None Return Value: None Description: This method will check to see if what was typed into the login page matches any users currently in the database. To do this, you call the Connect method, create a cursor from the database connection that is returned, and check what was passed to see if any matches are returned. You may also want to get the first name of the user to use on the 2nd part of this homework later (hint hint). If it finds no matches, it should display a message box explaining that the user entered an unrecognizable username/password combination. If it does match, you should display a message box saying you logged in successfully. You should also close the login GUI window, as you are finished with it. A sample gtpizza login that already exists in the database is username: gburdell3 and password: Password123. You can try using this to test you login code before you have your registration code working. Please do not mess up this account information or other students will not be able to successfully use it for testing.

Grading: You will earn points as follows for each piece of functionality that works correctly according to the specifications. LoginPage GUI 20 GUI has image at top 6 GUI has all components with proper characteristics 4 Login button works as described 4 Register button works as described 4 GUI uses message boxes for errors 2 RegisterPage GUI 20 GUI has image at top 6 GUI has all components with proper characteristics 4 Register works as described 4 Cancel brings user back to login page 4 GUI uses message boxes for errors 2 LoginCheck() 25 Uses Connect() properly 5 Correctly checks to find matching user 10 Uses message boxes for errors with user match 5 Closes GUI with match 5 RegisterNew() 25 Uses Connect() properly 5 Correctly puts user in database 10 Uses message boxes for errors with user entries 4 Checks for usernames already taken 4 Commits db when done 2 Connect() 10 Correctly connects to database and returns database 10