Computer Science 313 – Advanced Programming Topics.

Slides:



Advertisements
Similar presentations
Project 1 ACSM PowerPoint.
Advertisements

Testing Relational Database
Computer Science 313 – Advanced Programming Topics.
S.T.A.I.R.. General problem solving strategy that can be applied to a range problems.
User Interface Design Yonsei University 2 nd Semester, 2013 Sanghyun Park.
Computer Science 313 – Advanced Programming Topics.
Computer Science 313 – Advanced Programming Topics.
Fall 2009ACS-3913 Ron McFadyen Composite Pattern Problem: How do we treat a composition structure of objects the same way as a non-composite object? Arises.
Patterns – Day 9 Façade Composite Reminders: Faculty candidate talk Friday 4:20 PM O-267. Brian Postow: Games and Complexity Theory Another talk on Monday!
Copyright W. Howden1 Lecture 6: Design Evaluation and Intro to OO Design Patterns.
CSE 111: Object Oriented Design. Design “To program is human but to design is divine” (WEH)
Chapter 1 Software Development. Copyright © 2005 Pearson Addison-Wesley. All rights reserved. 1-2 Chapter Objectives Discuss the goals of software development.
Adding a Syllabus Link. Let’s add the syllabus to the homepage. Return to the homepage Click “Add File” To get to the homepage, click the Course Content.
The Composite Pattern.. Composite Pattern Intent –Compose objects into tree structures to represent part-whole hierarchies. –Composite lets clients treat.
CHAPTER 10 Recursion. 2 Recursive Thinking Recursion is a programming technique in which a method can call itself to solve a problem A recursive definition.
Creating an HTML page Skills: edit and debug HTML pages IT concepts: text editor This work is licensed under a Creative Commons Attribution-Noncommercial-
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 16 Slide 1 User interface design.
1 An introduction to design patterns Based on material produced by John Vlissides and Douglas C. Schmidt.
AlgoTutor Tutorial (3) Program Pad J. Yoo, S. Yoo, C. Pettey, S. Seo, and Z. Dong MTSU Computer Science Department Making the transition from the algorithm.
Android 4: Creating Contents Kirk Scott 1. Outline 4.1 Planning Contents 4.2 GIMP and Free Sound Recorder 4.3 Using FlashCardMaker to Create an XML File.
1 PH Chapter 1 (pp. 1-10) GoF Composite Pattern (pp ) PH Ch 2 through Fundamentals (pp ) Presentation by Julie Betlach 5/28/2009.
Composite Design Pattern. Motivation – Dynamic Structure.
The Node Voltage Method
EARTH SCIENCE MARKUP LANGUAGE “Define Once Use Anywhere” INFORMATION TECHNOLOGY AND SYSTEMS CENTER UNIVERSITY OF ALABAMA IN HUNTSVILLE.
Object Oriented Analysis and Design Introduction.
1 PHP and MySQL. 2 Topics  Querying Data with PHP  User-Driven Querying  Writing Data with PHP and MySQL PHP and MySQL.
Lesson 1 -What is a Database? -Fields and Records
General Programming Introduction to Computing Science and Programming I.
Introduction CS 3358 Data Structures. What is Computer Science? Computer Science is the study of algorithms, including their  Formal and mathematical.
SE2811 Week 7, Class 1 Composite Pattern Applications Conceptual form Class structure Coding Example Lab Thursday: Quiz SE-2811 Slide design: Dr. Mark.
Computer Science 313 – Advanced Programming Topics.
Prof. Hertz (as told by xkcd.com)‏. Computer Science 313 – Advanced Programming Topics.
Software Life Cycle Requirements and problem analysis. –What exactly is this system supposed to do? Design –How will the system solve the problem? Coding.
First Steps in Modularization Simple Program Design Third Edition A Step-by-Step Approach 8.
CSC 213 – Large Scale Programming. Today’s Goal  Improve design skills to make usable designs  Noun extraction & UML class diagram reviewed  Connections.
Question of the Day  On a game show you’re given the choice of three doors: Behind one door is a car; behind the others, goats. After you pick a door,
Question of the Day  On a game show you’re given the choice of three doors: Behind one door is a car; behind the others, goats. After you pick a door,
Chapter 7 Software Engineering. © 2005 Pearson Addison-Wesley. All rights reserved 7-2 Chapter 7: Software Engineering 7.1 The Software Engineering Discipline.
Chapter 1 Data Structures and Algorithms. Primary Goals Present commonly used data structures Present commonly used data structures Introduce the idea.
Software Design: Principles, Process, and Concepts Getting Started with Design.
Application of Design Heuristics in the Designing and Implementation of Object Oriented Informational Systems.
Composite and Related Patterns Kirk Scott. The pitohui, a poisonous bird of New Guinea.
1-1 Software Development Objectives: Discuss the goals of software development Identify various aspects of software quality Examine two development life.
CSCI-383 Object-Oriented Programming & Design Lecture 10.
WEB 2.0 PATTERNS Carolina Marin. Content  Introduction  The Participation-Collaboration Pattern  The Collaborative Tagging Pattern.
Data Structures and Algorithms Dr. Tehseen Zia Assistant Professor Dept. Computer Science and IT University of Sargodha Lecture 1.
Data Design and Implementation. Definitions Atomic or primitive type A data type whose elements are single, non-decomposable data items Composite type.
Database Design Process For many businesses, the database is the most important set of computer files they have. For some, like EBay or Facebook, the database.
Evolutionary Patterns of Design and Design Patterns Author : Mikio Aoyama Excerpt from : 2001 IEEE 指導老師:張顧耀 學 生:邱金杰 學 號: E
Banaras Hindu University. A Course on Software Reuse by Design Patterns and Frameworks.
CMSC 2021 Software Development. CMSC 2022 Software Development Life Cycle Five phases: –Analysis –Design –Implementation –Testing –Maintenance.
Computer Science: A Structured Programming Approach Using C1 5-5 Incremental Development Part II In Chapter 4, we introduced the concept of incremental.
Computer Science: A Structured Programming Approach Using C1 Objectives ❏ To design and implement programs with more than one function ❏ To be able to.
COMPOSITE PATTERN NOTES. The Composite pattern l Intent Compose objects into tree structures to represent whole-part hierarchies. Composite lets clients.
7.1 Operating Systems. 7.2 A computer is a system composed of two major components: hardware and software. Computer hardware is the physical equipment.
Topic: Introduction to Computing Science and Programming + Algorithm
Software Design and Architecture
Intent (Thanks to Jim Fawcett for the slides)
4-2 Functions in C In C, the idea of top–down design is done using functions. A C program is made of one or more functions, one and only one of which.
Chapter 4 Functions Objectives
Model-View-Controller Patterns and Frameworks

