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

Similar documents
CS 2316 Homework 9b GT Room Reservation

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

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

CS 2316 Homework 9a GT Room Reservation Login

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

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

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

CS 2316 Individual Homework 5 Joint Probability 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

Ascii Art. CS 1301 Individual Homework 7 Ascii Art Due: Monday April 4 th, before 11:55pm 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, September 8th, before 6 PM Out of 100 points

CS 1803 Individual Homework 2 Conditionals & Loops Due: Wednesday, February 2 nd, 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 1301 Pair Homework 4 Conditionals & Loops Due: Friday, October 1, before 6 PM Out of 100 points

Functional Programming, Classes, and Recursion!

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

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

CMSC 201 Fall 2016 Homework 6 Functions

CS 1301 Homework Robot Web Writer

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 Pair Homework 2 Conversions Due: Monday January 27th, 2014, before 11:55pm Out of 100 points Files to submit: hw2.py

Homework 2. Due 4:00pm, Wednesday, February 13, Installation and Handin 2

As your databases continue to evolve, you will need to incorporate advanced queries and reports. This chapter addresses how to create and use action

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

INFO 1103 Homework Project 2

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

EE 422C HW 6 Multithreaded Programming

Visit the TA Helpdesk (schedule posted on class website)

Fall CSEE W4119 Computer Networks Programming Assignment 1 - Simple Online Bidding System

CS 051 Homework Laboratory #2

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

Homework 2: Translating between the ER and relational models Due at 5pm on Wednesday, April 25

Spring CS Homework 2 p. 1. CS Homework 2. To practice with PL/SQL stored procedures and functions, and possibly exception handling.

Honors Introduction to C (COP 3223H) Program 5 Pizza Shack Inventory and Finances

CMSC 201 Spring 2017 Homework 4 Lists (and Loops and Strings)

CSCI 1301: Introduction to Computing and Programming Spring 2019 Lab 10 Classes and Methods

University of British Columbia Okanagan. COSC Project Design

INTRODUCTION. This guide aims to help you make the most of your web presence. RETURN TO TOP eusa.ed.ac.uk/activities 1

PayPal Home Support Search PayPal Developer Central Search. Developer Home Partner Solutions How to Library Training Community

Carroll Tire Online USER GUIDE Version 2b June 2009

CS Homework 7 p. 1. CS Homework 7. Problem 1 - START THIS A.S.A.P. (in case there are PROBLEMS...)

CSE 544 Principles of Database Management Systems

Step 1. Login to your B2B Account

Copyright 2018 MakeUseOf. All Rights Reserved.

Your Cart User Manual v3.6

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

Congratulations on Becoming a New Coaches Website Owner!

This is a two week homework; it is twice as long as usual. You should complete the first half of it by November 6.

Society Profile. Guidance

How to create a What If simulation in SAP Analytics Cloud

Premium POS Pizza Order Entry Module. Introduction and Tutorial

Cart32 Store Builder User Manual

Project Description MyBay Project

ICT IGCSE Databases (Access) A database is a collection of data or information stored in a logical format.

Algorithm Design and Analysis Homework #4

MS Office 2016 Excel Pivot Tables - notes

Tobacco Products Manufacturer s and Importer s Report

CSE 1325 Project Description

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

HOMEWORK 7. M. Neumann. Due: THU 8 MAR PM. Getting Started SUBMISSION INSTRUCTIONS

CSCI 585- Database Systems Spring 2008 Homework Assignment 2 Due: Tuesday, April

Ajax Cart Pro extension for Magento 2

Pinnacle Cart User Manual v3.6.3

CREATING EVENTS & EVENT TICKETS

Webshop Plus! v Pablo Software Solutions DB Technosystems

Announcements. Outline UNIQUE. (Inner) joins. (Inner) Joins. Database Systems CSE 414. WQ1 is posted to gradebook double check scores

CS 341 Spring 2014 HW #8. Policy: Individual *or* teams of 2 electronic via Blackboard. Assignment. N-tier Design

More MySQL ELEVEN Walkthrough examples Walkthrough 1: Bulk loading SESSION

PowerStore 2: Customizing the WA_Globals.php file

