Course Summary Fall 2006 CS 101 Aaron Bloomfield

Slides:



Advertisements
Similar presentations
Ch:8 Design Concepts S.W Design should have following quality attribute: Functionality Usability Reliability Performance Supportability (extensibility,
Advertisements

Chapter 1 Software Development. Copyright © 2005 Pearson Addison-Wesley. All rights reserved. 1-2 Chapter Objectives Discuss the goals of software development.
CS350/550 Software Engineering Lecture 1. Class Work The main part of the class is a practical software engineering project, in teams of 3-5 people There.
Programming Fundamentals (750113) Ch1. Problem Solving
Chapter 1 Program Design
© 2006 Pearson Addison-Wesley. All rights reserved2-1 Chapter 2 Principles of Programming & Software Engineering.
C++ fundamentals.
Introduction. Let’s begin Goal –Teach you how to program effectively Skills and information to be acquired –Mental model of computer and network behavior.
Software design and development Marcus Hunt. Application and limits of procedural programming Procedural programming is a powerful language, typically.
The chapter will address the following questions:
Introduction to Object-oriented programming and software development Lecture 1.
GENERAL CONCEPTS OF OOPS INTRODUCTION With rapidly changing world and highly competitive and versatile nature of industry, the operations are becoming.
An Object-Oriented Approach to Programming Logic and Design
Top-Down Design and Modular Development
Program Design CMSC 201. Motivation We’ve talked a lot about certain ‘good habits’ we’d like you guys to get in while writing code. There are two main.
Introduction CS 3358 Data Structures. What is Computer Science? Computer Science is the study of algorithms, including their  Formal and mathematical.
CSCI-383 Object-Oriented Programming & Design Lecture 13.
CSE 219 Computer Science III Program Design Principles.
Introduction CS 3358 Data Structures. What is Computer Science? Computer Science is the study of algorithms, including their  Formal and mathematical.
Software Engineering Principles. SE Principles Principles are statements describing desirable properties of the product and process.
C++ and Ubuntu Linux Review and Practice CS 244 Brent M. Dingle, Ph.D. Game Design and Development Program Department of Mathematics, Statistics, and.
CIS 112 Exam Review. Exam Content 100 questions valued at 1 point each 100 questions valued at 1 point each 100 points total 100 points total 10 each.
1 Course Summary Fall 2005 CS 101 Aaron Bloomfield.
ECE450 - Software Engineering II1 ECE450 – Software Engineering II Today: Introduction to Software Architecture.
Data Structures and Algorithms Dr. Tehseen Zia Assistant Professor Dept. Computer Science and IT University of Sargodha Lecture 1.
Data Structures Using C++ 2E
© 2006 Pearson Addison-Wesley. All rights reserved2-1 Chapter 2 Principles of Programming & Software Engineering.
© 2006 Pearson Addison-Wesley. All rights reserved 2-1 Chapter 2 Principles of Programming & Software Engineering.
1 CS 101 Today’s class will begin about 5 minutes late We will discuss the lab scheduling problems once class starts.
Methods (part 1) Alice In Action, Ch 2 Slides Credit: Joel Adams, Alice in Action CS120 Lecture August 2012.
1 Course Summary Spring 2007 CS 101 Aaron Bloomfield.
CSCE 240 – Intro to Software Engineering Lecture 3.
Maitrayee Mukerji. INPUT MEMORY PROCESS OUTPUT DATA INFO.
 The Object Oriented concepts was evolved for solving complex problems. Object- oriented software development started in the 1980s. Object-oriented design.
Introduction to PAD2 Dr. Mark C. Lewis
Principles of Programming & Software Engineering
CSC 222: Object-Oriented Programming
Algorithms and Problem Solving
Object-Orientated Programming
Visit for more Learning Resources
Introduction Edited by Enas Naffar using the following textbooks: - A concise introduction to Software Engineering - Software Engineering for students-
ATM OO Design and Implementation Case Study
Lecture 1 Introduction Richard Gesick.
Classes and OOP.
SOFTWARE DESIGN AND ARCHITECTURE
The Object-Oriented Thought Process Chapter 1
Unified Modeling Language
Data Abstraction: The Walls
Objectives State the reasons for the complexity involved in the development of software Define the following terms Objects Classes Messages Methods Explain.
Principles of Programming and Software Engineering
Object-Oriented Programming & Design Lecture 14 Martin van Bommel
About the Presentations
Introduction CSE 1310 – Introduction to Computers and Programming
Introduction Edited by Enas Naffar using the following textbooks: - A concise introduction to Software Engineering - Software Engineering for students-
Tools of Software Development
Objects First with Java
The Object-Oriented Thought Process Chapter 05
Chapter 5 Designing the Architecture Shari L. Pfleeger Joanne M. Atlee
MSIS 670 Object-Oriented Software Engineering
Programming Fundamentals (750113) Ch1. Problem Solving
Programming Fundamentals (750113) Ch1. Problem Solving
Chapter 1 Introduction(1.1)
Programming Logic and Design Fourth Edition, Comprehensive
CS310 Software Engineering Lecturer Dr.Doaa Sami
Algorithms and Problem Solving
Programming Fundamentals (750113) Ch1. Problem Solving
Programming Fundamentals (750113) Ch1. Problem Solving
Top-Down Design & JSP Skill Area Part D
CMSC201 Computer Science I for Majors Lecture 12 – Program Design
Presentation transcript:

Course Summary Fall 2006 CS 101 Aaron Bloomfield

Course Reflection

Course goals Objectives: Students who complete the course will: Understand fundamentals of programming such as variables, conditional and iterative execution, methods, etc. Understand fundamentals of object-oriented programming in Java, including defining classes, invoking methods, using class libraries, etc. Be aware of the important topics and principles of software development. Have the ability to write a computer program to solve specified problems. Be able to use the Java SDK environment to create, debug and run simple Java programs.

Unstated course goals Everybody needs to have a “base” level of programming to continue on in the CS courses (or as required by other departments) CS 101 and 201 provide that “base” level

What was new this semester Each of the homeworks and exams are always new each semester Because of the ‘fraternity file’ effect The course project A new one was developed for this semester And it was handled better than it was last semester The visual diagrams to show what was going on Videos of lectures Clicker response system Using cs101 e-mail for faster response

Changes on deck for next semester Will keep (and improve upon) all the stuff from the last slide Study groups The idea is a way for people to study and/or work together (not group assignments) This is a bit difficult to implement unless you have very large lectures Textbook is changing! This will also mean the slides will change as well Different clickers (the ones you use for CHEM 151) Won’t be using CodeLab Might use a similar system I want to talk about debugging more We are considering a site license for the debugging version of JCreator Will (hopefully) have more TAs, and thus more TA office hours Might have forums/newsgroups on the website

What didn’t work this semester Textbook issues during the first month of the semester One of the big reasons I’m changing books Clickers! Want to lower the amount of student frustration

What did work this semester Videos of lectures Clickers, sort of Using cs101 e-mail for faster response Many things that were “behind the scenes” TA organization and utilization Grading system Me delegating the work better to the TAs The marshmallow gun!

Did I push too hard this semester? I pushed the class hard this semester But did I push too hard? Consider: I’ve gotten more “things are going great” comments than I have “things are too hard” comments (anecdotal) Homeworks took about 6 hours, on average The results from the survey questions for each HW There were 9 HWs over about 16 weeks That’s about 3.5 hours (on average) on homeworks per week From lab 12, This course required 5.2 hours per week outside of lectures Other courses required 6.2 hours I’m interested in your feedback on this! But not today in lecture… Please send e-mail (anonymous or not) if you have comments…

The Big OOP Picture

The classes for the game Ship (HW J6) Cell (HW J6) Descriptions (lab 9) ShipList (HW J7) Parser (Lab 10) AI (HW J8) Human (provided in HW J8) MapPrinter (lab 11) Board (HW J9) Game (provided)

How a big OOP program interacts Note how the classes interacted in the game A lot of objects were created and manipulated A Cell for each spot in the Board grid Ships possible in each Cell Etc. The way this game has objects interacting is how a big OOP program would work

Cell Ship Cell Ship Cell Cell Cell Cell Cell Cell “rowboat" ShipList b isHit = false + … Cell length = 2 name int xPosition = 0 int yPosition = 0 int hits = 1 boolean isH = false + … Ship ShipList - int shipCount = 0 - Ship[] list + … b ship isHit = true + … Cell Board - int NOT_SHOT_AT = 0 - int MISSED = 1 - … - int sizex = 8 - int sizey = 8 - ShipList ships - Cell [][] cells + … (0,0) length = 3 name int xPosition = 4 int yPosition = 7 int hits = 1 boolean isH = true + … Ship ship isHit = false + … Cell (7,7) ship isHit = true + … Cell ship isHit = false + … Cell ship isHit = true + … Cell ship isHit = false + … Cell ship isHit = false + … Cell “canoe"

Problem solving To solve a problem in CS, you break it down into smaller and smaller pieces… A big program is broken down into packages Which we haven’t really seen yet Consider the game to be one package The packages are broken down into hierarchies This uses inheritance Our game didn’t use a hierarchy, as you did not know of inheritance at that point The hierarchies are broken down into classes The game had 10 classes Each class is broken down into methods and variables Some (such as MapPrinter) only had a few; others (such as Ship) had lots Each method is broken down into parts, etc.

The completed game This could easily be made by multiple people Each person does a separate class Not exactly equal, but it still lowers the workload Our (fully commented) code for the game was well over 1,000 lines Granted, we had very long comments However long yours was, it was a about a 1,000 line program Even if you had trouble getting parts working, and had to use our code You still wrote all the parts, and saw how they interacted with the rest of the system

Review of Chapter 1

Demotivator winners! Methodology 1st place vote counted for 3 points 2nd place vote counted for 2 points 3rd place vote counted for 1 point Will buy two demotivators and hang them in my office… The results were as of 11:00 today The results, with 186 of 198 precincts reporting…

Engineering software Complexity of software grows as attempts are made to make it easier to use Several factors account for the increased complexity. First, to do more, the software is larger. It is not unusual for application programs, such as spreadsheets, word processors, and drawing programs, to consist of millions of lines of code. Another factor that increases complexity is the interaction between components. For example, a word processor may contain one component for spell checking and correction, and another component that provides the services of a thesaurus. Let’s consider the spell-checking component. When a possible spelling error is detected, the spelling checker must report the possible error to the user. Thus the spelling checker must interact with the component of the application that creates a window or a dialog box so that the possible error can be displayed and the user queried about what action, if any, to take. If the user agrees it is a spelling error, the checker can correct the misspelling. To make the correction, the checker must interact with the component of the word processor responsible for replacing text in the document. Obviously, as the number of components grows, the number of interactions between components can grow rapidly.

Software engineering Goal Production of software that is effective and reliable, understandable, cost effective, adaptable, and reusable Design software so that new features and capabilities can be added Goal Production of software that is effective and reliable, understandable, cost effective, adaptable, and reusable Makes sense due to the great costs involved to have flexible components that can be used in other software Goal Production of software that is effective and reliable, understandable, cost effective, adaptable, and reusable Cost to develop and maintain should not exceed expected benefit Goal Production of software that is effective and reliable, understandable, cost effective, adaptable, and reusable Because of the long lifetime many people will be involved Creation Debugging Maintenance Enhancement Two-thirds of the cost is typically beyond creation Goal Production of software that is effective and reliable, understandable, cost effective, adaptable, and reusable Goal Production of software that is effective and reliable, understandable, cost effective, adaptable, and reusable Work correctly and not fail

Principles of software engineering Abstraction Encapsulation Modularity Hierarchy Abstraction Encapsulation Modularity Hierarchy Abstraction Encapsulation Modularity Hierarchy Abstraction Encapsulation Modularity Hierarchy Abstraction Encapsulation Modularity Hierarchy Determine the relevant properties and features while ignoring nonessential details Ranking or ordering of objects Construct a system from components and packages Separate components into external and internal aspects

Object-oriented design Purpose Promote thinking about software in a way that models the way we think and interact with the physical word Including specialization Object Properties or attributes Behaviors Now let’s analyze this activity. First, you recognized the need for action—having to get up early and deciding that the clock radio could help meet that need. So you go over to the clock radio, which is a physical object. This object has properties like weight and size, and it also can do something. For one it can play music at an indicated time. It’s not necessary for you to know entirely how the clock radio works. You need to know only which switches and buttons to use. The switches and buttons are the interface to the clock radio. If you understand the interface to an object, you can use it to perform some tasks without understanding how the object works internally. Moving the appropriate switches and pushing the appropriate buttons are signals to the clock radio to modify its behavior. Such interactions are so routine that it is easy to overlook how amazing this activity is. You were able to make an object perform a complex activity without understanding the internal operation of the object. You were able to do so because you had an appropriate abstraction of the object. Indeed your mental abstraction of a clock radio means that when you travel and stay at a hotel room, you are able to set its clock radio even though it is a different clark radio. Similar objects often exhibit similar behavior. This way of dealing with the complex world around us also can be applied to software design and programming. A key step in developing a complex system using object-oriented design is to determine the objects that constitute the system. By carefully creating appropriate abstractions of these objects and separating their internal implementation from their external behavior, we can manage the complexity of a large software system. So what exactly do we mean by an object? Physical things are certainly objects. A ball, a file cabinet, an address book, a tree, and a computer all are objects. What about things like a word, a bank account, or a musical note? These things are not physical objects, but they are objects—in the sense that they have attributes and properties, and we can perform actions on them. A word has a length and meaning, and if we are talking in regard to a word processor, a word can be inserted or deleted from a document. A bank account has a balance to which funds can be deposited or debited. A musical note has pitch, duration, and loudness and can be played. For the most part, something is an object if it has a name, properties associated with it, and behaviors such as message handling. Typically, when an object receives a message, the message causes the object either to take some action or to change one of its properties. Continuing with our clock radio example, when you push the “music on” button, the current broadcast is played. If we are going to take an object-oriented approach to developing software, it makes sense to use a programming language such as Java that supports thinking and implementing solutions in terms of objects. A language with features that support thinking about and implementing solutions in terms of objects is an object-oriented programming language. Using an object-oriented programming language to implement an object-oriented design is called object-oriented programming. Notice we were very careful to include the phrase “implement an object-oriented design.” As you will see later, you can use an object-oriented language, but not think in terms of objects.

Programming Problem solving through the use of a computer system Maxim You cannot make a computer do something if you do not know how to do it yourself

Problem Solving Process What is it? Analysis Design Implementation Testing

Problem Solving Process What is it? Analysis Design Implementation Testing Determine the inputs, outputs, and other components of the problem Description should be sufficiently specific to allow you to solve the problem

Problem Solving Process What is it? Analysis Design Implementation Testing Describe the components and associated processes for solving the problem Straightforward and flexible Method – process Object – component and associated methods

Problem Solving Process What is it? Analysis Design Implementation Testing Develop solutions for the components and use those components to produce an overall solution Straightforward and flexible

Problem Solving Process What is it? Analysis Design Implementation Testing Test the components individually and collectively

Problem Solving Process

Tips Find out as much as you can Reuse what has been done before Expect future reuse Break complex problems into subproblems

Tips Find out as much as you can Reuse what has been done before Expect future reuse Break complex problems into subproblems Consider Sketching a solution and then repeatedly refine its components until the entire process is specified Find out what is known about the problem Talk to the presenter Determine what attempts have succeeded and what attempts have failed Research can require significant time and generate questions The effort is worthwhile because the result is a better understanding True understanding of the problem makes it easier to solve

Tips Find out as much as you can Reuse what has been done before Expect future reuse Break complex problems into subproblems Be open to indirect use of existing materials Your time is valuable Correctness is probably even more valuable Use existing infrastructure that is known to work

Tips Find out as much as you can Reuse what has been done before Expect future reuse Break complex problems into subproblems Make as few assumptions as necessary Maximizes the likelihood that your effort can be used in future situations

Tips Find out as much as you can Reuse what has been done before Expect future reuse Break complex problems into subproblems Divide-and-conquer Solve subproblems and combine into an overall solution

And the winner, with 37 votes, is…

Have a great holiday break!