Design Patterns for Recursive Descent Parsing
Chapter 7 Software Engineering.
4-2 Functions in C In C, the idea of top–down design is done using functions. A C program is made of one or more functions, one and only one of which.
Chapter 2. Problem Solving and Software Engineering
Object Oriented Design & Analysis
Software Design Lecture : 36.
NOTICE! These materials are prepared only for the students enrolled in the course Distributed Software Development (DSD) at the Department of Computer.
Presentation transcript:

Computer Science 313 – Advanced Programming Topics

 Writing a Java-based file manager  Starts at drive, but drill-down into directories  Print out the names of directories & files  Directory structure shown during print out  Allow user to create & delete files  Print out files sizes as we go

 Ideas to consider in your design  You’re very lazy (minimize code to write)  Allow future growth for new file system concepts  Take 5 minutes to draw class diagram  Discuss strengths & weaknesses of your design  Make sure you include where methods declared

 Writing a Java-based file manager  Starts at drive, but drill-down into directories  Print out the names of directories & files  Directory structure shown during print out  Allow user to create & delete files  Print out files sizes as we go

Part-Whole Hierarchy

 Frequently found relationship in real-world: Files – Directory Menu Items – Menu JComponents – JContainer Lines & Figures – Pictures  Instance consists of compositions of single type  Uses component & composite types  Many objects means decorator inappropriate  Invisibility of design is a good idea, however

Single Responsibility Principle  Classes should have only one reason to change  Cause errors when writing each responsiblity  Each change increases odds of introducing bug Fixing a bug counts as a change  Ideal classes & methods have 1 purpose  Simple, straight-line code created from ideal cases  Easy to understand code with no side effects  Natural desire to create highly coupled code limited  Design work goal is to enforce SRP

Very Common Mistake  Part-whole hierarchy solution violating SRP  Single class for both files & directories  Make complex Client handling 2 classes  Separate add() for Container & Component  Make adding new Components difficult

Problem With Simple Solution  Use Composite Pattern to solve situation  Tree-like structure composes part-whole hierarchy  Can be invisible to client if they do not care  Clients that care can use types to see differences

For Next Class  Lab available on the web  Try to plan and not wait until Thursday  Due on Friday (e.g., 1 lab period for assignment)  Gets everything set up for look at Map-Reduce algorithm  Read pages on Composite Pattern  Will discuss implementation on Friday