Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 CS210 Intermediate Computing with Data Structures (Java) Saaid Baraty S-3-90.

Similar presentations


Presentation on theme: "1 CS210 Intermediate Computing with Data Structures (Java) Saaid Baraty S-3-90."— Presentation transcript:

1 1 CS210 Intermediate Computing with Data Structures (Java) Saaid Baraty sbaraty@cs.umb.edu S-3-90

2 2 Outline of Today's Class Looking at the course syllabus and requirements. About this course. Software Engineering and Software Quality. Data Structures and Their importance in Software Engineering. UML Diagram.

3 3 Welcome to CS210 What are the values of this course? –This course provides the knowledge for you to understand and use data structures, especially the Java Collections API, for writing more effective and efficient computer programs. –Also, you will write many programs in Java. This sharpens your Java programming skills.

4 4 Software Engineering Software engineering is the study of techniques, theory and principles to develop high quality software. Software qualities: –Correctness –Reliability –Robustness –Usability –Maintainability –Re-usability/Extendability –Portability –Efficiency

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

6 6 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)

7 7 Data Structures Data structures refer to the structures or organizations we use to store or retrieve data in memory.

8 8 Data Structures and Program Efficiency The choice of the data structure that we use in our program can dramatically affect the efficiency (in terms of running time ) of our program.

9 9 Data Structure Example We have a program that accepts a number as input and tells us if the number exists in the following set of numbers stored in memory: { 2, 10, 9, 11, 100, -6, 21 } What data structure should we use to store the numbers for obtaining the highest efficiency?

10 10 Option 1 An unordered list: { 2, 10, 9, 11, 100, -6, 21 } 109112100-621  pros and cons

11 11 Option 2 An ordered list: { 2, 10, 9, 11, 100, -6, 21 } 2910-61121100  pros and cons

12 12 Option 3 A binary tree { 2, 10, 9, 11, 100, -6, 21 } 9 100 2 21 10 11 -6  pros and cons

13 13 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. A good reference is UML Distilled, 3 rd Ed., Martin Fowler, Addison-Wesley/Pearson

14 14 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)

15 15 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.

16 16 UML Diagram for a Class CreditCard - myCardData : CardData + read( ) : CardData Class name: CreditCard Attribute name: myCardData Method name: read()

17 17 Class Diagram Showing Inheritance BankAccount balance getBalance() CheckingAccount monthlyFee getFee() SavingAccount interest getInterest()

18 18 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) –Integrated Development Environment (IDE) or you can use the command prompt (terminal) Use the PCs in the Healey Library labs as they already have these tools installed

19 19 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

20 20 Software Development Tools We can use a combination of the an IDE and the Sun Java SDK Source File(s) (.java) Programmer Eclipse IDE Compiler (javac) Class File(s) (.class) Virtual Machine (java) EditBuildRun Program executes Parts of Sun Java SDK Graphical User Interface


Download ppt "1 CS210 Intermediate Computing with Data Structures (Java) Saaid Baraty S-3-90."

Similar presentations


Ads by Google