be able to read, understand, and modify a program written by someone else utilize the Java Swing classes to implement a GUI

Similar documents
Project 6: Assembler

Exporting a Course. This tutorial will explain how to export a course in Blackboard and the difference between exporting and archiving.

Central Washington University Department of Computer Science Course Syllabus

Our second exam is Thursday, November 10. Note that it will not be possible to get all the homework submissions graded before the exam.

CMPSCI 187 / Spring 2015 Sorting Kata

Laboratory Assignment #3 Eclipse CDT

CS 3270 Mobile Development for Android Syllabus

CS 2110 Fall Instructions. 1 Installing the code. Homework 4 Paint Program. 0.1 Grading, Partners, Academic Integrity, Help

INF 111 / CSE 121. Homework 3: Code Reading

Programming Standards: You must conform to good programming/documentation standards. Some specifics:

Packaging Your Program into a Distributable JAR File

Our second exam is Monday, April 3. Note that it will not be possible to get all the homework submissions graded before the exam.

Project 8: Virtual Machine Translator II

Com S 227 Assignment Submission HOWTO

TURNING IN ASSIGNMENTS

[ 8 marks ] Demonstration of Programming Concepts

CSE 332: Data Structures and Parallelism Winter 2019 Setting Up Your CSE 332 Environment

EECE.2160: ECE Application Programming

CS ) PROGRAMMING ASSIGNMENT 11:00 PM 11:00 PM

Introduction to Programming System Design CSCI 455x (4 Units)

King Abdulaziz University Faculty of Computing and Information Technology Computer Science Department

INFSCI 1017 Implementation of Information Systems Spring 2017

CS4470: Intro to UI Software CS6456: Principles of UI Software. Fall 2006 Keith Edwards

Assignment Submission HOWTO

CS 241 Data Organization using C

CS 241 Data Organization. August 21, 2018

Getting Started with Moodle 2.0

Phase 2: Due 11/28/18: Additional code to add, move and remove vertices in response to user mouse clicks on the screen.

CS 2223 B15 Term. Homework 1 (100 pts.)

CSE115 Lab 9 Fall 2016

CoSc Lab # 6 (The Model) Due Date: Part I, Experiment classtime, Tuesday, Nov 6 th, 2018.


CMPSCI 187 / Spring 2015 Hanoi

Programming Assignment 2 ( 100 Points )

Assessment details for All students Assessment item 1

CSIT115/CSIT815 Data Management and Security Assignment 1 5 March 2018

CS 202, Fall 2017 Homework #4 Balanced Search Trees and Hashing Due Date: December 18, 2017

CS4500: Advanced Data Communications

What a lot of folks might call the class but as we ll see later, it s not entirely accurate.

Programming Assignment #3 Event Driven Simulation

Assignment Mobile Android application

CSE Network Management (3-0-3) Fall 2004 (Term 041) Course Projects

Electronic Transcript Ordering on Banner Self-Service

Phase 2: Due 05/02/18 The Gui now stores and displays a graph in response to user mouse clicks on the screen.

Project #3. Computer Science 2334 Fall Create a Graphical User Interface and import/export software for a Hurricane Database.

San Jose State University College of Science Department of Computer Science CS151, Object-Oriented Design, Sections 1, 2, and 3, Spring 2018

Object-Oriented Programming for Managers

a f b e c d Figure 1 Figure 2 Figure 3

ASSIGNMENT 5 Objects, Files, and a Music Player

Project 5: Computer Architecture

CS2630: Computer Organization Project 2, part 1 Register file and ALU for MIPS processor Due July 25, 2017, 11:59pm

CSE 373: Homework 1. Queues and Testing Due: April 5th, 11:59 PM to Canvas

CS 1110, LAB 1: PYTHON EXPRESSIONS.

You must pass the final exam to pass the course.

Assignment: TwoMethods Submitted to WebCat

CSSE 304 Assignment #13 (interpreter milestone #1) Updated for Fall, 2018

Lesson Procedures By Daphne Parker April 18, In Mrs. Parker s Class

Announcements. 1. Forms to return today after class:

Be sure check the official clarification thread for corrections or updates to this document or to the distributed code.

Welcome to CS 241 Systems Programming at Illinois

Lab 1 Introduction to UNIX and C

Aeries.net Student Information System Master Schedule User Manual April 18, 2010

CoSc Lab # 5 (The Controller)

COURSE FILES. BLACKBOARD TUTORIAL for INSTRUCTORS

UNic Eclipse Mini Tutorial (Updated 06/09/2012) Prepared by Harald Gjermundrod

CIS 101 Introduction to Computers Online Section About This Course and Getting Started Online Instructor Brad Ford

Lab 5 Classy Chat. XMPP Client Implementation --- Part 2 Due Oct. 19 at 11PM

F17 Modern Version Control with Git. Aaron Perley

CS3114 (Fall 2013) PROGRAMMING ASSIGNMENT #2 Due Tuesday, October 11:00 PM for 100 points Due Monday, October 11:00 PM for 10 point bonus

SAMPLE. Course Description and Outcomes

Lesson 10: Quiz #1 and Getting User Input (W03D2)

CMPSCI 187 / Spring 2015 Postfix Expression Evaluator

Programming Assignment 2 (PA2) - DraggingEmoji & ShortLongWords

What s New in Blackboard 9.1

CSCI 201 Lab 1 Environment Setup

To gain experience using GUI components and listeners.

CISC 3130 Data Structures Fall 2018

Topic 4D: Import and Export Contacts