Entering an erequest. Login Page

ScrimmageSim Business Simulation Ordering Exercise Instructions

PHPRad. PHPRad At a Glance. This tutorial will show you basic functionalities in PHPRad and

Electronic Committees (ecommittees) Frequently Asked Questions v1.0

CS Homework 11

Survey Creation Workflow These are the high level steps that are followed to successfully create and deploy a new survey:

1 INTRODUCTION TO EASIK 2 TABLE OF CONTENTS

HELPDESK: CUSTOMER SERVICE: and push 0 for assistance or

ENGR/CS 101 CS Session Lecture 15

Getting Around QuickBooks Online

UNIVERSITY OF BRITISH COLUMBIA OKANAGAN COSC 304, INTRODUCTION TO DATABASES. Design Document. Removed

! An organized collection of data. ! Can easily be accessed, managed, and updated. ! Data are organized as a set of tables.

Fronter User Level 2

.WELCOME TO OFFICE DEPOT ONLINE

Lecture 2: Variables & Assignments

Assignment 5 Files, Linked Lists, and Binary Search Trees

GroveSite Custom Database Editor 3104 E. Camelback Road #559, Phoenix, AZ Phone: Fax:

BIS1523 Homework Assignments 2.1

CSC4370/6370 Spring/2010 Project 1 Weight: 40% of the final grade for undergraduates, 20% for graduates. Due: May/8th

HOMEWORK 9. M. Neumann. Due: THU 8 NOV PM. Getting Started SUBMISSION INSTRUCTIONS

AGENT123. Full Q&A and Tutorials Table of Contents. Website IDX Agent Gallery Step-by-Step Tutorials

CS157a Fall 2018 Sec3 Home Page/Syllabus

Who we are: Database Research - Provenance, Integration, and more hot stuff. Boris Glavic. Department of Computer Science

Frooition Implementation guide

CS 200. Lecture 09 FileMaker vs SQL & Reports. FileMaker vs SQL + Reports. CS 200 Spring 2018

Homework Assignment 3. November 11th, 2014 Due on November 25th, 12:30pm (noon) CS425 - Database Organization Results

CS 134 Programming Exercise 2:

Carnegie Mellon Univ. Dept. of Computer Science /615 - DB Applications. Today's Party. Example Database. Faloutsos/Pavlo CMU /615

Electronic Sales Platform User s Manual

CMSC 201 Fall 2018 Lab 04 While Loops

Transcription:

CS 2316 Homework 9b GT Thrift Shop Due: Wednesday, April 20 th, before 11:55 PM Out of 100 points Files to submit: 1. HW9b.py 2. any image files (.gif ) used in database 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 part two of the previous GT Login assignment. You will add on to the login functionality that you built to create more GUI windows that use a database to sell and buy items. Although this program does not require knowing much new information, it does test SQL query and insertion abilities as well as coding practices to create more GUI windows that can be opened, closed, or updated at 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 uses a different table called GTThrift: CREATE TABLE schema.gtthrift( ID INT AUTO_INCREMENT PRIMARY KEY, Username VARCHAR(25) NOT NULL, ItemName VARCHAR(25) NOT NULL, Description VARCHAR(50), Price DECIMAL(6,2) NOT NULL, Used boolean DEFAULT TRUE, Purchased boolean DEFAULT FALSE, Image VARCHAR(20) NOT NULL, BuyerUsername VARCHAR(25), foreign key(username) references schema.user(username), foreign key(buyerusername) references schema.user(username));

