Java程序辅导

C C++ Java Python Processing编程在线培训 程序编写 软件开发 视频讲解

客服在线QQ:2653320439 微信:ittutor Email:itutor@qq.com
wx: cjtutor
QQ: 2653320439
1001ICT Introduction To Programming 2015-2
Workshop 2
School of Information and Communication Technology
Griffith University
August 6, 2015
When Teaching week 2
Goals To help prepare for the laboratory and quiz in week 3.
1 Pre-workshop questions and activities
Before the workshop:
• Review the lectures notes up to section 7.
• Try to do the preparation for lab 2, and answer the pre-lab questions.
2 Workshop activities
2.1 Command prompt tips
Some things that make the command line less painful.
• file name completion
• history (the up arrow)
• dragging files/folders from the explorer onto the Command Prompt window.
These work on Unix (Macs) and Linux too.
2.2 Discussion: the activities in lab 2
Discuss the nature and rationale for the activities in lab 2.
• Making and recording sensor measurements
• NXT Program
• Console program
2.3 Quiz in week 3
During next week’s lecture we will undertake a short quiz, contributing 3 % of the marks for the course.
Bring a 2B pencil, and a rubber, for use with the mark-sense answer form (unless instructed otherwise).
If we use the mark-sense forms, and you do not have a pencil, you will use an alternate form, with a 12
mark penalty. The questions will only be projected on the screen for a certain amount of time, so you
will probably not have time to look things up. All questions will be multiple choice. We will be testing
what you have learned in the lectures up to week 2 and in the first laboratory exercise.
2.4 Practice questions
The following are a few practice questions.
1
2 WORKSHOP ACTIVITIES 2
Beginning
This is a test, so:
• Put away all electronic devices:
– phones;
– laptops;
– tablets; and
– cameras.
• Quiet.
• Eyes front.
• It is open book, but we will not wait for you to look things up.
Question 1
Which of these statements about the assessment of the course is true?
A. There are five assessed laboratories, ten quizzes and a final project.
B. There are ten assessed laboratories, five quizzes and a final exam.
C. You must achieve full marks for all assessment items or you fail.
D. If you attend all lectures, labs and workshops you will most likely pass.
Question 2
True or false?
The NXT may only be programmed in Java.
Question 3
Which button do you press on the NXT to turn it off?
A. ENTER
B. ESCAPE
C. LEFT
D. RIGHT
Question 4
Which of the following lists of filename extensions denote only text files?
A. .doc .html .java .txt
B. .doc .html .mash .ps
C. .bat .html .java .ps
D. .bat .jpeg .mash .txt
2 WORKSHOP ACTIVITIES 3
Question 5
Which of these is a syntactically correct string literal?
A. "Arf", she said.
B. ’"Arf", she said.’
C. ""Arf", she said."
D. "\"Arf\", she said."
E. \"\"Arf\", she said.\"
2.5 Practice question answers
In the lecture after a quiz we will go through the answers.
2.6 Installing MaSH and Java
It is not required that you have your own computer at home, but if you do, why not equip yourself with
the software so that you can practice programming at home? The course home page has links to MaSH
and Java resources. Appendices E and F of the lecture notes are instructions installing Java and MaSH.
All of the editors we have mentioned above are free and available for download on the internet. If you have
questions about installing or using these packages, the common times are the best place to ask. Bring
your laptop.
2.7 Anything else?
Any other questions about anything related to:
• this course;
• the degree(s); or
• the university?