Www.ilogix.com © I-Logix 1999-2004 Rhapsody C++ V5.0.1 17/01/2004E1-1 “Essential” Tool Training Basic Rhapsody Basic Rhapsody Rhapsody in C++ V5.0.1 17/01/04.

Slides:



Advertisements
Similar presentations
Interaction Design: Visio
Advertisements

AIMSweb Benchmark Online Training For AIMSweb Teacher Users
© Paradigm Publishing, Inc Excel 2013 Level 2 Unit 2Managing and Integrating Data and the Excel Environment Chapter 7Automating Repetitive Tasks.
Essential Rhapsody in C++
Using Macros and Visual Basic for Applications (VBA) with Excel
Overview QW Gateway is a new front-end to QuipWare
Advanced Microsoft Word Hosted by Jared Hoffman Topics Keyboard Shortcuts Customizing Toolbars and Menus Auto Format & Auto Correct Tabs Inserting Pictures.
Microsoft ® Office Word 2007 Training Table of Contents II: Customize your TOC [Your company name] presents:
The Rhapsody in C++ Tool Training "Essential" © I-Logix v2.3 25/9/2000 Bas-1 Essential Rhapsody in C++ Section 2 Basic Level.
© I-Logix Rhapsody C++ V /01/2004 E1-1 Exercise 2 : Count Down.
Microsoft Windows Vista Chapter 6 Customizing Your Computer Using the Control Panel.
Rhapsody in C++ Tool Training "Essential" © I-Logix v3.0 1/29/2001 Adv-1 Section 4 Advanced Level Concurrency.
© I-Logix Rhapsody C++ V /01/2004 E1-1 Exercise 3 : Dishwasher.
The Rhapsody in C++ Tool Training "Essential" © I-Logix v2.3 25/9/2000 Int-1 Essential Rhapsody in C++ Section 3 Intermediate Level.
Rhapsody in C++ Tool Training "Essential" © I-Logix v3.0 1/29/2001 Adv-1 Section 4 Advanced Level Multiplicity.
Ch 9 Managing Active Directory User Accounts. Objectives Create Organizational Unit Creating User Accounts in Active Directory Disabling, Enabling, and.
Access Tutorial 10 Automating Tasks with Macros
Chapter 9 Macros, Navigation Forms, PivotTables, and PivotCharts
Working with Drivers and Printers Lesson 6. Skills Matrix Technology SkillObjective DomainObjective # Understanding Drivers and Devices Install and configure.
In Shape with Visio Creating a Timeline To create a timeline 1.Open Visio Under Category, click Project Schedule. 3.Click Timeline, and.
1 ENG236: ENG236: C++ Programming Environment (2) Rocky K. C. Chang THE HONG KONG POLYTECHNIC UNIVERSITY.
Tutorial 6 Using Form Tools and Creating Custom Forms
® Microsoft Access 2010 Tutorial 6 Using Form Tools and Creating Custom Forms.
XP New Perspectives on Microsoft Office FrontPage 2003 Tutorial 4 1 Microsoft Office FrontPage 2003 Tutorial 4 – Using Shared Borders and Themes.
Using Form Tools and Creating Custom Forms Microsoft Access 2010.
Prepared by: Sanaz Helmi Hoda Akbari Zahra Ahmadi Sharif University of Tech. Summer 2006 An Introduction to.
Chapter 6 Generating Form Letters, Mailing Labels, and a Directory
Chapter 3: Using GUI Objects and the Visual Studio IDE.
6 th Annual Focus Users’ Conference 6 th Annual Focus Users’ Conference Discipline Referrals Presented by: Christine Lee Presented by: Christine Lee.
1 OPOL Training (OrderPro Online) Prepared by Christina Van Metre Independent Educational Consultant CTO, Business Development Team © Training Version.
Office 2003 Advanced Concepts and Techniques M i c r o s o f t Access Project 6 Switchboards, PivotTables, and PivotCharts.
CPS120: Introduction to Computer Science Compiling Your Programs Using Visual C++
1 OrderPro Point of Sale (POS) Training Prepared by Christina Van Metre Independent Educational Consultant CTO, Business Development Team © Training Version.
© Paradigm Publishing Inc. MICROSOFT WINDOWS XP MAINTAINING FILES AND CUSTOMIZING WINDOWS Section 2.
Microsoft Office 2007 Access Chapter 6 Using Macros, Switchboards, PivotTables, and PivotCharts.
Chapter One An Introduction to Visual Basic 2010 Programming with Microsoft Visual Basic th Edition.
Introduction to Visual Basic.NET Your First Visual Basic.NET Application.
Active-HDL Interfaces Debugging C Code Course 10.
COMPREHENSIVE Access Tutorial 6 Using Form Tools and Creating Custom Forms.
1 NORMA Lab. 5 Duplicating Object Type and Predicate Shapes Finding Displayed Shapes Using the Diagram Spy Using Multiple Windows Using the Context Window.
Hello World in the Forte IDE An introduction to the Forte IDE (integrated development environment) writing the classic “Hello World” program in Java.
Using Microsoft Visual Studio 2005 Original by Suma Rao Revised by John G. McMahon ( 9/6/2008 )
Office 2003 Post-Advanced Concepts and Techniques M i c r o s o f t Access Project 7 Advanced Report and Form Techniques.
Microsoft Outlook 2010 Chapter 3 Managing Contacts and Personal Contact Information with Outlook.
Creating a Custom Drawing Sheet Tutorial. Create a new standard drawing file from menu options Opening a Drawing Sheet.
The Next Generation. Parent Access Grade History and Attendance.
Microsoft Access 2010 Chapter 8 Advanced Form Techniques.
1 of 5 This document is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS DOCUMENT. © 2007 Microsoft Corporation.
Office 2003 Advanced Concepts and Techniques M i c r o s o f t Access Project 6 Creating an Application System Using Macros, Wizards, and the Switchboard.
FrontPage Tutorial Part 2 Creating a Course Web Site.
XP New Perspectives on Microsoft Office FrontPage 2003 Tutorial 7 1 Microsoft Office FrontPage 2003 Tutorial 8 – Integrating a Database with a FrontPage.
1 Fields Sacramento City College Engineering Design Technology.
Modify Tables and FieldsModify Tables and Fields Lesson 4 © 2014, John Wiley & Sons, Inc.Microsoft Official Academic Course, Microsoft Word Microsoft.
Lecture Set 2 Part A: Creating an Application with Visual Studio – Solutions, Projects, Files 8/10/ :35 PM.
1 Getting Started with C++ Part 1 Windows. 2 Objective You will be able to create, compile, and run a very simple C++ program on Windows, using Microsoft.
® IBM Software Group © 2007 IBM Corporation Module 3: Creating UML Diagrams Essentials of Modeling with IBM Rational Software Architect, V7.5.
CSC 230 (Blum)1 Visual Basic 2005 Hello World Fall 2005 T. Blum.
XP New Perspectives on Microsoft Office Access 2003, Second Edition- Tutorial 6 1 Microsoft Office Access 2003 Tutorial 6 – Creating Custom Forms.
Time to apply stuff… Faculty of Mathematics and Physics Charles University in Prague 5 th October 2015 Workshop 1 – Java Wrestling.
Create FormsCreate Forms Lesson 5 © 2014, John Wiley & Sons, Inc.Microsoft Official Academic Course, Microsoft Access Microsoft Access 2013.
Microsoft Visual C# 2010 Fourth Edition Chapter 3 Using GUI Objects and the Visual Studio IDE.
1. Using word you can create the document and edit them later, as and when required,by adding more text, modifying the existing text, deleting/moving.
Adobe ® Photoshop ® CS6 Chapter 1 Editing a Photo.
IBM Rational Rhapsody Advanced Systems Training v7.5
Chapter 7 Advanced Form Techniques
Download and Installation of code::blocks
Creating the First Program
Essential Rhapsody in C++
Presentation transcript:

