CSCI 1402 Download

Transcript
CSCI 1402 Introductory Java Programming For Internet Computing
CSCI 1402
Introductory Java Programming for Internet Computing
Module Information
Module Leader
Name Jane Curnock
E-mail [email protected]
Room GH 5.18
Module Lecturers
Jane Curnock
[email protected] GH 5.18
David Elizondo
[email protected] GH 6.61
Module Web Site
This can be found on www.cse.dmu.ac.uk/~elizondo
Follow the link to CSCI 1402
Module Organisation
Formal contact time for this module is 4 hours each week. You should plan to
work, on average, about another 4 hours each week. This time will be spent
on making sure that lecture notes are written up, completing lab and class
exercises, revising for tests, completing any additional work that you are given
etc.
There are 24 teaching weeks:
27 September 04 - 17 December 04 Weeks 1 - 12
10 January 05 - 18 March 05
Weeks 13 - 22
11 April 05 - 22 April 05
Weeks 23 - 24
Each teaching week:
Monday 14.00 - 15.00 Lecture GH3.54
Wednesday 9.00 - 10.00 Lecture Q1.10
Wednesday 12.00 - 14.00 Computer Lab GH6.81 OR
Thursday 16.00 - 18.00 Computer Lab GH6.83
Please note that you should attend the computer lab session that is
shown on your timetable. It is not normally possible to change to a
different session.
Short lectures/large groups so no talking, please!
Labs are ‘taught’ – help and information needed to
complete lab work often given to group at start of lab
so no late arrivals, please!
Page 1 of 4
1
CSCI 1402 Introductory Java Programming For Internet Computing
Module Assessment
Assessment is through a formal written examination and a coursework
component, each equally weighted. You need to achieve an overall mark of
40% to pass this module. For example, if you achieved a mark of 35% in the
coursework and 45% in the examination then you will have passed the
module.
(a) The formal end of module examination:
 Weighted at 50% of the overall module mark.
 Will take place in University examination period between 25 April 05
and 6 June 05. Date and time will be published when known.
 Will last for 2 hours
 Requires formal written answers
 You will be allowed to take one sheet of A4 paper hand written on both
sides into the exam
 There will be a past examination paper available on the module web
site for revision purposes. Model answers for this paper are not
available
 Many of the exercises that you will do in weekly lectures relate directly
to the examination so it is important to attend every lecture and to keep
the work you do and the given solution in your portfolio

The resit examination will take place in August 05
(b) The coursework:
(i) Two laboratory -based practical assessments
 Will take place in weeks 10 and 22
 Each will last for 1 hour
 Require you to use a specified program development environment to
construct small computer programs
 There are no 'resits' available for the practical assessments. The mark
that you achieve counts towards your final module mark. If you fail the
module then you may have an opportunity to be re-assessed (in
accordance with University regulations) in August 05. If you have
extenuating circumstances for not attending a practical assessment
e.g. illness supported by a medical certificate, then you should contact
the module leader as soon as you return to University. Please note that
issues relating to employment do not count as an extenuating
circumstances
(ii) A portfolio of work
You portfolio should include:
 All completed lecture notes
 All completed class exercises
 All completed lab exercises, including annotations and documentation
 Any additional work that you have been asked to do
 Assessment of your portfolio will take place during normal contact time
before the Christmas holidays and again before the end of the year.
Page 2 of 4
2
CSCI 1402 Introductory Java Programming For Internet Computing
The assessment will be by viva examination with a member of teaching
staff
No marks will be obtained by the simple submission of text,
diagrams or code. Assessment will be in a computing laboratory
with a lecturer for a fifteen-minute demonstration viva. This
coursework is designed for you to demonstrate your
understanding of the work you have done.

Individual dates/times will be posted when known
Learning Resources
****Recommended Textbooks

There is NO set textbook for this module. Most introductory Java text books
will provide a good source of basic information about the Java programming
language. However, there are many approaches that can be taken to learning
Java so you may find that text you read in books is not always structured in the
same way as material in this module.
It is essential that you keep a full and complete portfolio of work
 The text book used last year was:
Herbert Schildt: Java 2: A Beginner’s Guide, 2nd edition, McGrawHill 2003,
£19.99
 Some of last years Multimedia students who are not continuing with Java into
the second year may like to sell copies

Internet Computing students who WILL be studying Java in their second year
may prefer to buy a more advanced text book this year
On-line tutorial on the java web site:
http://java.sun.com/docs/books/tutorial/java/index.html
Module Aims and Characteristics
This module is an introductory course, focusing on the key aspects of computer
programming. The module places emphasis on substantial practical experience. This
will be gained in supervised laboratory sessions The chosen programming language
for this module is Java, as it best supports other modules on the Internet Computing
programme.
What is a computer program?



A program is a set of instructions to a computer designed to solve a
problem.e.g. Display on the screen a list of customer names stored in a
database, perform a mathematical calculation
The instructions must be specified in a language that can be understood by the
processor of a computer.
Computers only understand primitive languages called machine languages
Page 3 of 4
3
CSCI 1402 Introductory Java Programming For Internet Computing

Machine language is specific for each type of computer.

Writing a complex program in machine language is very time-consuming so
computer scientists invented programming languages.
 A programming language looks much more like a human language such as
English
 A programming language can be translated into machine language by a special
program called a compiler
 We will use a programming language called Java to write our computer
programs.
 We will need an editor that allows us to type in Java and a compiler that is
capable of translating Java into machine language. These facilities are
provided by a program development environment – the one we use is called
JPadPro
If you want to install JPadPro on your own computer it may be purchased for £12
from the Student Advice Centre.
Writing Java programs
Writing a program in Java can ,at first, seem very daunting. Java, like all languages has its own
vocabulary (a set of words that can be translated into machine language) and grammar (syntax and
semantics) rules.
The language rules are very strict, this is because computers are stupid machines and cannot think for
themselves. For example, Java is case sensitive. The compiler understands the word "System " because
it is part of the Java language, however it would not understand "system". Also, each instruction must
be terminated with a semi-colon. If you typed a full stop instead, the compiler would not understand
what you wanted.
Once you understand the basic structure of a Java program, it gets easier
All Java programs are embedded in a class. You, the programmer, decide the name of the class within
certain syntax rules e.g. no spaces. The program should be saved in a file with the same name as the
class and with a .java extension. So the program below would be saved as HelloWorld.java - remember
that it is case sensitive!
The class has a begin { and an end }
class HelloWorld
{
public static void main (String args[])
{
System.out.println("Hello World");
}
}
Inside the body of the class is something known as " the main method" - the main method also has a
begin and an end. It encloses the programs instructions
This program has only one instruction. It is Java language for "Display the text Hello World on the
system's output device i.e. the screen"
Page 4 of 4
4