Title: CS271 ASSEMBLY LANGUAGE PROGRAMMING
1MCS 220 Concepts of Programming (focus on
Object-Oriented Programming) Class Hour Section
1 MW 215PM - 330PM. Hyer Hall 210 Section 2
MW 345PM - 500PM. Hyer Hall 210
2A little bit about the instructor
Assistant professor at UWW since August 2005
- Graduated from the University of Connecticut (05
Class), Ph.D in Computer Science and Engineering
- Master of Computer Science from UW-Milwaukee
(96-99)
- Bachelor of Science from Hanoi University of
Technology (86-91)
3A little bit about the instructor
- Research Experience
- User Modeling, Information Retrieval, Decision
Theory, Collaborative Filtering, Human Factors - Teaching Experience
- MCS 220, COMPSCI 172, 181, 271,381 at UWW
- Introductory courses at UOP and Devry
- TA for Computer Architecture, OO Design,
Compiler, Artificial Intelligence
4Contact information
- nguyenh_at_uww.edu
- (fastest way to contact me)
- McCutchan Hall 424
- Office Hours 830am 1030am, 1pm-2pm MW or by
appointment - 262 472 5170
5Course Objectives
- Able to design a real-world application using
Object-Oriented Design concepts - Able to implement, write professional
documentation, and conduct tests - Be familiar with professional software
development environment (strict deadlines, team
work, high standard)
6Technology Requirement
- J2SE Software Development Kit (SDK) )
http//java.sun.com/javase/downloads/index.jsp
(just download SDK 5.0 or later) - Eclipse http//www.eclipse.org/downloads/
7Course detail - Topics
Design, implement, document, testing a real
world application
Understand business Requirement and Design
Implementation focusing On code reuse
Documentation Testing
8Course detail - Evaluation
GRADABLE POINTS
Labs 120
Mid term Exam 160
6 Projects 420
Final Exam 200
Quizzes 100
Total 1000
9Grading (/-)
10Quiz
- Quiz is used to measure
- - class attendance
- - class preparation
- Not all material will be covered in a 75-minute
class - Book complements the lectures
11Fall 06 grade distribution
12Spring 07 grade distribution
13Must-have for success
Reading textbook
Practicing (labsprojects)
Devote time)
14Getting started
- Prerequisite COMPSCI 172,
- What do we still remember or know about Java and
Object-Oriented Design? -
15Assessment
- 1. Java is the only object-oriented programming
language - a. True
- b. False
16Assessment
- 2. The differences between a constant and a
variable in Java is - a. a data value for a variable can be changed
and a data value for a constant can not be
changed - b. a data value for a constant can be changed
and a data value for a variable can not be
changed - c. a data value for a constant sometimes can be
changed and a data value for a variable sometimes
can not be changed - d. None of the above
17Assessment
- 3. Which of the following statements about a
dowhile repetition statement is true? - a. The body of a dowhile loop is executed only
if the terminating condition is true. - b. The body of a dowhile loop is executed only
once. - c. The body of a dowhile loop is always executed
at least once. - d. None of the above
18Assessment
- 4. Which of the following is the constructor of
class ToughQuestion - a. public String ToughQuestion(String question)
. - b. public ToughQuestion(String question)
- c. public static void ToughQuestion(String
question) . - d. void ToughQuestion(String question) .
19Assessment
- 5. Commands to compile and execute a java program
are - a. run and java
- b. execute and javac
- c. javac and java
- d. compile and run
20Assessment
- 6. What are the two ways that a Java array can be
declared? - a. ltdata typegt ltarraynamegt
- ltdata typegt ltarraynamegt
-
- b. ltdata typegt ltarraynamegt ltdata typegt
ltarraynamegt - c. ltdata typegt ltarraynamegt
- ltdata typegt ltarraynamegt
- d. ltdata typegt ltarraynamegt ltdata
typegt ltarraynamegt
21Assessment
- 7. When would a programmer be forced to pick a
linear search over a binary search? (assuming
that we cant do anything on the given array) - a. When the items in the array are in ascending
order - b. When the items in the array are unsorted
- c. When the items in the array are in descending
order - d. None of the above
22Assessment
- 8. Which of the following for-loop control
results in equivalent numbers of iterations - A and B.
- C and D.
- A and B have equivalent iterations and C and D
have equivalent iterations. - None of the loops have equivalent iterations.
23Assessment
- 9. What is the value of result after the
following Java statements execute? - int a, b, c, d, result
- a 4
- b 12
- c 37
- d 51
- result d a c a b a
207
24Assessment
- 10. Which of the following group(s) does (do) NOT
contain any object-oriented programming language - a. Visual Basic, C
- b. Pascal, C
- c. C, Java
- d. Lisp, Fortran
25Class Focus
Professional software development
Strict deadlines, high standard, ridiculous
demands (some times)
26History
- Programming languages
- Low level programming language CPU instruction
sets. - High level programming languages
- Compiled (C/C, Pascal) and interpreted
language (Basic) - Procedural (Pascal, C) and object oriented
language (C, Java)
27A look at other languages
- FORTRAN
- FORmula TRANslator
- COBOL
- COmmon Business Oriented Language
- Pascal
- Structured programming
- Ada
- Multitasking
28A look at other languages
- BASIC
- Beginners All-Purpose Symbolic Instruction Code
- .NET
- .NET platform
- Visual Basic .NET
- Based on BASIC
- Visual C
- Based on C
- C
- Based on C and Java
29History of Java
- Java
- Originally for intelligent consumer-electronic
devices - Then used for creating Web pages with dynamic
content - Now also used to
- Develop large-scale enterprise applications
- Enhance WWW server functionality
- Provide applications for consumer devices (cell
phones, etc.)
30More stories
- Oak a reimplementation of C in the early 1990s
by James Gosling et al. - Intended for intelligent consumer devices.
- Oak became Java in 1995.
- Portability and Security of primary concern.
- Eminently suitable for Web applets.
- Also a powerful language in its own right.
31Novelty from Software engineering perspective
- Software reuse Avoid reinventing the wheeluse
existing pieces wherever possible. This practice
is central to object-oriented programming. - Classes and methods from class libraries.
- Classes and methods you create yourself
- Classes and methods that others create and make
available to you.
32Typical Java Development Environment
- Java programs normally undergo five phases
- Edit
- Programmer writes program (and stores program on
disk) - Compile
- Compiler creates bytecodes from program
- Load
- Class loader stores bytecodes in memory
- Verify
- Bytecode Verifier confirms bytecodes do not
violate security restrictions - Execute
- JVM translates bytecodes into machine language
33Example of UML
34Portability
- Theory Platform-independent dent (portability)
- The JVM is an imaginary CPU with bytecode
instructions. Java programs are translated to
bytecodes by the Java compiler - Practice
- differences between compilers, JVMs and
computers can make portability difficult to
achieve. Simply writing programs in Java does not
guarantee portability.
35Testing
- Always test your Java programs on all systems on
which you intend to run them, to ensure that they
will work correctly for their intended audiences.
36Introduction to Object Technology and the UML
- Unified Modeling Language (UML)
- Graphical language that uses common notation
- Allows developers to represent object-oriented
designs
37Introduction to Object Technology and the UML
- Unified Modeling Language (UML)
- Graphical language that uses common notation
- Allows developers to represent object-oriented
designs - Objects
- Reusable software components that model
real-world items - Look all around you
- People, animals, plants, cars, etc.
- Attributes
- Size, shape, color, weight, etc.
- Behaviors
- Babies cry, crawl, sleep, etc.
38OOD and OOP
- Object-oriented design (OOD)
- Models real-world objects
- Models communication among objects
- Encapsulates attributes and operations
(behaviors) - Information hiding
- Communication through well-defined interfaces
- Object-oriented language (OOP)
- Programming in object-oriented languages is
called object-oriented programming (OOP) - Example C, Java
39OOD/A continues
- Object-Oriented Analysis and Design (OOA/D)
- Essential for large programs
- Analyze program requirements, then develop
solution - UML
- Unified Modeling Language
40UML
- History of the UML
- Need developed for process with which to approach
OOA/D - Brainchild of Booch, Rumbaugh and Jacobson
- Object Management Group (OMG) supervised
- Version 1.5 is current version
- Version 2 under development
- UML
- Graphical representation scheme
- Enables developers to model object-oriented
systems - Flexible and extensible
41Review
- Which of the following is a correct variable
declaration statement? - a. int x - float y
- b. int x float y
- c. int x,y
- d. Long int x
42Review
- Which of the following is a correct variable
declaration statement? - a. int x - float y
- b. int x float y
- c. int x,y
- d. Long int x
43Review
- Which of the following is not a Java keyword?
- a. do
- b. next
- c. while
- d. for
44Review
- Which of the following is not a Java keyword?
- a. do
- b. next
- c. while
- d. for
45Review
- Which of the following is not an error (either a
syntax error or a logic error)? - a. Neglecting to include an action in the body of
a while statement that will eventually cause the
condition to become false. - b. Spelling a key word (such as while or if) with
a capitalized first letter. - c. Using a condition for a while statement that
is initially false. - d. An infinite loop.
- e. None of the above
46Review
- Which of the following is not an error (either a
syntax error or a logic error)? - a. Neglecting to include an action in the body of
a while statement that will eventually cause the
condition to become false. - b. Spelling a key word (such as while or if) with
a capitalized first letter. - c. Using a condition for a while statement that
is initially false. - d. An infinite loop.
- e. None of the above
47Review
- int counter
- counter 1
- while ( counter gt 20 )
-
- // body of loop
- counter counter 1
- // end while
- a. 19.
- b. 20.
- c. 21.
- d. 0.
48Review
- int counter
- counter 1
- while ( counter gt 20 )
-
- // body of loop
- counter counter 1
- // end while
- a. 19.
- b. 20.
- c. 21.
- d. 0.