lecture7-june19 - 6/19/09 1 Lecture 7 Announcements...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 6/19/09 1 Lecture 7 Announcements Assignment 1 Designs back comments Program due Sunday stats record hrs, SLOCs, logic defects Read Chapter 1 and Appendix B, then skip Ch. 2 Topics for today will answer the questions: What is software engineering ? What is a typical software lifecycle? Walk through the basic activities Fundamental design concepts how to define, extend and work with classes and their associated objects Packaging Your Own Classes package MyPack; public class SimpleAccount { String name; int acctNum; double bal; SimpleAccount(String n, double b, int num) { name = n; bal = b; acctNum = num } void show() { if(bal<0) System.out.print("-->> "); System.out.println(name + ": $" + bal); } } public class AccountCreation { public static void main(String args[ ]) { SimpleAccount current[ ] = new SimpleAccount[3]; current[0] = new SimpleAccount("K. J. Fielding", 123.23,1); current[1] = new SimpleAccount("Will Tell", 157.02, 2); current[2] = new SimpleAccount("Tom Jackson", 12.33, 3); for(int i=0; i<3; i++) current[i].show(); } } And then import its public classes to another program, e.g. import MyPack.*; Classes and SubClasses:Very Briefly Dog String name char gender String breed bark(int n) sleep( ) eat( ) Object boolean equals ( ) String toString () Object clone () Dingo String country: Austrailia howl (int time) eat ( ) isa isa An interface is an abstract class that is implemented (i.e. details filled in) by another concrete class (more in Ch. 3) Appendix A Review A program is a collection of classes JVM operation Usual primitive data types, wrapper classes to autobox/unbox them as needed All the usual logic control constructs 2 kinds of methods static and instance; called differently String variables, values, operations and methods Defining your own classes private & public parts Creating (constructing) objects with new Arrays better, safer, a reference type IO stream, Scanner class methods, JOptionPane class from Swing toolkit More advanced Java features after Ch. 1 Introduction to Software Design Overview of Topics Software engineering Software lifecycle models Types of abstraction and other complexity management techniques Abstract Data Types (ADTs) and Java interfaces User interaction modeling (use cases, scenarios) UML class diagrams Top down functional design IPO, hierarchy Algorithm description models Case study: telephone directory system 6/19/09 2 Foundations of SW Engineering SWE is a discipline of life-long learning E.g. skills, technologies, problems, etc....
View Full Document

Page1 / 6

lecture7-june19 - 6/19/09 1 Lecture 7 Announcements...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online