Presentation is loading. Please wait.

Presentation is loading. Please wait.

COMP14 RECITATION 1 by- Bian Wu. Bare Bone Environment MS-DOS Prompt (Command Interpreter) Notepad (editor, c:\autoexec.bat) Jvc (J++ compiler) Jview.

Similar presentations


Presentation on theme: "COMP14 RECITATION 1 by- Bian Wu. Bare Bone Environment MS-DOS Prompt (Command Interpreter) Notepad (editor, c:\autoexec.bat) Jvc (J++ compiler) Jview."— Presentation transcript:

1 COMP14 RECITATION 1 by- Bian Wu

2 Bare Bone Environment MS-DOS Prompt (Command Interpreter) Notepad (editor, c:\autoexec.bat) Jvc (J++ compiler) Jview (J++ interpreter) ObjectEditor

3 Setting Path and Classpath Path Class Path List of Command Directories Must have Jvc and Jview Directories List of Library Directories, Jar Files, Zip Files Add oe.jar, shapes.jar, swingall,jar

4 Setting Path and Classpath SET PATH=%PATH%;C:"\Program Files\Microsoft Visual Studio\VJ98" SET CLASSPATH=%CLASSPATH%;.;D:\Java\lib\oe.jar;D:\Java\lib\shapes.jar;D:\Java\lib\swingall.jar Reboot! previous classpath current directory jar files may be zipped

5 Any question on assignment 1 implemented with bare-bone environment? Next, we’ll see how to do it in Visual J++...

6 Launch Visual J++ choose ‘new project’ choose ‘Empty Project’

7 Choose the location and the name of the project Press [Open] button

8 Select menu Project|Add Class...

9 Type the name of the class

10 A new source code window will appear (Visual J++ has already added some code for you)

11 Edit your source code and save it

12 Select menu Build|Build

13 If no error in your source code, you will pass the build Go to the directory of the project, you should see the class file There will be some other files (related to the project)

14 Some questions... Define class, method, object, variable, formal parameter, actual parameter, type, statement, return statement, and expression.

15 What are the case conventions for naming classes, methods, and variables Start variable name with lowercase letter (weight). Start class name with uppercase letter (ABMICalculator) Start each new word with upper case letter (ASquareCalculator) Use the variable, method class names, which are self- explaining

16 Why is it useful to follow style principles? It’s easier for you to program It’s easier for others to understand your source code It’s easier to avoid some ‘silly errors’


Download ppt "COMP14 RECITATION 1 by- Bian Wu. Bare Bone Environment MS-DOS Prompt (Command Interpreter) Notepad (editor, c:\autoexec.bat) Jvc (J++ compiler) Jview."

Similar presentations


Ads by Google