Whole-application development

Slides:



Advertisements
Similar presentations
Comp1004: Object Oriented Design II Designing Applications Based on BlueJ Chapter 13.
Advertisements

More Sophisticated Behaviour 1 Using library classes to implement more advanced functionality.
Fields, Constructors, Methods
Further abstraction techniques Abstract classes and interfaces 5.0.
Objects First With Java A Practical Introduction Using BlueJ Improving structure with inheritance 2.0.
Improving structure with inheritance Objects First with Java - A Practical Introduction using BlueJ, © David J. Barnes, Michael Kölling Main concepts.
Lab 10: Bank Account II Transaction List, error checking & aggregation.
A case study Whole-application development The case study A taxi company is considering expansion. –It operates taxis and shuttles. Will expansion.
Using interfaces Objects First with Java - A Practical Introduction using BlueJ, © David J. Barnes, Michael Kölling How would you find the maximum.
Improving structure with inheritance
Objects First With Java A Practical Introduction Using BlueJ Designing object-oriented programs How to write code in a way that is easily understandable,
Grouping Objects Arrays and for loops. Objects First with Java - A Practical Introduction using BlueJ, © David J. Barnes, Michael Kölling Fixed-Size Collections.
Well-behaved objects 4.0 Testing. 2 Objects First with Java - A Practical Introduction using BlueJ, © David J. Barnes, Michael Kölling Main concepts to.
Designing applications Software Engineering from a Code Perspective.
Grouping Objects 3 Iterators, collections and the while loop.
Objects First with Java A Practical Introduction using BlueJ
Software Testing and Quality Assurance
String Concatenation (operator overloading) 3.0.
Understanding class definitions Looking inside classes 3.0.
More sophisticated behavior Using library classes to implement some more advanced functionality 4.0.
Grouping Objects 2 Collections and the for-each loop Collections and the while loop.
Software Testing and Quality Assurance: Introduction and Terminology
Understanding class definitions – Part II –. Objects First with Java - A Practical Introduction using BlueJ, © David J. Barnes, Michael Kölling Main.
STREAM STREAM A software process The Mañana Principle The Mañana Principle Don’t try to everything at once! Static Methods Static Methods Stateless Utility.
1 Reflecting on the ticket machines Their behavior is inadequate in several ways: –No checks on the amounts entered. –No refunds. –No checks for a sensible.
CO320 Introduction to Object- Oriented Programming Michael Kölling 3.0.
5.0 Objects First with Java A Practical Introduction using BlueJ David J. Barnes Michael Kölling.
Call-n-Ride Transportation Program
University of Palestine software engineering department Testing of Software Systems Fundamentals of testing instructor: Tasneem Darwish.
Understand Application Lifecycle Management
5.0 Objects First with Java A Practical Introduction using BlueJ Introduction to Computer Science I Instructor: Allyson Anderson.
Designing applications Main concepts to be covered Discovering classes CRC cards Designing interfaces Patterns Objects First with Java - A Practical.
Objects First With Java A Practical Introduction Using BlueJ Designing applications 1.0.
Improving structure with inheritance Main concepts to be covered Inheritance Subtyping Substitution Polymorphic variables Objects First with Java.
Improving structure with inheritance Main concepts to be covered Inheritance Subtyping Substitution Polymorphic variables Objects First with Java.
CSC 213 – Large Scale Programming. Today’s Goal  Improve design skills to make usable designs  Noun extraction & UML class diagram reviewed  Connections.
Objects First With Java A Practical Introduction Using BlueJ Grouping objects Collections and iterators 2.0.
Well-behaved objects Main concepts to be covered Testing Debugging Test automation Writing for maintainability Objects First with Java - A Practical.
Designing classes How to write classes in a way that they are easily understandable, maintainable and reusable 5.0.
Grouping objects Collections and iterators Objects First with Java - A Practical Introduction using BlueJ, © David J. Barnes, Michael Kölling Main.
Software Testing and Quality Assurance Software Quality Assurance 1.
Key Partners Key Activities Value Proposition Customer Relationships Customer Segments Drivers Phone Company Taking calls Scheduling Convenience Safety.
Understanding class definitions
Designing applications Main concepts to be covered Discovering classes CRC cards Designing interfaces Patterns Objects First with Java - A Practical.
1 CSCD 326 Data Structures I Software Design. 2 The Software Life Cycle 1. Specification 2. Design 3. Risk Analysis 4. Verification 5. Coding 6. Testing.
5.0 Objects First with Java A Practical Introduction using BlueJ David J. Barnes Michael Kölling.
Key Partners Key Activities Value Proposition Customer Relationships Customer Segments Drivers Phone Company Taking calls Scheduling Convenience Safety.
Final Review. From ArrayLists to Arrays The ArrayList : used to organize a list of objects –It is a class in the Java API –the ArrayList class uses an.
OOPDA Intro 5.0. Topics Website and Syllabus Rowan VPN and H:drive BlueJ application and projects Programming Style (Appendix J) Javadoc (Appendix I)
Objects First With Java A Practical Introduction Using BlueJ Grouping objects Collections and iterators 1.0.
Objects First With Java A Practical Introduction Using BlueJ Well-behaved objects 2.1.
Object-Oriented Analysis and Design Use cases Finding classes Collaboration and Sequence diagrams Associations between classes.
Grouping objects Arrays. 2 Fixed-size collections The maximum collection size may be pre-determined with an upper limit Array is an fixed-size collection.
Objects First With Java A Practical Introduction Using BlueJ Designing classes How to write classes in a way that they are easily understandable, maintainable.
Grouping objects Iterators, collections and the while loop Equality and Equality == and equals(…)
Designing applications Main concepts to be covered Discovering classes CRC cards Designing interfaces Patterns © 2017 Pearson Education, Inc. Hoboken,
A case study Whole-application development The case study A taxi company is considering expansion. –It operates taxis and shuttles. Will expansion.
Beginning Fare File Management Hudson Fare Files 104 – Rev. 8/15 Point to Point (PTP)
Objects First with Java A Practical Introduction using BlueJ
Understanding class definitions
COS 260 DAY 16 Tony Gauvin.
Slides by Steve Armstrong LeTourneau University Longview, TX
Exercise 1 Declare a constant of type int called SIZE and initialize it to value 10 Declare two int arrays of size “SIZE” Assume that those int arrays.
Objects First with Java A Practical Introduction using BlueJ
Understanding class definitions
Collections and iterators
Objects First with Java A Practical Introduction using BlueJ
Further abstraction techniques
Improving structure with inheritance
Collections and iterators
Presentation transcript:

