Preparation: Follow the instructions on the course website to install Java JDK and jgrasp on your laptop.

Similar documents
COP2800 Homework #3 Assignment Spring 2013

Lab 0: Compiling, Running, and Debugging

CS1150 Principles of Computer Science Loops

Project Extranet User Guide

Student Handbook for E*Value

CSCI L Topics in Computing Fall 2018 Web Page Project 50 points

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL

OpenSceneGraph Tutorial

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL

Lab 4. Name: Checked: Objectives:

Ascii Art Capstone project in C

CSE 361S Intro to Systems Software Lab #2

LAB 7 (June 29/July 4) Structures, Stream I/O, Self-referential structures (Linked list) in C

Municode Website Instructions

Web of Science Institutional authored and cited papers

CS1150 Principles of Computer Science Introduction (Part II)

Populate and Extract Data from Your Database

Date: October User guide. Integration through ONVIF driver. Partner Self-test. Prepared By: Devices & Integrations Team, Milestone Systems

Gmail and Google Drive for Rutherford County Master Gardeners

These tasks can now be performed by a special program called FTP clients.

Lab 1 - Calculator. K&R All of Chapter 1, 7.4, and Appendix B1.2

McGill University School of Computer Science COMP-206. Software Systems. Due: September 29, 2008 on WEB CT at 23:55.

Using the Swiftpage Connect List Manager

Project #1 - Fraction Calculator

6 Ways to Streamline Your Tasks in Outlook

Using the Menu: Explain cut, copy, and paste.

Student Guide. Where can I print? Charges for Printing & Copying. Top up your Print Credits Online, whenever you like

Using the Swiftpage Connect List Manager

Importing data. Import file format

Lab 1 - Calculator. K&R All of Chapter 1, 7.4, and Appendix B1.2 Iterative Code Design handout Style Guidelines handout

Systems & Operating Systems

Exercise 4: Working with tabular data Exploring infant mortality in the 1900s

Project 3 Specification FAT32 File System Utility

Pages of the Template

Exporting and Importing the Blackboard Vista Grade Book

Assignment #5: Rootkit. ECE 650 Fall 2018

Faculty Textbook Adoption Instructions

Entering an NSERC CCV: Step by Step

MyUni Adding Content. Date: 29 May 2014 TRIM Reference: D2013/ Version: 1

Eastern Mediterranean University School of Computing and Technology Information Technology Lecture2 Functions

ENSC 351 software installation instructions

Lab 5 Sorting with Linked Lists

WebEx Web Conferencing Quick Start Guide

MICRONET INTERNATIONAL COLLEGE BDTVEC ND in Computer Studies MULTIMEDIA AND WEB DESIGN (MWD) ASSIGNMENT 3 (20%) Due Date: 31st January 2013

Guide to getting started in J2ME for the Motorola A780 phone

Assignment 10: Transaction Simulation & Crash Recovery

SUB-USER ADMINISTRATION HELP GUIDE

TECHNICAL REQUIREMENTS

REFWORKS: STEP-BY-STEP HURST LIBRARY NORTHWEST UNIVERSITY

SGL Observatory Automation. ASCOM Motor Focuser Control Getting Started Guide

Getting Started with the Web Designer Suite

Integrating QuickBooks with TimePro

Homework: Populate and Extract Data from Your Database

Lab 2 Temperature Measurement System

Primitive Types and Methods. Reference Types and Methods. Review: Methods and Reference Types

My Dashboard Instructions

All Academy Day: Router Configuration and Troubleshooting Event Details

ClassFlow Administrator User Guide

Relius Documents ASP Checklist Entry

CS1150 Principles of Computer Science Methods

Enabling Your Personal Web Page on the SacLink

TN How to configure servers to use Optimise2 (ERO) when using Oracle

Properties detailed info There are a few properties in Make Barcode to set for the output of your choice.

Tips and Tricks in Word 2000 Part II. Presented by Carla Torgerson

ECE 545 Project Deliverables

Procedures for Developing Online Training

MySqlWorkbench Tutorial: Creating Related Database Tables

Tutorial 5: Retention time scheduling

Chapter 2 Basic Operations

Trimble Survey GNSS Firmware Version 4.81 (July 2013)

IBM Cognos TM1 Web Tips and Techniques

mconnect Lead Management System 2.0

TRAINING GUIDE. Lucity Mobile

Proper Document Usage and Document Distribution. TIP! How to Use the Guide. Managing the News Page

161 Forbes Road Braintree MA Phone: (781) Fax: (781) What's in it? Key Survey & Extreme Form

Firmware Upgrade Wizard v A Technical Guide

Concentrix University Learning Portal FAQ Document

Reviewer Information Sheet for Committee Members

Computer Science Programming Contest

BI Publisher TEMPLATE Tutorial

The programming for this lab is done in Java and requires the use of Java datagrams.

Introduction to Adobe Premiere Pro for Journalists:

Upgrading Kaltura MediaSpace TM Enterprise 1.0 to Kaltura MediaSpace TM Enterprise 2.0

Project 4: System Calls 1

Secure File Transfer Protocol (SFTP) Interface for Data Intake User Guide

Access the site directly by navigating to in your web browser.

CS1150 Principles of Computer Science Boolean, Selection Statements (Part II)

FAQ. Using the Thinkific Learning Platform

The screenshots/advice are based on upgrading Controller 10.1 RTM to 10.1 IF6 on Win2003

Laboratory Exercise 3 Using the PIC18

Easing into Data Exploration, Reporting, and Analytics Using SAS Enterprise Guide

STIDistrict AL Rollover Procedures

HP MPS Service. HP MPS Printer Identification Stickers