The code above was used to create the table, GTThrift, be sure to change the schema name. Each column name and its functionality in the homework: ID automatically increments a number in order of items inserted into the table. Think of ID as a receipt number in the order of the time it was inserted. Username is NOT NULL meaning something must be inserted into the field. It is also a foreign key to the User table created in HW9A-Login. That means that the Useranme must exist in the User table to be inserted into the GTThrift table. ItemName is NOT NULL meaning you must insert something into the field. Description is limited to 50 characters. Price field is NOT NULL meaning you must insert something into the field. Decimal(6,2) means that there can be up to 4 digits before the decimal and 2 after the decimal (EX. 1000.00 is acceptable but 10000.00 is not). Used is a boolean with values 1 for True and 0 for False to specify whether the condition of the item is 1 for Used and 0 for New. Purchased is a Boolean with values 1 for bought and 0 for sale. The default value is 0 for sale when it is inserted into the GTThrift table. Image is NOT NULL meaning something must be inserted into the field. It is limited to 20 characters. Image is the name of the gif file that must be submitted with the python script. BuyerUsername is the Username that purchased the item. If the item has not been purchased yet, then the value is NULL. The BuyerUsername is a foreign key to the User table and the Username must exist in the User table to be inserted. Further Development You will be writing on top of your already written part A. Your old code is probably not perfect so feel free to update it if needed! Keep in mind that the GUIs created do not need to look exactly the same. The new code will create a space to buy, sell, or see statics. The statistics page displays some of the more avid users and their stats. Method Name: HomePage

This method is called to show the home page. It should be called when you successfully login from the previous homework s login page. You should create a GUI which looks like the one above. 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 image is the same image as in your other GUI windows from part A. You can continue to use the same image from the previous homework, or switch to a different image if you wish, but keep it GT Thrift Shop related! Make sure to upload it with your python script. The background of the button s frame is a fun color. Feel free to use any color and font! The title is GT Thrift Shop Home Page. The Buttons are within a frame and have a width of 30, a height of 3, and a FLAT relief. Each button has a command to its own associated method. The Buy button calls the Buy method, Sell button calls the Sell method, and Stats button calls the Stats method. Cancel button calls a helper method that terminates the program. Feel free to use any color scheme for the background (as long as it s not white). The different background colors were created by making different frames. http://www.science.smith.edu/dftwiki/images/3/3d/tkintercolorcharts.png Method Name: Sell This method should close the homepage window and will show a new GUI window for selling an item in GT Thrift Shop. The GUI should look something like: 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 image is the same image as in your other GUI windows from part A. You can continue to use the same image from the previous homework, or switch to a different image if you wish, but keep it GT Thrift Shop related! Make sure to upload it with your python script. The title is GT Thrift Shop Sell Something. Each entry is width 30 and state normal. The labels are all sticky to the east with a pady and padx of 5. Clicking on the Cancel button calls a helper function to hide this GUI window and redisplay the Home Page Window. Clicking on the Sell Item button calls the SellInsert method.

Feel free to use any color scheme for the background (as long as it s not white). The different background colors were created by making different frames. For every item sold there must be an image of the item. The image should have a maximum pixel width of 250 pixels and is proportional to its pixel height. The image should be the type.gif. The file name of the image should match the entry to Image Name. Make sure to upload the images with your python script. Method Name: SellInsert This method will check the inputted information by the user from the sell window and if it meets the conditions then it will be inserted into the GT Thrift table. The Username should be obtained from the login. The ItemName, Price, and Image must be inputted to sell an item since their values in the GT Thrift table are NOT NULL. Check that the price follows the condition of DECIMAL(6,2). Check there is an Image present in current working directory by using: import os os.getcwd() # to see the current working directory os.chdir('/users/kerenrempe/hw9a) #to change the directory to where the Images are stored imagelist = os.listdir() #a list of files in a directory For example: imagelist ['Beats.gif', 'Futton.gif', 'iphone_6s.gif', 'Kate_Spade_Wallet.gif', 'Kindle.gif'] If any required information is missing then use a messagebox with the title Missing Information and the message of what required information is not inputted correctly. If the required information is put in by the user correctly, then insert all the information provided into the GTThrift table. Do not forget to commit the information to the database. Method Name: Buy This method will display the items for sale in the GT Thrift table. By default, the top 5 items with the highest prices will be listed. There are several options to sort the information. The options of the drop down menu are: OPTIONS = ["Price: Low to High", "Price: High to Low", "New", "Old", "A-Z", "Z-A"] Where the New and Old can be obtained by the order of the ID with lowest numbers being New. A-Z and Z-A refer to the ItemName in the GT Thrift table. This method should close the homepage window and will show a new GUI window for selling an item in GT Thrift Shop. The GUI should look something like:

