Teach.NET Workshop Series Track 4: AP Computer Science with.NET and J#

Slides:



Advertisements
Similar presentations
Wrap-up: Where Do You Go From Here? MicrosoftIntroducing CS using.NETJ# in Visual Studio.NET Objectives “.NET is the future of software development.
Advertisements

© by Pearson Education, Inc. All Rights Reserved.
Visual Basic 2010 How to Program Reference: Instructor: Maysoon Bin Duwais slides Visual Basic 2010 how to program by Deitel © by Pearson Education,
About the Presentations The presentations cover the objectives found in the opening of each chapter. All chapter objectives are listed in the beginning.
2. Developing in.NET and C#. 2 Microsoft Objectives “Microsoft.NET development is based on an underlying framework of tools and classes. These tools and.
Lecture 9: Debugging & Testing. 9-2 MicrosoftIntroducing CS using.NETJ# in Visual Studio.NET Objectives “Unfortunately, errors are a part of life. Some.
Lecture 2: An Introduction to J# and.NET. 2 MicrosoftIntroducing CS using.NETJ# in Visual Studio.NET 2-2 Objectives “Microsoft.NET is based on the.NET.
2. Introduction to the Visual Studio.NET IDE 2. Introduction to the Visual Studio.NET IDE Ch2 – Deitel’s Book.
Joe Hummel, PhD Dept of Mathematics and Computer Science Lake Forest College Lecture 8: WebForms — Web-based.
1 ENG236: ENG236: C++ Programming Environment (2) Rocky K. C. Chang THE HONG KONG POLYTECHNIC UNIVERSITY.
A First Program Using C#
AP ® Marine Biology Simulation Case Study Alyce Brady Kalamazoo College.
ACM/JETT Workshop - August 4-5, Marine Biology Case Study (MBCS) A Discussion.
AP ® Marine Biology Simulation Case Study Alyce Brady Kalamazoo College.
Marine Biology Simulation Case Study Alyce Brady Kalamazoo College.
Teach.NET Workshop Series Track 4: AP Computer Science with.NET and J#
Joe Hummel, PhD Dept of Mathematics and Computer Science Lake Forest College
Architecture of.NET Framework .NET Framework ٭ Microsoft.NET (pronounced “dot net”) is a software component that runs on the Windows operating.
11 Getting Started with C# Chapter Objectives You will be able to: 1. Say in general terms how C# differs from C. 2. Create, compile, and run a.
Lesley Bross, August 29, 2010 ArcGIS 10 add-in glossary.
Teach.NET Workshop Series Track 4: AP Computer Science with.NET and J#
IE 411/511: Visual Programming for Industrial Applications
Virtual techdays INDIA │ Nov 2010 Developing Office Biz Application using WPF on Windows 7 Sarang Datye │ Sr. Consultant, Microsoft Sridhar Poduri.
Introduction to Programming with Java. Overview What are the tools we are using – What is Java? This is the language that you use to write your program.
CSCA48 Course Summary.
Lecture 1 Programming in C# Introducing C# Writing a C# Program.
Teach.NET Workshop Series Track 4: AP Computer Science with.NET and J#
Lecture Set 1 Part C: Understanding Visual Studio and.NET – Applications, Solutions, Projects (no longer used – embedded in Lecture Set 2A)
AP ® Marine Biology Simulation Case Study Alyce Brady Kalamazoo College.
Joe Hummel, PhD Dept of Mathematics and Computer Science Lake Forest College
KATHOLIEKE UNIVERSITEIT LEUVEN 1.NET Curriculum Workshop Teaching Software Security: Case Studies on the.NET Framework Frank Piessens and Wouter Joosen.
Joe Hummel, PhD Dept of Mathematics and Computer Science Lake Forest College
Visual Basic.NET BASICS Lesson 1 A First Look at Microsoft Visual Basic.NET.
Module 1: Getting Started. Introduction to.NET and the.NET Framework Exploring Visual Studio.NET Creating a Windows Application Project Overview Use Visual.
Module 2: Using Microsoft Visual Studio.NET. Overview Overview of Visual Studio.NET Creating an ASP.NET Web Application Project.
Microsoft Visual Basic 2005 BASICS Lesson 1 A First Look at Microsoft Visual Basic.
Teach.NET Workshop Series Track 4: AP Computer Science with.NET and J#
Teach.NET Workshop Series Track 4: AP Computer Science with.NET and J#
Teaching with the AP ® Marine Biology Simulation Case Study Materials mostly from: Alyce Brady(Case Study Author) Kathy Larson(Case Study Teachers' Guide.
Teaching with the AP ® Marine Biology Simulation Case Study Materials mostly from: Alyce Brady(Case Study Author) Kathy Larson(Case Study Teachers' Guide.
ADD-IN EXPRESS World-class Office extensions with little coding.
Teach.NET Workshop Series Track 4: AP Computer Science with.NET and J#
Teach.NET Workshop Series Track 4: AP Computer Science with.NET and J#
Copyright (c) 2003 by Prentice Hall Provided By: Qasim Al-ajmi Chapter 2 Introduction to Visual Basic Programming Visual Basic.NET.
IE 411/511: Visual Programming for Industrial Applications Lecture Notes #2 Introduction to the Visual Basic Express 2010 Integrated Development Environment.
Why Learn Android? Largest installation base of any operating system Over 20,000 Android devices exist Businesses will likely move more to device-based.
Greenfoot.
Teaching with the AP® Marine Biology Simulation Case Study
Dive Into® Visual Basic 2010 Express
Chapter 2: The Visual Studio .NET Development Environment
INF230 Basics in C# Programming
CSC207 Fall 2016.
Development with Eclipse
Introduction to Event-Driven Programming
Looking at our “Getting Started” application
Auburn University COMP 2710 Software Construction xCode Development Environment for C++ Programming in Mac OS Dr. Xiao.
Chapter 2 – Introduction to the Visual Studio .NET IDE
Visual programming Chapter 1: Introduction
Introduction to the Visual C# 2005 Express Edition IDE
Module 0: Introduction Chapter 2: Getting Started
Module 1: Getting Started
Principles of report writing
Chapter 2 – Introduction to the Visual Studio .NET IDE
Java External Libraries & Case Study
Creating Your First C Program Using Visual Studio 2010
Chapter 7 –Implementation Issues
Creating Your First C Program Using Visual Studio 2010
Objects First with Java A Practical Introduction using BlueJ
Objects First with Java A Practical Introduction using BlueJ
C# and ASP.NET Programming
Presentation transcript:

Teach.NET Workshop Series Track 4: AP Computer Science with.NET and J#

“AP Computer Science with.NET and J#” Lecture 11: The Marine Biology Simulation Case Study Microsoft.NET Workshops for Teachers

11-3 MicrosoftAP Computer Science with.NET and J# Workshop Track LectureTopic 7Algorithms and Algorithm Analysis 8Debugging and Exception Handling 9Applying Object-oriented Design Principles in Your Classes 10Using Inheritance to Design a Set of Classes 11MBS CS: the Marine Biology Simulation Case Study 12Extending the MBS CS 13Interfaces and Interface-based Programming 14Extending the MBS CS, Part 2 15Stacks, Queues and Invariants 16Linked Data Structures and the Linked-list 17Trees and Recursion 18Collection Classes and Iteration 19Additional Resources and Ideas

11-4 MicrosoftAP Computer Science with.NET and J# Lecture — Objectives “A lot can be learned from the study of a realistic application. The AP Marine Biology Simulation serves this role, demonstrating OO design techniques in the creation of a flexible, extensible framework for student exploration. Both AP CS exams expect students to be familiar with this case study, its core classes, and their methods. It’s mandatory that instructors cover this material...” Topics: –Overview of MBS CS –Architecture of.NET Version –Class Design [ Joe Hummel, Lake Forest College ]

11-5 MicrosoftAP Computer Science with.NET and J# Part 1 Overview…

11-6 MicrosoftAP Computer Science with.NET and J# The AP Marine Biology Simulation The AP MBS is a case study of a real application –in theory it simulates a marine environment filled with fish –in reality it’s a framework for student exploration

11-7 MicrosoftAP Computer Science with.NET and J# Goals The AP MBS has a number of goals for students: –work with a large program –read source code written by others –see good design in action –appreciate good documentation –consider testing in a non-trivial context –encounter implementation trade-offs –approximate the apprentice experience

11-8 MicrosoftAP Computer Science with.NET and J# Resources General information about AP MBS CS: – – –" MBCS Narrative " for students –" MBCS Instructor's Guide " for teachers –hundreds of pages of info… MBS CS originally developed by Alyce Brady and others J# is a port of original version to J# and.NET: – –core classes are pure Java & identical to original version –runs in Visual Studio 2005 –[ Can’t find download? Also included in lecture’s “Demos” folder. ]

11-9 MicrosoftAP Computer Science with.NET and J# Approach The MBCS Narrative presents case study as series of chapters: 1. experiment with simulation program 2. tour program's internal architecture 3. modify an existing class so fish breed, and die 4. use inheritance to introduce specialized fish 5. introduce memory-efficient environment through an interface Chapters 1-4 are covered on AP CS A exam Chapters 1-5 are covered on AP CS AB exam

11-10 MicrosoftAP Computer Science with.NET and J# Getting Started 1.Download J# version of AP Marine Biology Case Study: – 2.Install by double-clicking APCaseStudy-MBS.msi file 3.Start, Programs, MBS Case Study…, Visual J#.NET Solution 4.Opens in Visual Studio 2005, press F5 to compile & run…

11-11 MicrosoftAP Computer Science with.NET and J# Experiment… You need fish, and fish need an environment in which to live… File >> Open for existing envs –"onefish" –"fish" –etc. File >> Create to create your own –bounded (aquarium) or unbounded (ocean!) –select type & color of fish from drop-downs –click on empty cells to create fish Run simulation!

11-12 MicrosoftAP Computer Science with.NET and J# Demo! Running the MBS CS…

11-13 MicrosoftAP Computer Science with.NET and J# Part 2 Architecture…

11-14 MicrosoftAP Computer Science with.NET and J# It’s a Large Application AP MBS app has 4 components: –MBSCore :core classes (pure Java, students work on this code) –MBSBB :black box classes (pure Java, support code) –MBSEnvGUI :.NET UI control (support code for user interface) –MBSGUI :.NET Windows application (i.e. the forms) MBSCore.dll MBSGUI.exe MBSBB.dll environment.dat MBSEnvGUI.dll

11-15 MicrosoftAP Computer Science with.NET and J# Visual Studio.NET Solution Installed into “ C:\Program Files\MBS Case Study for Visual J#.NET ” –open “ Code ” sub-folder –each component is a separate VS Project / sub-folder

11-16 MicrosoftAP Computer Science with.NET and J# Opening the Solution Use Start menu, or double-click on.sln file This is what you'll see: –MBSBB hidden by default –students open & work on MBSCore project –students can safely ignore MBSEnvGUI & MBSGUI –CustomResXGenerator rebuilds resource file when you extend app with new images, etc. –to run, press F5 as usual!

11-17 MicrosoftAP Computer Science with.NET and J# Demo! The Visual Studio Solution…

11-18 MicrosoftAP Computer Science with.NET and J# This Looks Complex? Like most real apps, they look complex at first But you can safely ignore most of the code –this is the beauty of a good, component-based design! Students are meant to focus on MBSCore classes –and ignore the rest…

11-19 MicrosoftAP Computer Science with.NET and J# Part 3 Design…

11-20 MicrosoftAP Computer Science with.NET and J# Overview of the Core Fish classes: –Fish move around in an environment –Fish are uniquely identified by an ID –Fish also have a location, a direction and a color –MBS ships with two fish: Darter and Slow Environment classes: –An environment has a data structure to keep track of the fish –MBS ships with two environments: bounded & unbounded Simulation class: –Contains the code to drive the simulation

11-21 MicrosoftAP Computer Science with.NET and J# public static void main(…) { // create environment, then add fish to environment… BoundedEnv env = new BoundedEnv(5, 10); Fish f1 = new Fish(env, new Location(1, 2)); Fish f2 = new Fish(env, new Location(1, 4)); Fish f3 = new Fish(env, new Location(3, 2)); // create display with 1 sec simulation delay (1000 ms) SimpleMBSDisplay display; display = new SimpleMBSDisplay(env, 1000); // now create simulation, which will contain env, fish, & display… Simulation sim = new Simulation(env, display); while (true) // run indefinitely… sim.step(); } //main public static void main(…) { // create environment, then add fish to environment… BoundedEnv env = new BoundedEnv(5, 10); Fish f1 = new Fish(env, new Location(1, 2)); Fish f2 = new Fish(env, new Location(1, 4)); Fish f3 = new Fish(env, new Location(3, 2)); // create display with 1 sec simulation delay (1000 ms) SimpleMBSDisplay display; display = new SimpleMBSDisplay(env, 1000); // now create simulation, which will contain env, fish, & display… Simulation sim = new Simulation(env, display); while (true) // run indefinitely… sim.step(); } //main Main Program Here's the rough idea:

11-22 MicrosoftAP Computer Science with.NET and J# Simulation Class Each step of simulation gets fish to “act”… public class Simulation { private Environment theEnv; private EnvDisplay theDisplay;. public void step() { Locatable[] fish = theEnv.allObjects(); // fish in env… for (int i=0; i<fish.length; i++) // for each fish, act… { Fish f = (Fish) fish[i]; f.act(); // fish may move, eat, breed, die, do nothing, … } theDisplay.showEnv(); // now draw result of fish acting up! } } //class public class Simulation { private Environment theEnv; private EnvDisplay theDisplay;. public void step() { Locatable[] fish = theEnv.allObjects(); // fish in env… for (int i=0; i<fish.length; i++) // for each fish, act… { Fish f = (Fish) fish[i]; f.act(); // fish may move, eat, breed, die, do nothing, … } theDisplay.showEnv(); // now draw result of fish acting up! } } //class

11-23 MicrosoftAP Computer Science with.NET and J# Summary Case studies are an important tool for learning AP Marine Biology Simulation is a good app to study –component-based –elegant object-oriented design –large and complex enough to yield non-trivial study –lots of room for exploration The J# version of the AP MBS CS was ported properly: –pieces which must be pure Java remain pure Java –pieces that could be rewritten were rewritten to use.NET e.g. the GUI is based on.NET Framework Class Library, not JCL

11-24 MicrosoftAP Computer Science with.NET and J# Resources Web site for slides, demos, associated lab exercises: – – –

11-25 MicrosoftAP Computer Science with.NET and J# That’s it! Next up: LectureTopic.. 12Extending the MBS CS......