HOW TO live-stream softball on a minimal budget

This Friday Jan 20th at La Hacienda Recreation Center at 1:00 pm we will have our famous Technology Auction and ice cream.

Deploy Your First Cloud Foundry App to Any Cloud Foundry Service Provider

All Academy Day: Home Networking Event Details

Knowledgeware Rule-based Clash

CS1150 Principles of Computer Science Midterm Review

FIT 100. Lab 10: Creating the What s Your Sign, Dude? Application Spring 2002

Transcription:

Lab 1 Name: Checked: (instructr r TA initials) Objectives: Learn abut jgrasp - the prgramming envirnment that we will be using (IDE) Cmpile and run a Java prgram Understand the relatinship between a Java class names and file names Practice using basic Java utput statements and adding dcumentatin (cmments) t yur surce cde Experience Java errrs Learn the basics f sequential executin, variables, and the assignment statement Instructins: Cmplete and submit the preparatin befre cming t the lab. Yu will be assigned a partner fr this lab. Each f yu will cmplete the lab separately, but feel free t help each ther learn! If bth are stuck r dn't understand smething, get help frm instructr r TA At varius pints, yu are asked t cmpare yur wrk with yur classmate s and sign each ther s wrksheet. Be sure t check yur classmate s wrk befre signing. What if yur answers are different? Which ne is crrect? It may be that they are bth crrect, but ask fr help if yu are nt sure. When finished, dem yur prgrams and get yur wrksheet checked and initialed by the instructr r TA. Preparatin: Fllw the instructins n the curse website t install Java JDK and jgrasp n yur laptp. 1. Create a flder n yur cmputer fr this curse. Yu are respnsible fr rganizing yur files fr each lab int separate subflders. Fr example, use a flder Lab01 fr this lab s files. 2. Dwnlad and save Lincln.java. Open the file using jgrasp. 3. In jgrasp, cmpile Lincln.java by clicking big green plus buttn: Nte that yu nw have a file Lincln.class in the same flder It is NOT required (r desirable) t pen that file, but yu may, if yu are curius. It is nt meant t be read by humans! It cntains the bytecde that yu will run, as instructed in the next step. 4. In jgrasp, run Lincln.class by clicking n the red runner buttn: This causes yur prgram t execute its instructins See the utput f this run in the interactins (lwer pane) in jgrasp 5. When finished, submit the files Lincln.java and Lincln.class thrugh blackbard under the assignment Lab 1 Prep

Part A: Running and mdifying cde 1. Open, cmpile and run the ther tw examples frm chapter 1: Lincln2.java and Lincln3.java These wrk fine but are hard t read. Practice tidying up the cde and nte that yu can use the Generate CSD and Remve CSD buttns t make the jb easier. Shw yur wrk t a classmate. 2. Open Lincln.java again. Edit it by renaming the class t MyLincln. Try t cmpile the prgram. What happens? Save this mdified prgram as MyLincln.java and run MyLincln. Add r mdify the cmments at the tp f the prgram t include: Yur name (yu are nw the Authr) A nte abut the riginal authr ("based n a prgram by Lewis & Lftus") Tday's date A very shrt summary f the mdificatins yu made Re-cmpile and run t make sure it still wrks (there shuld be n difference in its functinality) Part B: Debugging 3. Experiment with MyLincln.java and intrduce sme errrs ( bugs ). Try sme f the fllwing t see what happens when yu re-cmpile and (if successful) run the prgram. If yu get an errr right away, mark it as syntax, if it cmpiles but yu get an errr when yu try t run it, mark it as runtime, and if it cmpiles and runs but prduces a wrng (r different result than intended, which we take t be the riginal), mark it as lgic. (Be sure t fix each errr befre the next!) Change the first println t print Errr: Change the secnd println t bgus Errr: Remve the semicln at the end f ne f the statements Errr: Remve the last brace f the prgram Errr: Change main t man Errr: Smething else yu tried? Errr: Classmate signature (cmpare ntes):

Part C: Creating a prgram frm scratch: MyQute.java 4. Using MyLincln as a mdel, create a new prgram named MyQute and make it d the fllwing: Print ut a new qute f yur chsing Add variables t the prgram such as: int x = 42; int cunt = 100; duble pi = 3.14; String name = "Kripke"; (we will be studying variables next week; fr the mment we are just experimenting!) Add mre utput statements t use yur new variables, such as: System.ut.println ("Hwdy " + name); System.ut.println ("The answer is " + x); System.ut.print ("Cunting... up: " + (cunt + 1)); System.ut.println ("... and\n... dwn: " + (cunt - 1)); System.ut.println("The perimeter f a circle with radius " + x + " is " + (2* pi * x)); Be sure t pay attentin t crrect structure, syntax, indentatin, and cmments! Feel free t be creative! Cmpile and run yur prgram t make sure it wrks and that it prints ut the values f yur variables where yu expect them. Try changing it arund t use different values r different variable names (we are using the names x, cunt, and name here). Be sure t stay away frm the reserved wrds (see fig 1.18, p32). We will be learning a lt mre abut variables, but fr the mment yu can just experiment with whatever cmes t mind. Dn t wrry abut making mistakes that s the best way t learn. REMINDERS: 1) Review wrksheet. All questins answered and in agreement with partner Signatures frm yur partner where required 2) Fill ut the cmment sheet 3) Dem yur prgrams and get initials frm instructr r TA n this wrksheet 2) Detach and hand in the cmments sheet.

Lab 1 Cmments Name: Checked: What was the mst valuable thing yu learned in this lab? What did yu like best abut this lab? Was there any particular prblem? D yu have any suggestins fr imprving this lab as an effective learning experience?