© I-Logix Rhapsody C++ V /01/2004E1-1 “Essential” Tool Training Basic Rhapsody Basic Rhapsody Rhapsody in C++ V /01/04

© I-Logix Rhapsody C++ V /01/2004 E1-2 Agenda  Setting up Rhapsody in C++  Exercise 1: Hello World  Exercise 2 : Count Down  Properties  Exercise 3 : Dishwasher  Exercise 4 : Relations

© I-Logix Rhapsody C++ V /01/2004 E1-3 Setting Up Rhapsody  Install Microsoft Visual C++ 6.0, or alternatively Microsoft Visual Studio.NET or Borland bcc55 (note that this compiler can be downloaded from  Install Rhapsody in C++ V5.0.1 (Ensure that you do a “custom” installation and select the C++ framework source)  Install license (license.dat)  Create a work directory ex: “C:\Work” If you are using Visual Studio.NET 2003, then you may need to rebuild the Rhapsody framework.

© I-Logix Rhapsody C++ V /01/2004 E1-4 Before We Start  Rhapsody uses C++, which is CASE sensitive. Most of the errors that students make during this training course are due to entering text incorrectly  During this training, we will be using a naming convention where all classes start with an upper case, all operations and attributes with lower case. If two words are concatenated then the first letter of each word is capitalised ex: thisIsAnOperation, MyClass, anAttribute, …  Often during the training course, students take different lengths of time to complete the exercises. For those students who finish early there are many “Extended Exercises” that they can do.

© I-Logix Rhapsody C++ V /01/2004 E1-5 Exercise 1 : Hello World

© I-Logix Rhapsody C++ V /01/2004 E1-6 Creating a Project  Start up Rhapsody in C++ (development edition)  Within Rhapsody use the icon or file->new to create a new project called Hello in the directory C:\Work  Click OK then Yes to save project Make sure that the project is saved into the subdirectory with the same name “Hello” in directory C:\Work

© I-Logix Rhapsody C++ V /01/2004 E1-7 The Browser Browser Object Model Diagram The browser shows us everything that is in the model. Note that Rhapsody creates an Object Model Diagram

© I-Logix Rhapsody C++ V /01/2004 E1-8 Drawing a Class  In this Object Model Diagram, use the class icon to draw a class named Display Expand the browser to see that the class “Display” also appears in the browser

© I-Logix Rhapsody C++ V /01/2004 E1-9 Remove from View / Delete from Model  There are two ways of deleting a class, we can either remove the class from the view (this is what the “delete” key does) or we can delete the class from the model.  If we use the delete key or the menu “Remove from View” then the class Display is just removed from this diagram, but remains in the browser.  If we select “Delete from Model” then we must confirm with “Yes” in order to remove the class from the entire model.

© I-Logix Rhapsody C++ V /01/2004 E1-10 Adding a Constructor  The simplest way to add a constructor to our class is to double-click on the class to open the features (or right- click and select features).  Select the “Operations” tab and click on and select “Constructor”.  We don’t need any constructor arguments, so click “OK” to the following menu.

© I-Logix Rhapsody C++ V /01/2004 E1-11 Display Options  We would expect to see the constructor shown on the class on our Object Model Diagram.  We can control what gets displayed on this view of the class using the “Display Options”.  Right-click on the Display class and select “Display Options”, set the options to display “All” attributes and “All” operations.

© I-Logix Rhapsody C++ V /01/2004 E1-12 Display Constructor  We should be able to see that the constructor is now shown in both the browser and the OMD (Object Model Diagram) Constructor

© I-Logix Rhapsody C++ V /01/2004 E1-13 Adding an Implementation  Select the Display constructor in the browser and double- click to open the features window.  Select the implementation tab and enter the following: cout << “Hello World” << endl; If you want to close the window by clicking on the then make sure that you “Apply” the changes first.

© I-Logix Rhapsody C++ V /01/2004 E1-14 #include  Since we have used “cout”, we must do an include of the “iostream” header in our Display class.  In the browser, select the Display class and double-click to bring up the features.  Select the Properties tab (ensure that the “Common” filter is selected and enter into the “ImpIncludes” property. “ImpIncludes” is an abbreviation for Implementation Includes

© I-Logix Rhapsody C++ V /01/2004 E1-15 Renaming a Component  In order to generate code, we must first create a component.  Expand the components in the browser and rename the existing component called “DefaultComponent” to “Test”. Executable

© I-Logix Rhapsody C++ V /01/2004 E1-16 The Test Component  Now expand the Configurations and rename the DefaultConfig to Release

© I-Logix Rhapsody C++ V /01/2004 E1-17 Initial Instance  Select the Initialization tab, expand the Default package and select the Display class.  This means that the main will now create an initial instance of the Display class.

© I-Logix Rhapsody C++ V /01/2004 E1-18 Settings  We need to select an environment so that Rhapsody knows how to create an appropriate Makefile.  Select the Settings tab  Since we have the Microsoft Visual C++ compiler, we’ll use the default setting which is Microsoft We’ll explain the many other settings later

© I-Logix Rhapsody C++ V /01/2004 E1-19 Renaming our OMD  Expand the Object Model Diagrams in the browser and use the features dialog to rename the diagram from Model1 to “Overview”

© I-Logix Rhapsody C++ V /01/2004 E1-20 Generating Code  We’re now ready to generate code.  Save the model  Select Generate/Make/Run  Answer Yes to the question:

© I-Logix Rhapsody C++ V /01/2004 E1-21 Hello World  You should see the following:  Before continuing make sure that you stop the executable. You can do this by either closing the console window or by using the icon If there was a compilation error during compilation, then simply double-click on the error and Rhapsody will indicate where in the model the error occurred.

© I-Logix Rhapsody C++ V /01/2004 E1-22 The Generated Files  The generated files will be located in the following directory: Display class Main Executable Makefile

© I-Logix Rhapsody C++ V /01/2004 E1-23 Editing the Code  We can edit the generated files from within Rhapsody  Select the Display class, right-click and select “Edit Code”

© I-Logix Rhapsody C++ V /01/2004 E1-24 Modifying the Code  We can modify the generated code  In the Display.cpp file, change the implementation to print out “Constructed” instead of “Hello World”  Transfer the focus back to another window to roundtrip the modifications back into the model  Note that the model has been updated automatically In general, the roundtripping works very well, but beware not everything can be roundtripped!

© I-Logix Rhapsody C++ V /01/2004 E1-25 Displaying the Main and Make  The Main and Makefile can be displayed from within Rhapsody by simply right-clicking on the configuration and selecting edit:

© I-Logix Rhapsody C++ V /01/2004 E1-26 Project Files Generated code AutoSave The model Event History List Visual Basic Macros Reverse Engineering Log Rhapsody Workspace