Whole-application development A case study Whole-application development 2.0

The case study A taxi company is considering expansion. It operates taxis and shuttles. Will expansion be profitable? How many vehicles will they need? Objects First with Java - A Practical Introduction using BlueJ, © David J. Barnes, Michael Kölling

The problem description The company operates both individual taxis and shuttles. The taxis are used to transport an individual (or small group) from one location to another. The shuttles are used to pick up individuals from different locations and transport them to their several destinations. When the company receives a call from an individual, hotel, entertainment venue, or tourist organization, it tries to schedule a vehicle to pick up the fare. If it has no free vehicles, it does not operate any form of queuing system. When a vehicle arrives at a pick-up location, the driver notifies the company. Similarly, when a passenger is dropped off at their destination, the driver notifies the company. Objects First with Java - A Practical Introduction using BlueJ, © David J. Barnes, Michael Kölling

Amendments Purpose of the modeling suggests additions: Record details of lost fares. Record details of how each vehicle passes its time. These issues will help assess potential profitability. Objects First with Java - A Practical Introduction using BlueJ, © David J. Barnes, Michael Kölling

Discovering classes Singular nouns: company, taxi, shuttle, individual, location, destination, hotel, entertainment venue, tourist organization, vehicle, fare, pickup location, driver, passenger. Identify synonyms. Eliminate superfluous detail. Objects First with Java - A Practical Introduction using BlueJ, © David J. Barnes, Michael Kölling

Simplified nouns and verbs Company Operates taxis. Receives calls. Schedules a vehicle. Taxi Transports a passenger. Location Passenger Vehicle Pick up individual. Arrives at pickup location. Notifies company of arrival. Notifies company of drop-off. Passenger source Calls the company. Shuttle Transports one or more passengers. Objects First with Java - A Practical Introduction using BlueJ, © David J. Barnes, Michael Kölling

Scenarios Follow a pickup through from request to drop off with CRC cards. PassengerSource Collaborators Create a passenger. Passenger Request a taxi. TaxiCompany Generate pickup and Location destination. Objects First with Java - A Practical Introduction using BlueJ, © David J. Barnes, Michael Kölling

Designing class interfaces public class PassengerSource { /** * Have the source generate a new passenger and * request a pickup from the company. * @return true If the request succeeds, * false otherwise. */ public boolean requestPickup(); * Create a new passenger. * @return The created passenger. private Passenger createPassenger(); } Objects First with Java - A Practical Introduction using BlueJ, © David J. Barnes, Michael Kölling

Collaborators Received through a constructor: new PassengerSource(taxiCompany) Received through a method: taxiCompany.requestPickup(passenger) Constructed within the object. Taxi company’s vehicle collection. Some such objects may be passed as collaborators to other objects, as above. Objects First with Java - A Practical Introduction using BlueJ, © David J. Barnes, Michael Kölling

Outline implementation Once the interfaces are complete, the outline implementation can start. The outline implementation tests the adequacy of the interfaces. Expect to have to correct the design. Lay down some basic tests that will be repeated as development continues. Objects First with Java - A Practical Introduction using BlueJ, © David J. Barnes, Michael Kölling

Iterative development Take relatively small steps towards the completion of the overall application. Mark the end of each step with a period of testing. Regression test. Fix errors early. Revisit earlier design decisions, if necessary. Treat errors-found as successes. Objects First with Java - A Practical Introduction using BlueJ, © David J. Barnes, Michael Kölling

Review Robust software requires thoughtful processes to be followed with integrity. Analyze carefully. Specify clearly. Design thoroughly. Implement and test incrementally. Review, revise and learn. Nobody’s perfect! Objects First with Java - A Practical Introduction using BlueJ, © David J. Barnes, Michael Kölling