INF120 IDE jGRASP

Download Report

Transcript INF120 IDE jGRASP

Development Environments
AUBG, COS dept
Lecture
Title:
Dev Env: jGRASP
(Extract from Syllabus)
Reference: www.jgrasp.org
1
Lecture Contents:
 jGRASP – Introduction
 jGRASP – Functionality
 jGRASP – Configuration
2
jGRASP – introduction
 jGRASP is a lightweight development environment,
implemented in Java, and runs on all platforms with a
Java Virtual Machine (Java version 1.5 or higher).
 jGRASP produces Control Structure Diagrams (CSDs)
for Java, C, C++, Objective-C, Ada, and VHDL;
Complexity Profile Graphs (CPGs) for Java and Ada;
UML class diagrams for Java;.
 jGRASP is developed by the Department of Computer
Science and Software Engineering in the Samuel Ginn
College of Engineering at Auburn University.
3
jGRASP – Functionality
J
4
jGRASP – functionality
Jgrasp home page
Intro Videos
getting started
Tutorials (pdf)
getting started
http://www.jgrasp.org/tutorials187/02_Getting_Started.pdf
PDF file: JGrasp02_Getting_Started.pdf
5
jGRASP – JGrasp02_Getting_Started.pdf
2.1 Starting jGRASP – page 2-2
jGRASP virtual desktop ( open to see fig 2.1)
menu bar
tool bar
left pane – Browse tab, Find tab, Debug tab
large pane – for UML and CSD windows
lower pane – Messages tab, run I/O tab
6
jGRASP – JGrasp02_Getting_Started.pdf
2.2 Quick Start- opening a program, compiling
and running – page 2-3
Open to see fig 2.2
Open to see fig 2.3
File > Open > select a file in a folder
Build > Compile
Build > Run |> Run as Application |> Run as Applet
7
jGRASP – JGrasp02_Getting_Started.pdf
2.3 Creating a New File – page 2-5
Open to see fig 2.4
File > New File > Java
File > New File > Other
8
jGRASP – JGrasp02_Getting_Started.pdf
Automatically maximized CSD window – page 2-6
Open to see fig 2.5
Settings > Desktop > check box switched on
9
jGRASP – JGrasp02_Getting_Started.pdf
2.4 Saving a File – page 2-8
After typing Java source, file must save. How?
File > Save | Save As
CTRL + S
To comment: Settings > check box Auto Save
10
jGRASP – JGrasp02_Getting_Started.pdf
2.5 Building Java programs - Recap – page 2-9
11
jGRASP – JGrasp02_Getting_Started.pdf
2.6 Interactions - page 2-10
12
jGRASP – JGrasp02_Getting_Started.pdf
2.7 Generating a Control Structure Diagram CSD
- page 2-12
Open to see fig. 2.10
View > Generate CSD
F2
13
jGRASP – JGrasp02_Getting_Started.pdf
2.7 Removing a Control Structure Diagram CSD page 2-12
Open to see fig. 2.10
View > Remove CSD
Shift - F2
14
jGRASP – JGrasp02_Getting_Started.pdf
2.8 Folding a Control Structure Diagram CSD page 2-14
Open to see fig 2.12
Double click on CSD symbols
View > Fold > options
15
jGRASP – JGrasp02_Getting_Started.pdf
2.9 Line Numbers - page 2-15
Open to see fig 2.13
View > check box Line Numbers
16
jGRASP – JGrasp02_Getting_Started.pdf
2.10 Compiling a Program: A Few More Details page 2-15
When you compile the program, it is automatically
saved.
Open to see fig 2.
Settings > check box Auto Save
17
jGRASP – JGrasp02_Getting_Started.pdf
2.11 Running a Program: Additional Options - page
2-18
Open to see fig 2.16
Run > check box Run in MSDOS Window
Run > Arguments
18
jGRASP – JGrasp02_Getting_Started.pdf
2.12 Using the Debugger - page 2-19
19
jGRASP – JGrasp02_Getting_Started.pdf
2.13 Opening File – Additional Options - page 2-22
Open to see fig 2.21
Open to see fig 2.22
20
jGRASP – JGrasp02_Getting_Started.pdf
2.14 Closing a File – page 2-24
File > Close
|Close All
Open to see fig 2.24
21
jGRASP – JGrasp02_Getting_Started.pdf
2.15 exiting jGRASP – page 2-25
22
jGRASP – configuration
J
23
Exercises/tasks
Run demo programs
Hello.java
OddEven.java
Search.java
24
Exercises/tasks
Modify the Search.java demo program in order to
implement the linear search algorithm
25
Exercises/tasks
Write a Java program to display command-line
arguments. Run the program with and without
command-line arguments
26
Thank You
For
Your Attention!
27