ebook img

Turtle Graphics implementation using a graphical dataflow programming approach. PDF

202 Pages·1.8 MB·en_US
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Turtle Graphics implementation using a graphical dataflow programming approach.

DUDLEY > uBRARY NAVAL POSTGRADUATE SCHOOL MONTEREY CA 93943-5101 Approved for public release; distribution is unlimited Turtle Graphics Implementation Usinga GraphicalDataflow ProgrammingApproach by RobertSteven Lovejoy Lieutenant, UnitedStates Navy B.S., Bradley University, 1983 Submitted in partial fulfillment ofthe requirements for the degree of MASTER OF COMPUTER SCIENCE from the NAVAL POSTGRADUATE SCHOOL September, 1992 UlM^Lv/\3,Mrlcl; URITYCLASSIFICATIONOFTHISPAGE REPORT DOCUMENTATION PAGE REPORTSECURITYCLASSIFICATION UNCLASSIFIED 1b. RESTRICTIVE MARKINGS . SECURITY CLASSIFICATION AUTHORITY 3. DISTRIBUTION/AVAILABILITYOF REPORT Approved for public release; DECLAsslFlcATiON/bOWNGRAblNG SCHEDULE . distribution is unlimited PERFORMING ORGANIZATION REPORT KIUMBER(s) 5. MONITORING ORGANIZATION REPORT NUMBER(s) NAME OF Performing ORGANIZATION 6b. OFFICE SYMBOL 7a. NAME OPMONITORINGORGANIZATION omputer Science Dept. (ifapplicable) Naval Postgraduate School aval Postgraduate School 37 ADDRESS (City, State, andZIPCode) 7b.ADDRESS (City, State, andZIPCode) onterey, CA 93943-5000 Monterey, CA 93943-5000 NAME OF FUNDING/SPONSORING 8b. OFFICE SYMBOL 9. PROCUREMENTINSTRUMENTIDENTIFICATION NUMBER ORGANIZATION (ifapplicable) ADDRESS (City, State, andZIPCode) 10. SOURCE OF FUNDING NUMBERS PROGRAM PROJECT TASK WORKUNI ELEMENTNO. NO. NO. ACCESSIO TITLE (IncludeSecurityClassification) . JRTLE GRAPHICS IMPLEMENTATION USING A GRAPHICALDATAFLOW PROGRAMMING APPROACH PERSONALAUTHOR(S) . Lovejoy, Robert Steven a. TYPE OFREPORT 13b. TIME COVERED 14. DATEOF REPORT(Year, Month, Day) 15. PAGE COUNT aster sThesis FROM to: 1992, September 194 SUPPLEMENTARY NOTATION The views expressed in this thesis are those ofthe authorand do not reflect the offic policy or position ofthe Department ofDefense or the United States Government COSATI CODES 18. SUBJECTTERMS(Continueonreverseifnecessaryandidentifybyblocknumber) OBJECT ORIENTED PROGRAMMING, TURTLE GRAPHICS, FIELD GROUP SUB-GROUP VISUAL DATAFLOW PROGRAMMING ABSTRACT(Continueonreverseifnecessaryandidentifybyblocknumber) This thesis expands the concepts of object-oriented programming to implement a visual dataflow programi nguage. Themain thrustofthisresearchis to developafunctional prototypelanguage,based upon theTurtleGr LOGO 5 tool provided by programming language, forchildren to develop both theirproblem solving skills, as their general programming skills. The language developed for this thesis was implemented in the object-oriented, dataflow programming lang ograph. The dataflow paradigm was emulated in order to provide a more intuitive, easy to learn programming ronment for children to use. Additionally, Prograph was chosen because it provides the necessary base class, sily implement an interactive user interface, and it provides the necessary primitive operations for all grail awing routines. This thesis demonstrates a prototype for a potential visual programming language that can be used at all levej ucation to teach problem solving, higher-order thinking skills, mathematical concepts, and the fundamental mputer science. disTribuTiOn/AvaIlaBIlITYOF ABSTRACT 21 ABSTRACTSECURITY CLASSIFICATION . | UNCLASSIFIED/UNLIMITED fj SAMEAS RPT." fj DTIC USERS UNCLASSIFIED iTJhsjoammaEsOPRWEus,POPnrsoIfb.L,EjCnodmipViudtUeArL,S,ci.ence Dept, ~NPTST 2(24b.08T)EL6E4P6H-O2N1E7(4IncludeArea Code) *WffiSYMBOL FORM 1473,84MAR 83APRedition maybeuseduntil exhausted SECURITYCLASSIFICATION OFTHIS PAGI All othereditionsareobsolete UNCLASSIFIED ABSTRACT This thesis expands the concepts ofobject-oriented programming to implement a visual dataflow programming language. The main thrust of this research is to develop a functional prototype language, based upon the Turtle Graphics tool LOGO provided by programming language, for children to develop both their problem solving skills as well as their general programming skills. The language developed for this thesis was implemented in the object-oriented, dataflow programming language Prograph. The dataflow paradigmwas emulated in order to provide a more intuitive, easy to learn programming environment for children to use. Additionally, Prograph was chosen because it provides the necessary base classes to easily implement an interactive user interface and it provides the necessary primitive operations for all graphics drawing routines This thesis demonstrates a prototype for a potential visual programming language thatcan be used atall levels ofeducation to teach problem solving, higher- order thinking skills, mathematical concepts, and the fundamentals of computer science. Ul $335$ Table Of Contents CI INTRODUCTION I. 1 SURVEY OF THE LITERATURE II. 3 A. OBJECT-ORIENTED PROGRAMMING 3 1. Classes/Objects and Related Variables and Methods 4 2. Inheritance 5 3. Encapsulation 7 4. Polymorphism... 8 B. TURTLE GRAPHICS PROGRAMMING LANGUAGE 9 1. Turtle Graphics Origin 9 2. Overall Educational Benefit 10 a. Case Studies 10 b. Problem Solving Skills 11 c. Specific Curriculum Benefits 12 3. The Language 13 a. Turtle Space 13 b. Making Shapes 14 c. Making Procedures 14 d. Generalizing Procedures 15 C. PROGRAPH: AVisual Dataflow Program Style 16 1. Visual Systems-Iconic Based 17 a. Classes 17 b. Attributes 18 c. Methods 19 2. Visual Systems-Dataflow Based 20 a. Message Passing/Invoking a Method 22 b. Control Structures 23 III. DATAFLOW TURTLE GRAPHICS 28 A. LANGUAGE EVOLUTION 28 B. WHY VISUAL PROGRAMMING 29 IV DUDLEY KNOX LIBRARY NAV.AL POSTGRADUATE SCHOOL ^^..S*...™<&™ 1. Dual Brain Theory 2. A Need For a New Programming Style 30 WHY DATAFLOW PROGRAMMING C. 30 1. Executable versus Non-Executable Diagrams 31 2. Dataflow Functionality 31 D. ICONIC LANGUAGES 32 1 Iconic Guidelines 32 . E. TURTLE GRAPHICS DESIGN AND IMPLEMENTATION 33 1. Developing Turtle Class/Objects and Methods 34 a. Class Hierarchy 34 b. Turtle/pTurtle Class Definitions 35 c. User Interface Design and Implementation: First Phase 36 2. Integration ofTurtle Code and Dataflow Programming Code 39 a. Class Hierarchy 39 b. DFObject and Descendents 40 c. User Interface Design and Implementation: Second Phase 41 d. Program Objects: Icon-Description and Functionality 44 IV. PROBLEM SOLVING WITH DATAFLOW TURTLE GRAPHICS 48 A. GENERALDISCUSSION 48 B. PROBLEM STATEMENT 48 C. DEVELOPING A SOLUTION 48 1. DFTG's Object-Oriented Approach to Problem Solving 48 2. "Man-Project" Problem Reduction 49 a. Create Turtles 49 b. Creating the Head 49 c. Create a Face 50 d. Create a body 50 e. Create a bowtie 51 f. Create legs 53 . g. Create arms 54 h. Final Code Encapsulation 54 SUMMARY, CONCLUSIONS, & SUGGESTIONS FOR FUTURE V. RESEARCH 58 SUMMARY A. 58 CONCLUSIONS B. 59 SUGGESTIONS FOR FUTURE RESEARCH C. 59 1 Completion of"user-defined Turtle command" functionality 60 2. Completion of"user-help" functionality 60 3. Expand language control constructs 60 4. Fully implement Error detection/correction capabilities 60 5. Incorporate a programming pallet ofavailable commands 61 6. Implement additional Turtle functionality 61 7. Perform statistical studies ofuser effectiveness 61 APPENDIXA - USER COMMAND/METHOD DEFINITIONS 62 APPENDIX B - NEW TURTLE GRAPHICS - SOURCE CODE 66 LIST OF REFERENCES 180 BIBLIOGRAPHY 182 INITIAL DISTRIBUTION LIST 183 VI

See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.