25 Pages

Lab Notes

Course: CS 525, Fall 2009
School: Maharishi
Rating:
 
 
 
 
 

Word Count: 3899

Document Preview

Labs Advanced ASD Software Development CS525 Lab notes: Observer Strategy Iterator command State Chain of Responsibility (COR) Bridge Factory Visitor Composite Note: In several places in the notes I pose a question about the lab and its design or implementation, something that you should be able to answer. You should pause there, and think and answer the question yourself, before reading on. Consider this like...

Register Now

Unformatted Document Excerpt

Coursehero >> Iowa >> Maharishi >> CS 525

Course Hero has millions of student submitted documents similar to the one
below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.

Course Hero has millions of student submitted documents similar to the one below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.
Labs Advanced ASD Software Development CS525 Lab notes: Observer Strategy Iterator command State Chain of Responsibility (COR) Bridge Factory Visitor Composite Note: In several places in the notes I pose a question about the lab and its design or implementation, something that you should be able to answer. You should pause there, and think and answer the question yourself, before reading on. Consider this like a miniature virtual-quiz! I'll label these places like this: VQ How would you do this ??? in your design...? 1 ASD Labs Observer Lab: This simple lab follows directly the GOF reading example of an MVC model, with multiple views of a single model. The basic idea is that changes to the model will automatically cause updates in the views. Since it is a first lab, we give you the design and UML (in later labs you will do the design!). 2 ASD Labs The original code is pretty simple, but has some problems: public class Counter { ... public void increment(){ count++; textframe.setCount(count); rectframe.setCount(count); ovalframe.setCount(count); } public void decrement(){ if (count >0){ count--; textframe.setCount(count); rectframe.setCount(count); ovalframe.setCount(count); } } } VQ: What is the problem(s)? Note that in several places, there is a tight coupling between the counting (model) logic, and the views (GUI display). This is not good, it violates the Single Responsibility Principle. VQ: Describe some specific impacts of this design issue, examples of why it would lead to a poor result. So you need a better design, that will promote a decoupling and separation (and encapsulation) of each of these two parts of the design. Hint: Observer Pattern. 3 ASD Labs Do two versions; for the first you should implement the observer/observable pattern your self, and for the second use the Java library for these. Note the differences, and any issues in the two approaches. Phase 2: For a second part of the lab, have all of the views derive from a common View class. Note what impact this has on also having them be observers. Similarly now change the counter to have a two level design; a simple counter class, and then an observable counter (using Java library). VQ: What issues arise from the new derived ObservableCounter which IsA Counter, and also IsA Observable? 4 ASD Labs Strategy Lab: This is an interesting lab. It is purely a re-factoring; converting an existing working application into a revised implementation with a better design, with better Software Engineering properties. The application is a drawing program. The program has several modes, {rectangle, ellipse, scribble, line, and erase}. Buttons on the GUI are used to change modes. The basic idea is that each drawing mode uses a different algorithm for drawing. To change modes, we then have to be able to dynamically change algorithms; voila, the Strategy pattern! The original program has the code for each drawing mode located in the ActionListeners (ActionPerformed() methods). Since each drawing mode must have an action for several different user inputs (mouse up, mouse down, mouse moved), there are parts of the algorithm in each of these AL's. 5 ASD Labs There are several problems with this. One is that the actual definition of the algorithm for any mode (e.g. draw rectangle) is not collected in any one place, nor encapsulated. It is mingled in the GUI code of the ALs, in fact in several ALs. public class ScribbleCanvasListener implements MouseListener, MouseMotionListener { public void mousePressed(MouseEvent e) { switch (drawframe.getCurrentTool()){ case 0: // handle mouse pressed for scribble tool case 1: // handle mouse pressed for line tool case 2:// handle mouse pressed for rectangle tool case 3:// handle mouse pressed for oval tool case 4:// handle mouse pressed for eraser tool } } public void mouseReleased(MouseEvent e) { switch (drawframe.getCurrentTool()){ case 0: // handle mouse released for scribble tool case 1:// handle mouse released for line tool case 2:// handle mouse released for rectangle tool case 3:// handle mouse released for oval tool case 4:// handle mouse released for eraser tool } } public void mouseDragged(MouseEvent e) { switch (drawframe.getCurrentTool()){ case 0: // handle mouse dragged for scribble tool case 1:// handle mouse dragged for line tool case 2:// handle mouse dragged for rectangle tool case 3:// handle mouse dragged for oval tool case 4:// handle mouse dragged for eraser tool } } } 6 ASD Labs [Note: because the program skeleton uses some visual layout generated code, the ALs are not individual separate objects like we have done in our simple Swing examples. Rather there is one main AL, which then demultiplexes the events by looking at the source, and then calls an appropriate AP like method. It is not the same style we would write, but is equivalent.] Revised Design So, one goal is to reorganize the code for each drawing algorithm into one place, one object. These objects will be the concrete strategies. We will call them Tools. (For the early labs we give you the design and UML, for later labs you will create this.) We could really probably best call this a multi-strategy, since each concrete strategy object will actually have multiple algorithms in it. Interestingly enough some people would label this as a State Pattern, because we are changing how we do several things. This is a subtle distinction between the intents of the two patterns, and we will review this more when we study that pattern. So your refactoring should take all of the parts of an algorithm for one drawing mode and collect them into the tool for that mode. Then do the same for all other modes. You can start by doing just one mode, perhaps the scribble tool. Note that you don't really have to know anything about how Swing graphics work to do this, it is just refactoring the existing code into a different (better) structure. Implementation Now that drawing modes are encapsulated into Tool's, we need a way to switch tools. The Tools are really the concreteStrategy's, so we need to see how we will manage strategies. In the old program strategies were represented by a single integer flag (probably would be better to use an Enum). In the new version, the current strategy will be [pause here and answer it yourself!] VQ .. an object reference, to a current Tool. 7 ASD Labs Note well the impact of this. All of the long if/case statements sprinkled in the old code, which are a maintenance problem, are gone. They all get replaced by [VQ]... polymorphism on the currentTool object reference. VQ: If this is the Strategy pattern, where is the context object? Result Now notice that the definition of any drawing mode is fully localized and encapsulated in one place, that concrete strategy class. Further, there is no more tangle between GUI and drawing algorithm (application logic) code. And, now one can easily add new drawing modes in a purely extensible manner, completely realizing the open/closed principle. Sub-Strategies Notice the interesting structure used for the TwoEndsTool class. It is based on another refactoring, that all shapes (modes) based on a shape definition by two points have a common structure, and so that commonality should be refactored into a common class, the TwoEndsShape. Notice that this class is not derived, but composed from the TwoEndsTool class. [Why??] This makes it basically a strategy which is used by the TET class; a sub-strategy! [Comment on if/why this is a strategy, or not.] 8 ASD Labs Iterator Lab This lab uses several different iteration methods to display three different views of a data set (model). The given code uses some simple loops in the ActionListeners to produce the three differing displays. void JButtonAllSwimmers_actionPerformed(java.awt.event.ActionEvent event) { Vector vectorlist = slist.getVector(); for (int x=0; x<vectorlist.size(); x++){ Swimmer swimmer= (Swimmer)vectorlist.elementAt(x); JTextArea1.append(swimmer.getFname()+" "+swimmer.getLname()+ "\n"); } } void JButtonAllBackward_actionPerformed(java.awt.event.ActionEvent event) { Vector vectorlist = slist.getVector(); for (int x=vectorlist.size()-1; x>-1; x--){ Swimmer swimmer= (Swimmer)vectorlist.elementAt(x); JTextArea2.append(swimmer.getFname()+" "+swimmer.getLname()+ "\n"); } } void JButtonAllAbove12_actionPerformed(java.awt.event.ActionEvent event) { Vector vectorlist = slist.getVector(); for (int x=0; x<vectorlist.size(); x++){ Swimmer swimmer= (Swimmer)vectorlist.elementAt(x); if (swimmer.getAge()>=12) JTextArea3.append(swimmer.getFname()+" "+swimmer.getLname()+ "\n"); } } You are to refactor this, to use the encapsulation of Iterators to do the same result. 9 ASD Labs 1) The lab only requires three simple examples of iterators, not the full generalities we have seen in class. 2) The first panel is just a simple iterator, and can use the standard Java iterator() method. 3) The second panel needs a special iterator, with different (internal) iteration logic. If you were the creator of the collection class, you could directly access it and add some second iterator capability like this directly. However, since we are using a standard Java system class for the collection, we cannot do that. Instead we have to create a new iterator, layered on the old (standard) one that the List<T> interface provides us. 4) This leaves the question of the design for some method to provide us this new iterator. We can do this by one of two standard ways; inheritance or composition. a) Inheritance would mean that we create some new collection class, perhaps MyList<T>, which adds a new method to the standard List interface. This new method can be named anything we want, perhaps: revIterator(). VQ : What is the signature of this new method? Iterator<T> revIterator(); b) Composition would mean that we create a new class, which provides a wrapper (interface) to the original standard List class object(s). We can choose the same names and interfaces as above, but the implementation is different. 10 ASD Labs 5) So what does this new method do? It has to return an Iterator, and it can then use it to access the actual data, and then perform any desired changes before presenting it to the user, through its own Iterator interface. For a reverse iterator, it will be necessary to have some underlying iterator that allows one to do absolute indexing into the actual data. 6) For the third panel, one needs to take the selection and processing code now found in the AL of the GUI, and encapsulate that into a functor. This functor is then passed to an internal iterator, which will apply it to all elements of the collection. The functor constructor should take some specification of the selection to be used. Then one needs some new method on the collection which will take a functor, and apply it to the collection. This new method is also not a part of the standard List interface, and thus it would be added in the same manner as above for the reverse iterator. It is also possible to have this doAll method be a member of some other "third-party" class, which gets knowledge of the collection and the functor, and then does the application. 7) For the internal iteration version, you need to have the functor attached to the output destination. This can be done in the constructor of the functor. 8) So the code could be like this: inIterator<Swimmer> it = new inIterator<Swimmer>(List); Functor<Swimmer> select = new SwimSelect(TextArea); it.doAll(proc); 11 ASD Labs Command Lab: In this lab you are to create a simple application where you can enter values and then push them onto a stack, or pop values from the stack, and the stack contents are always displayed. The user interface and GUI code are given; The values to push given are through a simple input dialog box (code also given): (For simplicity in testing, I just replaced this with some serialized input strings to simplify things.) The design prior to application of the Command Pattern is very simple; 12 ASD Labs But the problem with this approach is that every component is coupled with the others, with the standard SE problems. SO our solution is to refactor into a command pattern. Do the lab in several simple phases; 1) Convert the lab into several components, using the MVC pattern 2) add commands for the operations on the model (stack) 3) move domain logic (stack usage) code from the GUI AL/AP code into commands. 4) Add undo/redo capability. This means that the invoker gets more complex, and maintains a command history, and can use it to access and re-use previous commands. Discussion The main goal of the command pattern is to separate the command creator, the command target (called receiver in GOF), and the command invoker. This decoupling has all of the standard SE benefits; modularity, encapsulation, re-use, etc. One criterion for a correct design is that there is no reference to any of these components for the other, except through the Command interface. Note that when doing the design for any application, you need to map the general GOF terms used in the pattern description onto meaningful application domain terms. Thus if the word push or pop (as an action on the target stack) appears in the CommandManager, something is wrong. VQ : What are the UML class descriptions of Command Pattern as applied to this lab? Command Design The client program creates commands, and sends to the invoker. How is the relationship between the target (receiver, model) and the commands established? It could be done on every command as a parameter, or when the command(s) are created, or ... [other options?]. Command Manager Another important design aspect is the undo/redo capability. Note that these are not commands, but are meta-commands. That is, they do not operate on the target (the model; a VStack), but rather operate on the invoker (Command Manager). Each ConcreteCommand class should contain (encapsulate) the full knowledge of that action, including both its operatoin (execute()), and its reversal (undo()). It would be a bad design to have some external agent (e.g. the command manager) try to know what the proper undo was for any specific command. Command state Another main design issue for all commands is that they may (often) require some state. Some will require it for execution, others for the ability to perform an undo(). In any case, make sure that all commands are self-contained, with both an execute() and undo() method. You will have to consider if the push command has any initial state, specifically: VQ what is the relationship of the get-data dialog and the push command? One good way to test this decoupling is by utilizing its Open/Closed property. Consider adding a new command; clear, and make sure that you would not have to change any other existing command, nor the command manager. Additional Steps: - Add a new capability (and GUI button) to clear the stack 13 ASD Labs - [Harder] add a second stack, and a button to switch stacks. This means deciding how to associate the (current) target with commands. 14 ASD Labs State Lab: This is a very simple lab, but embodies a good example of the State pattern. It is to represent a car, which has a set of gears that it uses to drive at various speeds. Each gear can only support a specific speed range, and outside of that a gear change is needed. The control is via a simple GUI; Changes in the slider create an event which arrives at the ActionListener of the GUI. The actual logic for each state is very simple, basically the series of nested if statements represents the various states. The gear Ranges are: speed x=0 0<x<5 5<x<10 10<x<30 30<x<55 x>55 Gear park 1 2 3 4 5 Be sure that you have a model which represents the real world; that means you should have a car, transmission, and a set of gears. The original code that you get has one big if/case logic with all the states in it implicitly; public class Car{ public int changeSpeed(int speed){ if (speed == 0) { return 0; } else { if (speed > 0 && speed < 5) { return 1; } else { if (speed > 5 && speed < 10) { return 2; 15 ASD Labs } else { if (speed > 10 && speed < 30) { return 3; } else { if (speed > 30 && speed < 55) { return 4; } else { if (speed > 55 ) { return 5; } } } } } } return 0; } } VQ: What's the problem with this? The basic idea of course is to replace the single complex if statement with polymorphism over the set of concrete states. You also need to consider the context object, which manages the states. Because the current state is maintained in the context, you need to decide who/how/where the state transitions are determined and managed. We have discussed that in general the state trajectory should be encoded either, as a state table (or equivalent) in the context, or as a series of state transitions in the actual concrete states. The second of these is often the most appropriate and simple. In any case it should be the concrete states which determine the transition, either by explicitly returning the new state, or by returning some information to the context by which it will determine the transition. This implies that there is some link between the context and state. As always, you need to then determine how to best establish /use this relationship. Should the context pass a reference to itself to the state when it invokes the action method, by which the state can push the new state back to it? Or should the state actually return a next-state? (There could of course be other methods also.) State Trajectory Also note that you must respect the state trajectory, that only certain state transitions are allowed. This means that if you are in perhaps 1st gear, and it would require 5th gear to obtain the required speed, you need to have a series of shifts 1 2 ... 5, you cannot directly jump from 1 5. Whatever scheme you use for encoding state transitions, they must be in this sequential incremental manner. GUI Update Also notice that you need to have some way to update the GUI when a state changes. This is to be able to display the current gear (state). There are several ways to do this, but in any/every case you will have to consider how to have a link between the state(s) and the GUI for the update. 16 ASD Labs VQ: How could one have an update relationship without an explicit coupling? State Objects When and where should state objects be created? Should they be re-used? How, and who should do this? [We will later see how the singleton factory can solve this nicely.] 17 ASD Labs COR Lab: This is another simple lab. Here you have several independent viewing components, and you need to be able to compose them into a single unified viewer, which is extensible, and yet keep each of the components modular. The viewer is then dynamically extensible. The user enters a color...

Find millions of documents on Course Hero - Study Guides, Lecture Notes, Reference Materials, Practice Exams and more. Course Hero has millions of course specific materials providing students with the best way to expand their education.

Below is a small sample set of documents:

Maharishi - CS - 525
TimeLog report for CS525 LabsStudent: Lab:DateTime start Hours ActivityResultTotal Hours:
Maharishi - CS - 525
Advanced Software DevelopmentDaily TopicsDay 1: Overview of Advanced Software Systems o Elements of Software Development Definition of Advanced Software Development &amp; topics o Methods of ASD o Levels of Abstraction(s) Software Metrics Laws Pr
Maharishi - CS - 401
MPP Lab Programming StructuresLevel 1Objectives: Review Java Programming Structures o main, variables, control structures, operators, passing arguments. Compiling and running from the command line. Tasks: 1. Open the Notepad editor and write a
Maharishi - CS - 401
CS401 Modern Programming Practices (MPP) Lesson 2 Classes and Objects The Unity of Differences Wholeness Objects can be modeled in many different ways, depending on their relationships with each other. It is important to model the classes such that t
Maharishi - CS - 401
MPP LAB - CLASSES &amp; OBJECTS Level 1Objectives: Familiarize yourself with the Eclipse Integrated Development Environment (IDE). Familiarize yourself with the Java website and the Java API Documentation. Tasks: 1. Go to C:\Program Files\Java and fam
Maharishi - CS - 401
Modeling the Static/ Data Aspects of the SystemHaving employed use case analysis techniques in Chapter 9 to round out the SRS requirements specification, we're ready to tackle the next stage of modeling, which is determining how we're going to meet
Maharishi - CS - 401
Lesson 3 Lab 3.1 Page 1 of 2 COMPOSITION, ASSOCIATION &amp; DELEGATION Human Resource ApplicationObjectives: Learn how to implement Composition and Binary Associations. Learn how to implement Delegation and Propagation Create an application to keep t
Maharishi - CS - 401
Lesson 3 Lab 3.3 Page 1 of 2 REFLEXIVE ASSOCATIONS Reporting HierarchyObjectives: Learn how to implement Reflexive Associations. Practice more Delegation and Propagation. Add a reflexive association to the Position class in order to maintain a co
Maharishi - CS - 401
Lesson 5:InterfacesJava interface is similar to abstract except.No instance variables(except final variables)No implemented methods interface replaces classpublic interface Runnable { . }implements replaces extendsMyClass extends SuperCla
Maharishi - CS - 401
Template Method PatternDon't call us, we'll call you.Case Study: Rainbow CafeTraining manual:Coffee recipeBoil some water Pour boiling water over ground coffee beans Pour coffee into cup Add milk and sugar to cupTea recipeBoil some water Ste
Wisconsin - LANDSCAPE - 565
Lundrcupe E&amp;iogy ECoiogy 13: 65-77, 1998. @ 1998 Kluwer A c u d e m i c P u b l i s h &amp; s . P r i n t e d i n t h e N e t h e r l a n d s .Landscape context of rural residential development in southeastern Wisconsin (USA) IJames A. LaGro Jr.Depar
Maharishi - CS - 435
CS435 Algorithms DE CourseStudent ID 000-98-1280 000-98-1551 000-98-1148 000-98-1366 000-98-1368 000-98-1519 000-98-1070 000-98-1371 000-98-1487 000-98-1385 000-98-0984 000-98-1529 000-98-1284 000-98-1444 000-98-1288 000-98-1467 000-98-1248 000-98-1
Maharishi - CS - 581
Introduction To Jess and Jess SyntaxWhat Is Jess?1. A rules engine and scripting language developed by Ernest Friedman-Hill, based on the CLIPS rules language (which is based on C and has been the baseline standard for rules languages. 2. Jess pro
Maharishi - CS - 581
Facts And Rules In JessOverview of the Jess Rule Engine1. The Jess rule engine has a working memory in which data, called &quot;facts&quot; are &quot;asserted&quot; 2. Rules are inserted into the &quot;rule base&quot; and will operate on the facts in the working memory. 3. The
Maharishi - CS - 581
Jess ApplicationsPart I: The Tax Forms Adviser ApplicationOverview1. The Tax Forms Adviser application is an example of a (simple) expert system. Typically, expert systems provide an interactive interface with a user; the system gets input from
Maharishi - CS - 505
TimeLog report for CS525 LabsStudent: Lab:DateTime startHours ActivityResultTotal Hours:
Maharishi - CS - 505
COMP 505: Formal Methods in Programming Languages: The Perfection of Vedic Language Lesson 0: Introduction to Formal Methods in Programming Languages: Capturing wholeness at the Abstract Field LevelIn all areas of study, it is the ability to form ab
Maharishi - CS - 505
Review TopicsReview Topics: Week 1 IP, FP Lexical analysis micro/macro syntax tokens, phrases language paradigms destructive IPs Regular Expressions meta-language semantic gap Chomsky Hierarchy CFG, BNF meta-circular Interpreter Princi
Maharishi - CS - 450
Computer Networks Lab 1Use Telnet to Contact a Time Server, get a Web Page and Send an EmailPurpose:To learn how to use telnet to experiment with some application layer protocols.Overview:Use the telnet program to open a connection with network
Maharishi - CS - 450
Computer Networks Lab 2Download and Use a Packet Capture ToolPurpose:To learn how a packet capture tool works. Packet capture is especially useful when debugging network applications, so mastering the use of a packet capture tool will be especial
Maharishi - CS - 450
Computer Networks Lab 3Experience with FTPPurpose:To learn how to use the file transfer protocol, FTP, and analyze the packets involved with the transaction.Overview:The file transfer protocol is a basic networking protocol for moving files bet
Maharishi - CS - 450
Computer Networks Lab 4CRC Practice Purpose:To gain some experience with creating a CRC code for a byte array.Overview:Cyclic Redundancy Codes are used in some link layer protocols like HDLC. Java provides a class called CRC32 in the java.util.z
Maharishi - CS - 450
Computer Networks Lab 5Explore a DHCP ServerPurpose:To explore the DHCP protocol by accessing a DHCP server and testing the commands to get an IP address and renew it.Overview:The DHCP protocol is designed to provide a flexible way of allocati
Maharishi - CS - 450
Computer Networks Lab 7Looking up Internet Addresses in JavaPurpose:To gain experience with Java's InetAddress class and learn its many uses.Overview:The InetAddress class is Java's high-level representation for an IP address and it is widely
Maharishi - CS - 450
Computer Networks Lab 9bBuild a Web site DownloaderPurpose:To explore the URL class and gain experience using it to retrieve data from the network, you are asked to create a program to download a list of web sites.Overview:The URL class can re
Maharishi - CS - 450
Computer Networks: Wholeness on the move.CS450 Computer NetworksProfessor Mark RainbowBlock 5 January 20071-Computer Networks: Wholeness on the move.Maharishi University of Management is an Equal Opportunity Institution. 2006 Maharishi Un
Maharishi - CS - 450
Lesson 2 Physical LayerIntelligence on the move.Main Points1. The physical layer of the network reference model describes the mechanical, electrical and timing characteristics of the network. Transmission media are either guided media (copper or
Maharishi - CS - 450
Lesson 4 Media Access Control Layer - EthernetThe Unified Field is here, there and everywhere.Main Points1. The channel allocation problem is the central challenge of the MAC sublayer. Protocols for sharing access have evolved from static methods
Maharishi - CS - 450
Lesson 5 Media Access Control Layer WirelessThe Unified Field is here, there and everywhere.Main Points1. Wireless networking is the fastest growing segment of computer networks, and new specifications are rapidly evolving to meet the need for n
Maharishi - CS - 450
Lesson 6 Network Layer RoutingTaking the path of least action.Main Points1. Network layer routes packets from source to destination. The route may be pre-determined (in virtual-circuit subnets) or determined per packet (in datagram subnets). Acti
Maharishi - CS - 450
Computer Networks CS450 Mid-term ExamOctober 15, 2005 Name_ ID _ Circle the correct answer. Circle only one answer per question. 1. Why is the OSI Network Reference model still referenced in publications and discussions of network technology? a) It
Maharishi - CS - 203
LESSON 1 INTRODUCTION to COMPUTER PROGRAMMING 2 Progress Takes Place in Steps In this course we will build on your experience in previous programming courses to gain deeper knowledge and experience of Java programming. The experience of deeper inner
Maharishi - CS - 203
LESSON 2 REVIEW of JAVA The Knower, Known and Process of Knowing Java has some intrinsic types, but most of our work in programming is in creating new classes to represent the objects in the problem domain. Java includes math and logical operators, c
Maharishi - CS - 203
Pink Moon/ Nick Drake/ 4/3-Feb-2007/JazzSomersault/Zero/3/15-July-2007/AlternativeSomersault/Zero/3/1-Sept-2007/AlternativeSomersault/Zero/3/17-Nov-2007/AlternativeFearless/Taylor Swift/5/12-Dec-2008/PopDark Horse/Nickelback/4/20-Dec-2008/RockT
Maharishi - CS - 440
MAHARISHI UNIVERSITY OF MANAGEMENTCOMPUTER SCIENCE DEPARTMENT COMP 440 - CompilersProgramming Assignment 1Symbol Table ClassesIn this programming assignment, you are to write Java classes to implement a symbol table. The purpose of the symbol t
Maharishi - CS - 440
MAHARISHI UNIVERSITY OF MANAGEMENTCOMPUTER SCIENCE DEPARTMENTCOMP 440 - Compilers DEProgramming Assignment 4Phase 1 of the Type Checker Building the Symbol TableSTOP: Before you begin lab assignment 4, read and make sure you understand the han
Maharishi - CS - 440
MAHARISHI UNIVERSITY OF MANAGEMENTCOMPUTER SCIENCE DEPARTMENT COMP 440 - Compilers - DEProgramming Assignment 5Phase 2 of the Type CheckerOverview of the Project So far we have implemented two of the front-end components of our simple compiler (
Maharishi - CS - 505
AN INTRODUCTION TO FUNCTIONAL PROGRAMMING THROUGH LAMBDA CALCULUS Greg MichaelsonDepartment of Computing and Electrical Engineering Heriot-Watt University Riccarton Campus Edinburgh EH14 4AS9. FUNCTIONAL PROGRAMMING IN STANDARD ML 9.1. Introductio
Maharishi - CS - 505
MAHARISHI UNIVERSITY OF MANAGEMENT COMPUTER SCIENCE COMP 501 : Formal Methods in Programming LanguagesStudy Notes:Functional Programming &amp; Lambda CalculusThe underlying model of computation in functional programming is the function and the compu
Maharishi - CS - 450
Computer Networks Lab 1Use Telnet to Contact a Time Server, get a Web Page and Send an EmailPurpose:To learn how to use telnet to experiment with some application layer protocols.Overview:Use the telnet program to open a connection with network
Maharishi - CS - 450
Computer Networks Lab 2Download and Use a Packet Capture ToolPurpose:To learn how a packet capture tool works. Packet capture is especially useful when debugging network applications, so mastering the use of a packet capture tool will be especial
Maharishi - CS - 450
Computer Networks Lab 3Experience with FTPPurpose:To learn how to use the file transfer protocol, FTP, and analyze the packets involved with the transaction.Overview:The file transfer protocol is a basic networking protocol for moving files bet
Maharishi - CS - 450
Topics for ProjectTopics for presentations or research papers.Please write a 2-page paper on one of the following topics. The following questions may help guide your report. What are the main principles or ideas expressed in the technology? How do
Maharishi - CS - 525
ObjectObject-Oriented Application FrameworksMohamed Fayad Douglas C. SchmidtThe following is the guest editorial for the Communications of the ACM, Special Issue ObjectFrameworks, on Object-Oriented Application Frameworks Vol. 40, No. 10, October
Maharishi - CS - 525
Search for: Use + - ( ) &quot; &quot;within . Search helpIBM home | Products &amp; services | Support &amp; downloads | My account IBM developerWorks &gt; Java technology Building object-oriented frameworks Through its use of frameworks, Taligent, Inc. is realizing t
Maharishi - CS - 561
Mapping the Business Architecture to a Component-based Software Architecture through repeated application of patternsAli Arsanjani Maharishi University of ManagementMapping the Business Architecture to a Component-based Software ArchitectureMapp
Maharishi - CS - 561
Some Patterns for Software Architecturesby Mary Shaw Carnegie Mellon UniversityChapter?Software designers rely on informal patterns, or idioms, to describe the architectures of their software systems-the configurations of components that make
Maharishi - CS - 561
Externalizing Component Manners to Achieve Greater Maintainability through a Highly Re-configurable Architectural StyleAli Arsanjani IBM Global Services, USA Maharishi University of Management, DeMontfort University aarsanjani@acm.org AbstractThe m
Maharishi - CS - 435
Lesson 3 ALGORITHM ANALYSISProgress takes place in steps of activity and rest.Main Points1. Algorithms can be analyzed by stepping through the pseudo-code to calculate the number of primitive operations as a function of the input size. Progress i
Maharishi - CS - 435
Lesson 4 STACKS AND QUEUESKnowledge is Structured in ConsciousnessMain Points1. In the natural world, abstract layers of intelligence are more general, as they synthesize and harmonize more concrete, expressed layers. In data structures, the abst
Maharishi - CS - 435
Lesson 5 VECTORS, LISTS &amp; SEQUENCESExploring the Dynamics of Natural LawMain Points1. The Vector ADT extends the concept of an array storing objects by rank. The rank of an element is the number of elements preceding it. The main operations of th
Maharishi - CS - 435
Vectors12/28/05 16:00Vectors1Outline and ReadingThe Vector ADT (2.2.1) Array-based implementation (2.2.1)12/28/05 16:00Vectors2The Vector ADTThe Vector ADT extends the notion of array by storing a sequence of arbitrary objects An el
Maharishi - CS - 435
Lesson 6 TREES, PRIORITY QUEUES, &amp; HEAPSPure consciousness is a source of orderliness.Main Points1. The Tree ADT models a hierarchical structure between objects simplified to a parent-child relation. Nodes store arbitrary objects and connect to o
Maharishi - CS - 435
Heaps and Priority Queues2 5 9 7 6Heaps and Priority Queues1Priority Queue ADT ( 2.4.1)A priority queue stores a collection of items An item is a pair (key, element) Main methods of the Priority Queue ADTinsertItem(k, o) inserts an item with
Maharishi - CS - 435
Dictionaries and Hash Tables0 1 2 3 4025-612-0001 981-101-0002451-229-0004Dictionaries and Hash Tables1Dictionary ADT (2.5.1)The dictionary ADT models a searchable collection of keyelement items The main operations of a dictionary are se
Maharishi - CS - 525
MAHARISHI INTERNATIONAL UNIVERSITY 1971-1995MAHARISHI UNIVERSITYof MANAGEMENTEngaging the Managing Intelligence of NatureLab 6:Observer PatternObserver : LabObserver : Lab without the observer patternpublic class Counter {.public void
Maharishi - CS - 525
MAHARISHI INTERNATIONAL UNIVERSITY 1971-1995MAHARISHI UNIVERSITYof MANAGEMENTEngaging the Managing Intelligence of NatureLab 1:Strategy patternStrategy labStrategy labpublic class ScribbleCanvasListener implements MouseListener, MouseMot
Maharishi - CS - 525
MAHARISHI INTERNATIONAL UNIVERSITY 1971-1995MAHARISHI UNIVERSITYof MANAGEMENTEngaging the Managing Intelligence of NatureLab 2:Patterns:Iterator and VisitorIterator: LabIterator: Lab without iteratorvoid JButtonAllSwimmers_actionPerformed
Maharishi - CS - 525
MAHARISHI INTERNATIONAL UNIVERSITY 1971-1995MAHARISHI UNIVERSITYof MANAGEMENTEngaging the Managing Intelligence of NatureLab 5:State PatternState : Example without state patternpublic class Application { public class Person { static public
Maharishi - CS - 525
MAHARISHI INTERNATIONAL UNIVERSITY 1971-1995MAHARISHI UNIVERSITYof MANAGEMENTEngaging the Managing Intelligence of NatureAdvanced Software DevelopmentCS Faculty Computer Science DepartmentLesson 3:Patterns:VisitorVisitor : Labpublic clas
Maharishi - CS - 525
MAHARISHI INTERNATIONAL UNIVERSITY 1971-1995MAHARISHI UNIVERSITYof MANAGEMENTEngaging the Managing Intelligence of NatureLab 7:Chain of Responsibility PatternChain of Responsibility : LabFilesColorsOther 2005 Maharishi University of