CSC207 Week 4. Larry Zhang

CSE4305: Compilers for Algorithmic Languages CSE5317: Design and Construction of Compilers

Electronic Submission of FINAL Grades (e-grading) via TitanWeb

Moodle 2.2 Student User Guide My Private Files

Professor Hugh C. Lauer CS-1004 Introduction to Programming for Non-Majors

Introduction to Data Structures

AWWA-IA Member Company Registrations by a Key Contact

Problem Set 0. General Instructions

"In-Class" Assignment-"WINDOWS 7/OWA"

CSE 114, Computer Science 1 Course Information. Spring 2017 Stony Brook University Instructor: Dr. Paul Fodor

Engr 123 Spring 2018 Notes on Visual Studio

BLACKBOARD PORTFOLIOS

CMPSCI 187 / Spring 2015 Hangman

Name: 1) 2) 3) 4) 5) Learning Objectives (Milestones): 1. Create and use JUnit tests to debug a sample Java program.

Note: This is a miniassignment and the grading is automated. If you do not submit it correctly, you will receive at most half credit.

CSE 336. Introduction to Programming. for Electronic Commerce. Why You Need CSE336

CS 134 Programming Exercise 3:

Barchard Introduction to SPSS Marks

EECE.2160: ECE Application Programming Spring 2018 Programming Assignment #1: A Simple C Program Due Monday, 1/29/18, 11:59:59 PM

CS 200, Section 1, Programming I, Fall 2017 College of Arts & Sciences Syllabus

Programming Assignment 2 ( 100 Points ) Due: Thursday, October 12 by 11:59pm

Working with Windows Movie Maker

Transcription:

Homework 5, CS 2119 B-term 2015 Completing the GUI for a Student Database Due: Thursday, December 10 at 5pm Outcomes After successfully completing this assignment, you will be able to read, understand, and modify a program written by someone else utilize the Java Swing classes to implement a GUI Before Starting Review Chapter 10 (events); read Chapter 20 (GUIs) (this is Chapter 19 in the 5 th edition of the textbook). Read this tutorial on how to use JLists. Work on understanding as much of the tutorial as you can. The Assignment In Homework 4 you developed an application that modeled a student database, such as might be used in a Registrar s office. In this assignment, we ll continue with the idea of a student database, but the underlying model will be simpler than the one developed for Homework 4. The focus on this assignment is to provide a view (GUI) for our underlying model (student database). As you know, programming even a simple GUI means paying a lot of attention to detail. Given the limitations of time, you ll implement a GUI for a student database that keeps track only of each student s name and ID. The Swing component JTable is good choice for displaying information in a database, such as we have with our ArrayList<Student>. However, programming with JTable is more advanced than we re ready for at this point. Instead, we ll display the database information in a simpler kind of component called a JList. So, in summary, we ll simplify as follows: the model will consist of two classes: o Students: an ArrayList<Student>, with methods for adding a student and for removing a student.

o Student: which maintains fields only for a last name, first name, and student ID. All fields in the Student class will be of type String (even the ID). You may add any methods you need to the Student class. the view will present the information in the student database using a JList. How the program should behave Here s how your Student Database GUI should behave: 1. When the program starts up, a frame for the Student Database should be displayed. There should be two buttons, an Add button, which is enabled, and a Remove button, which is initially disabled (because there aren t any students to remove yet): The good news: this part of the program is being provided for you. Here is the starter file you can use for Homework 5. Work on understanding as much of the starter file as you can. 2. When the Add button is pressed, a new frame should appear (you will be writing the code that creates this frame). The Add Student Information frame provides text fields for a Student s last name, first name, and ID. It also provides two buttons (OK and Cancel):

The user can enter the appropriate information for a new student, then press OK to have the student added to the database, or press Cancel. 3. If Cancel is pressed, the window is disposed of without adding the student to the view (or to the database). If OK is pressed, a new student is created with the given information, the Add Student Information window is disposed of, and the main window now shows the new student s information:

4. Once an item in the list is selected (as shown below), the Remove button is enabled. The provided code does this for you. 5. This is what the window looks like after a second student has been added. Whenever student information is added to / removed from the view (GUI), the underlying model should also be changed. So if the Student Database window shows information about two students named Glynis Hamel and Terrence Jones, then the ArrayList<Student> should also contain those two students. New Students will always be added to the end of the list. So no matter which item is currently selected in the Student Database window, adding new student information puts the new student at the end of the list. 6. Pressing Remove removes the selected item (and that student is also removed from the underlying ArrayList). Here s a list with several items, where Hamel is selected: Pressing Remove results in the following display:

If all students are removed from the database, the Remove button should be disabled. 7. The list is part of a scroll pane (this code is also provided in the given file). Once the window is filled with student information, you should see the scroll bar appear: That s it. Your GUI needs to provide Add/Remove capabilities as described above. The view and the model are kept in synch with each other, with respect to the number of items displayed and the number of items stored, and with respect to each item s position in the list. Deliverables Export your Eclipse project to a zip file and submit the zip file via web-based turnin. To export a project, go to File Export and choose Archive File from the General folder. Check off the entire project in the top left window and make sure the format is.zip and not.tar. Finally, give the archive file a name and click finish. The name of the turnin project is Homework 5. Programs submitted after 5pm on December 10 will be tagged as late, and will be subject to the late homework policy. Grading Your program must compile without errors in order to receive any credit. It is suggested that before you submit your program, you should compile it one more time to make sure that it compiles correctly.