CS210 Intermediate Computing with Data Structures (Java)

Slides:



Advertisements
Similar presentations
Foundations of Programming and Problem Solving Introduction.
Advertisements

JAVA Programming Environment © Juhani Välimäki 2003.
Copyright © 2002 W. A. Tucker1 Chapter 1 Lecture Notes Bill Tucker Austin Community College COSC 1315.
CSc 2310 Principles of Programming (Java)
Introduction to Computer Programming I CSE 113
Introduction to Computer Programming in C
Programming System development life cycle Life cycle of a program
Object Oriented Design and UML
Aalborg Media Lab 21-Jun-15 Software Design Lecture 1 “ Introduction to Java and OOP”
Outline Java program structure Basic program elements
Welcome to CS201!!! Introduction to Programming Using Visual Basic.
Russell Taylor Lecturer in Computing & Business Studies.
About the Presentations The presentations cover the objectives found in the opening of each chapter. All chapter objectives are listed in the beginning.
UFCEPM-15-M Object-oriented Design and Programming Jin Sa.
Welcome to CS-IT 114 Introduction to Java Spring 2006 Namita Singla Department of Computer Science University of Massachusetts Boston.
Copyright © 2009 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Java Software Solutions Foundations of Program Design Sixth Edition by Lewis.
CMSC 202 Computer Science II for Majors Fall 2009 Introduction.
1 Object Oriented Design and UML Software Development Activities Object Oriented Design Unified Modeling Language (UML) Reading for this Lecture: L&L 6.1.
1 ENG236: ENG236: C++ Programming Environment (2) Rocky K. C. Chang THE HONG KONG POLYTECHNIC UNIVERSITY.
Introduction 01_intro.ppt
Chapter 2 Build Your First Project A Step-by-Step Approach 2 Exploring Microsoft Visual Basic 6.0 Copyright © 1999 Prentice-Hall, Inc. By Carlotta Eaton.
1 CS 240 Programming in C and UNIX Lecturer: Bob Wilson Office: S Phone:
Introduction to Java Tonga Institute of Higher Education.
1 Integrated Development Environment Building Your First Project (A Step-By-Step Approach)
Introducing Java.
Welcome to CS 115! Introduction to Programming. Class URL Please write this down!
Fall CIS 764 Database Systems Engineering L3: Two Assignments Relating to J2EE.
CS110/CS119 Introduction to Computing (Java)
CMSC 202 Computer Science II for Majors Object-Oriented Programming.
An intro to programming. The purpose of writing a program is to solve a problem or take advantage of an opportunity Consists of multiple steps:  Understanding.
Chapter 1.4 Programming languages Homework Due: Monday, August 11, 2014.
CS Tutorial 1 Getting Started with Visual Studio 2012 (Visual Studio 2010 are no longer available on MSDNAA, please choose Visual Studio 2012 which.
CSc 2310 Principles of Programming (Java) Dr. Xiaolin Hu.
Chapter 1: A First Program Using C#. Programming Computer program – A set of instructions that tells a computer what to do – Also called software Software.
Introduction to Programming Workshop 1 PHYS1101 Discovery Skills in Physics Dr. Nigel Dipper Room 125d
Instructor: Tina Tian. About me Office: RLC 203A Office Hours: Wednesday 1:30 - 4:30 PM or .
©Xiaoying Gao, Peter Andreae First Java Program COMP 102 #2 2014T2 Xiaoying Sharon Gao Computer Science Victoria University of Wellington.
ECE 264 Object-Oriented Software Development Instructor: Dr. Honggang Wang Fall 2012 Lecture 3: Requirements Specification, C++ Basics.
1 Mass IT Course Fall 2008 Bob Wilson S
©2000, John Wiley & Sons, Inc. Horstmann/Java Essentials, 2/e Chapter 1: Introduction 1 Chapter 1 Introduction.
First Java Program COMP 102 #2 2015T2 Xiaoying Sharon Gao Computer Science Victoria University of Wellington.
© 2006 Pearson Education 1 Obj: cont 1.3 and 1.4, to become familiar with identifiers and to understand how programming languages work HW: p.51 #1.8 –
CSS 161 Fundamentals of Computing Introduction to Computers & Java September 26, 2012 CSS 161: Fundamentals of Computing Instructor: Uma Murthy CSS SKL.
Lesson 2: First Java Programs. Objectives: –Discuss why Java is an important programming language. –Explain the Java virtual machine and byte code. –Choose.
1 計算機程式設計 Introduction to Computer Programming Lecture01: Introduction and Hello World 9/10/2012 Slides modified from Yin Lou, Cornell CS2022: Introduction.
CS 11 java track: lecture 1 Administrivia need a CS cluster account cgi-bin/sysadmin/account_request.cgi need to know UNIX
Welcome to CS 115! Introduction to Programming. Class URL Write this down!
Files to turn in for Homework # 1 1)TimerApplet.java 2)TimerApplet.html 3)TimerSyntaxErr.java 4)TimerSemanticErr.java 5)TimerSemanticErr.html 6)HomeWork1.txt.
Welcome to / Bienvenue à A Introduction to Computing II Instructor: William Renner TA: TBA Course website: Fall Session.
1 CS210 Intermediate Computing with Data Structures (Java) Saaid Baraty S-3-90.
Preliminaries CS 310: Object-oriented Programming Java API.
Lecture.1: Getting Started With Java Jiang (Jen) ZHENG May 9 th, 2005.
C++ and Ubuntu Linux Review and Practice CS 244 Brent M. Dingle, Ph.D. Game Design and Development Program Department of Mathematics, Statistics, and.
Pengantar OOP Class-Java. 2 Software Development Tools Using Sun Java SDK alone Source File(s) (.java) Programmer Compiler (javac) Class File(s) (.class)
The Development Process Compilation. Compilation - Dr. Craig A. Struble 2 Programming Process Problem Solving Phase We will spend significant time on.
Introduction to UML and Rational Rose UML - Unified Modeling Language Rational Rose 98 - a GUI tool to systematically develop software through the following.
SWE 214 (071) Introduction to UML Slide 1 Introduction to UML.
© 2011 Pearson Education, publishing as Addison-Wesley Chapter 1: Computer Systems Presentation slides for Java Software Solutions for AP* Computer Science.
Software Engineering Algorithms, Compilers, & Lifecycle.
PRG 420 Entire Course FOR MORE CLASSES VISIT PRG 420 Week 1 Individual Assignment Hello world PRG 420 Week 2 Individual Assignment.
Chapter 2 Build Your First Project A Step-by-Step Approach 2 Exploring Microsoft Visual Basic 6.0 Copyright © 1999 Prentice-Hall, Inc. By Carlotta Eaton.
Introduction to Algorithm. What is Algorithm? an algorithm is any well-defined computational procedure that takes some value, or set of values, as input.
CS210 Intermediate Computing with Data Structures (Java)
Introduction to OOP and UML
Working with Java.
CSc 1302 Principles of Computer Science II
Introduction to Programming
Welcome to CS 1010! Algorithmic Problem Solving.
Welcome to CS 1010! Algorithmic Problem Solving.
Chap 4. Programming Fundamentals
Presentation transcript:

CS210 Intermediate Computing with Data Structures (Java) Bob Wilson bobw@cs.umb.edu S-3-176

Prerequisites We expect that you already know the Java programming language at an introductory level (usually gained by taking our CS110 or CS 114L/115L) You should be capable of writing a program with at least two Java classes from scratch If you can not, you should NOT take this course. See your advisor for other options such as retaking CS110 or taking CS119

Welcome to CS210 Textbook is Lewis and Chase, Java Software Structures, 4th Ed. The course syllabus is on CS210 website: http://www.cs.umb.edu/~bobw/CS210/index.html Go to the UNIX/PC lab (Science Bldg 3rd floor) “Apply” for a UNIX/PC account and/or add CS210 You need that account to upload your project files We’ll go through the syllabus now

Course Procedures Two lecture sessions each week Held in this classroom Slides and demonstrations, but no hands-on I recommend that you print copies of my lecture notes and bring them to each lecture One lab session each week In one of the Healey Library General Use Labs Hands-on work associated with the lectures Lab report must be turned in the following week

Homework Assignments Reading for this class: L&C 1.1, App A Reading for next class: L&C App B I will briefly review this material next class I assume that you are already familiar with the Java programming language You are responsible for it in homework or exams If you are not familiar with it, please see me! Lab 1: Read assignment for next week

Software Development Methods Classical “Waterfall” Development Steps Edit and save source code Build source code to create program Errors Run program and evaluate results Errors

Errors A program can have three types of errors: The IDE editor and/or compiler will find syntax errors and other basic problems (compile-time errors) If compile-time errors exist, an executable version of the program is not created A problem can occur during program execution, such as trying to divide by zero, which causes a program to terminate abnormally (run-time errors) A program may run, but produce incorrect results, perhaps using an incorrect formula (logical errors)

Unified Modeling Language (UML) UML is a graphical tool to visualize and analyze the requirements and do design of an object-oriented solution to a problem Three basic types of diagrams: Use Case Diagram Class Diagram Interaction Diagram A good reference is UML Distilled, 3rd Ed., Martin Fowler, Addison-Wesley/Pearson

Unified Modeling Language (UML) Advantage of UML – It is graphical Allows you to visualize the problem / solution Organizes your detailed information Disadvantage of UML – It is graphical Can be done with pencil and paper – tedious! Commercial UML S/W tools are expensive! Example: Rational ROSE (IBM acquired Rational) We have UMLPAD which is a simple design tool to aid in drawing UML diagrams

Use Case Diagrams Typically the first diagrams drawn Helpful for visualizing the requirements Icons on the Use Case Diagram Actors: Users or other external systems Objects: Potential classes in the solution Scenarios: Sequences of interactions between Actors and Objects that are typical for the solution to the problem (Both success cases and error cases should be included)

Example: Use Case Diagram “No Sale” <<includes>> Bartender Cry over lost commission Customer Stiff Drink Buy with Cash Process Cash Sale Cash Register Sales Person Buy On Credit Process Credit Sale Product Cash Bank Credit Card Card Swipe Machine

Class Diagrams Classify the Objects in the Use Cases Define name of each class Define each class’s attributes Constants Variables Define each class’s behaviors Methods Show relationships between classes Depends on, Inherits, etc.

Example: Class Diagram Bank Credit Card name : String address : String - accounts [ ] : AcctData + processCharge ( thisCardData : CardData amt : double, storeName : String, storeBank : Bank, storeAcctNumber : int ) : boolean myCardData : CardData + read( ) : CardData CardData cardType : enum {Visa, …} - myBank : Bank myAcctNumber : int + getCardType( ) : enum + getBank( ) : Bank + getAcctNumber( ) : int AcctData acctLimit : double -acctBalance: double …

Interaction Diagrams Shows the time relationship of the events in a scenario between actors and objects UML Sequence Diagram Sometimes called a “ladder diagram” A vertical line represents an actor or object A horizontal line represents an interaction E.G. a call to a method of another object Progress of time is shown down the page

Example: Interaction Diagram Process Credit Sale Sales Person Card Swipe Machine Time Credit Card Bank swipeCard( ) read( ) return CardData enterAmt(…) processCharge( … ) return boolean readResponse( ) return “OK”

Software Development Tools Using Sun Java SDK alone Command Line Interface Editor Programmer Source File(s) (.java) Class File(s) (.class) Virtual Machine (java) Compiler (javac) Program executes Parts of Sun Java SDK

Using Sun Java SDK Alone Example DOS Commands and Parameters C:\ > edit HelloWorld.java (Create/edit “source file” in an external window) C:\ > javac HelloWorld.java (creates .class file) C:\ > java -classpath … HelloWorld Hello World C:\ > exit

Software Development Tools We will use a combination of the Dr Java IDE and the Sun Java SDK Graphical User Interface Dr Java IDE Edit Build Run Programmer Source File(s) (.java) Class File(s) (.class) Virtual Machine (java) Compiler (javac) Program executes Parts of Sun Java SDK

On-line Demonstration: Dr Java

Software Development Tools Download/install the software development tools on your own PC if you wish to do your project assignments at home Sun Software Development Kit (SDK) Dr Java Integrated Development Environment (IDE) Use the PCs in the Healey Library labs as they already have these tools installed