http://extension.berkeley.edu/search/publicCourseSearchDetails.do?method=load&courseId=40960
Schedule by week | Syllabus | Downloading Java, then configuring PATH and CLASSPATH | |
Java APIs, the class libraries - http://docs.oracle.com/javase/8/docs/api/ | |||
Tally of work | Grading Policy | Submitting Homework by Email, format and deadlines | Additional: |
Transportation info at: http://extension.berkeley.edu/loc/sf.html#down
Session |
Date |
Topic (and link to lecture notes) |
Chapter in Textbook |
Homework Assignment |
1 |
03 SEP |
1 (pp. 1-30) |
|
|
2 |
10 SEP |
Scanner Input and Introducing Data Types and Operators |
2 (pp. 31-61) |
Homework #2: An interactive program: Prompt the user to input an integer, store the input in a variable, prompt the user for a second variable and store it in a different variable. Hint: java.util.Scanner provides the nextInt() method - http://docs.oracle.com/javase/7/docs/api/java/util/Scanner.html#nextInt%28%29 Process the two int variables using both relational and logical operators, such as > (relational) and & or | (logical), and show a result to the user. You must use at least one relational operator and at least one logical operator. |
3 |
|
3 (pp. 63-101) |
Homework #3: Write a program that uses
all of the following:
|
|
4 | 01 OCT | Introducing Classes, Objects, and Methods |
4 (pp. 103-134) |
Homework #4: Write one .java file that contains
three classes: two classes, such as Dog and
Cat, that each define a parameterized
constructor and a method. The third class (Demo.java) has the main
method that instantiates the two classes by calling the parameterized constructor of
each class.
For example,
Dog fido = new Dog("watchdog"); |
5 |
08 OCT |
5 (pp.135-179, skip pp. 166-175) |
Homework #5: Write a program that uses String methods listed at http://download.oracle.com/javase/8/docs/api/java/lang/String.html
Additional options:
http://java.sun.com/docs/books/tutorial/java/data/strings.html and write a program that does something with Strings that you consider useful, such as these use cases:
|
|
6 |
15 OCT |
A Closer Look at Methods and Classes including "overloaded" methods: the feature that allows using the same name
for two or more method versions
|
6 |
Homework #6: Overloading - Write a program that defines a class with an overloaded constructor and an overloaded method. For example, - SavingsAccount constructors for no initial deposit and with initial deposit - calculateInterest method for SavingsAccount and for CheckingAccount - Make sure the class name is a noun that begins with a capital letter, such as Account, and method name is a verb, such as getName. Optional Challenge: include a method that calls a constructor and/or a constructor that calls another constructor using the keyword this() - http://www.write-technical.com/126581/session6/session6.htm#Overloading%20Constructors |
7 |
22 OCT |
Inheritance |
7 (pp. 225-266)
|
Homework
#7: Write a program in which you create a class, a subclass of that class, and a
demo class with main. The subclass must override a method inherited from its
immediate superclass and use the keywords this
and super to make
use of both versions. For example, if StateTax is a subclass of FederalTax, a method in the subclass might call both this.calculateTax() and
Optional challenges: A possible scenario: (1) Create
an abstract class, AbstractRestaurant, with both an abstract method,
calculateTax() and a non-abstract method,
getPretaxPrice(). |
8 |
29 OCT |
8 (pp. 267-298) |
Homework #8: Write an application that involves an interface with two methods, two classes that implement the interface, and a Demo class that exercises the implemented methods on both kinds of objects. For example, an IAnimal interface in one file named IAnimal.java that specifies the speak() and eat() methods. Implement the interface in Dog.java, and Cat.java. Put the main method in AnimalDemo.java. Email an executable .jar file (not a .zip file) that includes the .java files, the .class files, and the manifest file that specifies the main class. See the "JAR instructions" in the lecture notes - http://www.write-technical.com/126581/session8/session8.htm#Jar%20instructions This means a total of 4 .java files, 4 .class files, and 1 manifest.txt file
all contained within 1 .jar file. |
|
9 |
05 NOV |
Exception Handling, and intro to java.io |
Chapter 9 (pp. 299-327) | Homework #9: Write a program with exception handling that uses try, catch, and finally (or add exception handling to one of your earlier programs). The program must catch both a standard and a custom exception. Do NOT redefine an existing standard exception. |
10
|
12 NOV |
Threads, Applets, Generics (intro) |
Chapter 10 (pp. 329-370) Chapter 11 (pp. 371-408) |
Homework #10: Write a program that writes characters the user enters at the keyboard to a file named KeyboardInput.txt. |
|
Java A Beginner's Guide, 6th Edition (2014) by Herbert Schildt McGraw Hill/Osborne 600 pages. Its code samples are at http://www.mhprofessional.com/getpage.php?c=oraclepress_downloads.php&cat=4222 and a PDF of the first chapter (5th ed.) is at http://www.mhprofessional.com/
Available in paper from Amazon for $26 or $26 from Barnes and Noble: http://www.barnesandnoble.com/w/java-sixth-edition-herbert-schildt/1120732239?ean=9780071809269
$40 from Oracle Press |
Other Books To
Consider
An introduction similar to our textbook, but more
comprehensive and with
less guidance for the non-programmer:
Java: The Complete Reference
Nonth Edition (201)
by Herbert Schildt
McGraw Hill/Osborne
1000 pages
($40)
http://www.barnesandnoble.com/w/java-the-complete-reference-9-e-herbert-schildt/1120732238?ean=9780071808552
Entertaining, conversation style that includes photos, cartoons, puzzles,
humor. Assumes knowledge of scripting. Covers Java 5 but the current version is
Java 8.
Head First Java, 2nd Edition
by Kathy Sierra & Bert Bates
O'Reilly
ISBN: 0596007736 ($30)
Free e-book at
http://it-ebooks.info/book/3214/
http://www.oreilly.com/catalog/hfjava/?CMP=IL7015
Handy reference if you do not want to use the API Reference at
http://docs.oracle.com/javase/7/docs/api/
(also has a brief introduction for people who are already programmers):
Java in a Nutshell, 6th Edition
http://shop.oreilly.com/product/0636920030775.do 2014
More thorough and detailed than what we cover in this
introductory course.
Best for people with a C/C++
background. Introduces the Eclipse IDE.
Learning Java, 4rd Edition (2013) - covers Java 7
Patrick Niemeyer
O'Reilly
0596008732
856 pages, $40
http://shop.oreilly.com/product/0636920023463.do
http://www.unex.berkeley.edu/cat/course346.html
An elective in the
Post-Baccalaureate Certificate in Information Systems and Management and in the
Professional Sequence in Database Management
Java—with
its platform independence—is heavily used in Web applications and
middleware that work on Windows, Macintosh, UNIX and other platforms.
Examine fundamental programming concepts, and get an introduction to
object-oriented programming. Upon successful completion of the course,
you are able to write simple applications and are prepared for courses
that assume some familiarity with Java.
You do not need any background in programming to succeed in this course, and Java is easier to learn than C or C++.
You
are welcome to bring your own laptop. The classroom does not provide
computers but does have free wireless Internet access. Download Java SE 7
at
www.oracle.com/technetwork/java/javase/downloads/index.html and see the configuration instructions at
www.write-technical.com/126581/session1/syllabus.htm#Download.
X429.9 (2 semester units in EECS)
You are responsible for your work. You do not have to contact the instructor with a reason of absence.
If you decide to withdraw, it is your responsibility to make sure that U.C. Berkeley Extension processes your withdraw request and removes your name from the final grading form. If your name appears on the official grading form, the instructor will assign you the grade you earned at the end of the course.
·
CLG -
Credit-Letter-Grade is the normal grading
option.
·
P/NP -
Pass/No-Pass. Requires 70% for a Pass.
·
C/NC -
Credit/No-Credit. A grade of No Credit
will be assigned if you have done
insufficient work for any of the other grading options.
·
W - Withdraw. If
you cannot complete the course,
you will normally be assigned a
grade of NC. Under certain circumstances, you might be eligible to
"Withdraw" from the
course. You must initiate this action directly with UC Berkeley
Extension.
·
INC - Incomplete.
If you have completed 60% of
the course work, but cannot finish the
work by the end of the term, you are eligible for an Incomplete. You
must get the form from Extension and have me sign the form by the last
day of class, then make a copy for your records. I will submit the form
along with the course grades and keep a copy for clearing the
incomplete. See the section below: "Clearing Incompletes".
· If you earned a 'B' or better, I assign the earned grade.
· If you have at least a 70% AND you have requested the P/NP option, I assign a grade of Pass.
· If you have not completed 60% of the course work, I assign a grade of No Credit.
If you have done 60% - 79% of the course work and have not requested P/NP, I assign an Incomplete.
If
you received an Incomplete, you
have 90 days from the last class meeting.
to submit all remaining
work.
To clear an incomplete, email all the remaining work on one day in a
zip.
Remember
to identify each
assignment with your full name, the term it pertains to, and the name
and EDP number of the course it pertains to.
Clearing incompletes involves significant administrative overhead on my
part.
To minimize
the work, I only address the clearing of incompletes once a month, on
the last
weekend of the
month. Therefore, it may actually be several weeks before I clear an
incomplete
once all work
has been submitted. When you see the updated grades on the website
tally,
contact
Extension directly to get an updated transcript.
See explanations on the Tally page.
The
email Subject line should follow this format: · Email SUBJECT line: s03jh, Homework #1 [where "jh" represents firstNameInitial LastNameInitial for the student's name, in this case, Jimi HENDRIX] |
The attached Java source code file must contain the following:
|
The header comment should follow this format: |
[see also the complete Schedule and Syllabus: http://www.write-technical.com/126581/session1/syllabus.htm ]
For Windows, Linux, or Mac:
Note: Another version of this information is http://docs.oracle.com/javase/tutorial/essential/environment/paths.html
For this First Course in Java, we recommend that you write
your source code
using a text editor you like.
Some text editors feature "syntax highlighting", that is, color to
your source code to indicate the type (comments, keywords, strings,
brackets, numbers).
Some provide shortcut keys that make it easier to compile and run a
command-line application.
Integrated development environments (IDEs) with sophisticated features are good for developing large, enterprise level applications involving many developers. I do NOT recommend them if this is your very first programming course because gaining familiarity with a new tool costs time, can distract the student from the fundamental language concepts, and can complicate the submission of your homework by email.
Some students are already using Eclipse, which is free. I list some IDEs for your information but do NOT support your use of them for this course.
While you type, Eclipse Code Assist shows the possible choices, along with
help about the currently selected option:
Additional IDEs:
TIP: Use the Up Arrow key to cycle through previous commands. This saves you from having to retype them.
DOS-style commands often used at the command line:
More commands are listed at http://www.computerhope.com/msdos.htm#02
He is Advisory Technical Writer for Software Developer
Documentation
at Accelrys, a global firm that serves the biotech and
pharmaceutical research industries with Java-based middleware, .NET and web-based electronic
laboratory notebooks, and chemical databases.
He writes sample code, syntax reference, and developer guide
documentation
involving Java, .NET, and the
He has 18 years experience in publishing technical information about
software
and 13 years experience teaching at the college level.
He holds a UC Berkeley Extension Certificate in Computer Information
Systems, a
doctoral degree in English, and a bachelors
degree
(with High Honors) in Political Science from U.C. Berkeley.
last updated:
05-MAY
Copyright © 2002 - 2014 granted to the Regents of the