You may generate this window however you wish, but it is highly suggested that follow the directions for the kind of layout manager to use. Things to note about the GUI you see: The title is GT Thrift Shop Buy Something. There are three frames within the window. The first frame holds the Sort by Label and the drop down menu. The frame uses the pack lay out manager with side =TOP and fill = both. The second frame contains the header row and the GT Thrift shop data. Within the frame the Labels use the grid layout manager. Each Label has a pady and padx of 5, uses sticky E+W, and has a width of at least 10. It is advised that the Radiobutton values for each GT Thrift Shop item assigns the ID value. The third frame contains the buttons Cancel, Clear, and Place Order. The Cancel button closes the Buy window and returns to the home page using a helper method. The Clear button deselects any radio button that may be selected by utilizing a helper method. The Place Order button calls the BuyUpdate method. Method Name: BuyUpdate This method is invoked when Place Order button is pushed in the Buy method. The method should check that a radio button was selected in the Buy window. If no radio button is selected then a messagebox should appear with the title Whoops! and the message Please select an item to purchase. If a radio button is selected, then the value of the radio button should match the ID of an item in the GT Thrift table which can be used to update the item Purchased to true and the BuyerUsername to the current user logged in. The method should show a messagebox with the title Successful Purchase and the

message Congratulations you have purchased ItemName for Price from Username. With the appropriate information from the purchase filled in. Then the Buy window should be withdrawn and should return the user to the home page. Method Name: Stats This method will display statistics for the GT Thrift table. The statistics are obtained from the GT Thrift table using SQL statements. The GROUP BY and ORDER BY SQL functions may be helpful and remember that you can aggregate more than one column at one time. In addition, to increase the speed it may be useful to use the LIMIT or MAX() SQL function to get the highest value. The home page will withdraw and a new GUI window will be created looking something 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 title is GT Thrift Shop Stats The top image is the same image as in your other GUI windows from part A. You can continue to use the same image from the previous homework, or switch to a different image if you wish, but keep it GT Thrift Shop related! Make sure to upload it with your python script. The title is GT Thrift Shop Stats. The labels in column 1 are sticky to the east with a pady and padx of 5. The labels in column 2 are sticky east to west with a pady and padx of 5 Clicking on the Cancel button calls a helper function to hide this GUI window and redisplay the Home Page Window. Feel free to use any color scheme for the background (as long as it s not white). The different background colors were created by making different frames. The stats were obtained from the GT Thrift Table and include the following details: Most Active User is the most active overall and should be found by evaluating the number of IDs for each User where there have either bought or sold Most Active Purchase gets the username and sum of the money spent by the most active purchaser. Most Active Seller gets the username and average price per item by the most active seller. Most Expensive Item on the Market lists the most expensive item name and the cost of the item of an item that has not been purchased. Most Expensive Item Sold lists the most expensive item name and the cost of the item of an item that has been purchased. Current Username s Item(s) for Sale lists all the items the current user has put up for sale. If none is listed, then the label should have the text None. Current Username s Item(s) Purchased - lists all the items the current user has purchased. If none is listed, then the label should have the text None.

Grading: You will earn points as follows for each piece of functionality that works correctly according to the specifications. Login GUI 5 Login GUI works (as specified in previous HW) 5 Register GUI 5 Register Page works (as specified in previous HW) 5 HomePage GUI 10 Logo and title correct 2 Buttons all linked correctly 8 Sell GUI 15 Logo and title correct 1 GUI elements proper and filled 10 Buttons all linked correctly 4 Buy GUI 25 GUI elements proper and filled 15 Frame 1 3 Frame 2 10 Frame 3 2 Buttons all linked correctly 6 Drop Down Menu Functionality Correct 4 SellInsert 10 SQL functionality is correct 5 Messagebox checks for missing info. 5 Commits to db when done BuyUpdate 15 Checks for no selected radiobutton (Messagebox) 5 SQL functionality is correct 5 Commits db when done 2 Successful Purchase (Messagebox) 3 Stats GUI 15 GUI elements proper and filled 4 SQL statements are correct 7 Cancel button works correctly 4 If connects to database more than 4 connections in program (-10)