Functional Programming
Type Inference
Toss
- (incorporates former Speagram)
Emacs
Kurs Pascala
Artificial General Intelligence
AI:
Algorithmic Game Theory: Prediction Markets (po polsku)
Programming in Java
kurs pracy w systemie Linux
Evolutionary Algorithms
Animation
Data Stores and Data Mining
Language Understanding
Systemy Inteligentnych Agentów
Przetwarzanie Języka Naturalnego
Programowanie Funkcjonalne
PmWiki
pmwiki.org
add user
edit SideBar
|
Java.Java History
Hide minor edits - Show changes to markup
Changed lines 59-60 from:
to:
- Write a “Reminder” graphical application, managing messages to be displayed at scheduled times, perhaps periodically. Use
ScheduledThreadPoolExecutor .
Added line 79:
- Lecture 11 Δ — Usable, secure and maintainable code: Effective Java by Joshua Bloch.
Added lines 76-77:
- Lecture 10 Δ — Model-View-Controller pattern for Swing applications.
- Lec10.jar Δ — comprehensive example from Head First design patterns By Eric Freeman, Elisabeth Freeman, Kathy Sierra, Bert Bates.
Changed lines 53-59 from:
to:
- Concurrency. Select one of the following exercises.
- Write a program that downloads several pages from the internet and computes a joint histogram of words in the pages. Compare the performance when the pages are downloaded sequentially and concurrently.
- Rewrite the “Settlers” example from cooperative concurrency to fully using Java threads.
- I will provide an almost-ready rewrite with only some bits to finish, stand by if you choose this exercise…
- Rewrite (parallelize) a project of your choice into using Java threads.
- You need to get the project accepted on the first lab of January if you choose this exercise.
Changed lines 68-69 from:
- More of Swing and SWT GUI libraries. Model-View-Controller.
- Concurrency.
to:
- Lecture 9 Δ — Concurrency.
- Lec9.jar Δ — selected code examples from Thinking in Java by Bruce Eckel.
Changed lines 48-53 from:
to:
- Due last week before the Christmas break, or if we cannot organize a class, on the first lab in 2012: either
- Write a graphical interface to display results of the Settlers simulation.
- For bonus points, extend it with a graphical interface to set-up the simulation.
- For bonus points, extend it with a stepping mechanism to display the course of the simulation as it evolves.
- Write a graphical interface to a project of your choice; you need to get the project accepted by Dec. 16.
Added lines 49-50:
I will post the solution to the Settlers series of exercises in compiled form only not to spoil the fun, but if you’d rather develop new features than redo the assignments above, contact me, and I’ll share the sources.
Changed lines 47-48 from:
- Add functions to save the state of simulation into a file and restore it from a file, in binary.
to:
- Add functions to save the state of simulation into a file and restore it from a file, in binary. Hint: use serialization; don’t forget to make all and every class serializable (perhaps even turn the
LookFor interface into a serializable abstract class).
Changed lines 59-60 from:
- Graphical user interfaces (comparison of AWT, Swing, SWT…) Event handling.
- More of Swing GUI library. Model-View-Controller.
to:
- Graphical user interfaces: Swing, SWT. Event handling.
- Lec8.jar Δ — selected code examples from Thinking in Java by Bruce Eckel.
- More of Swing and SWT GUI libraries. Model-View-Controller.
Changed line 46 from:
- Modify the program to, instead of printing on the screen, pretty-print the output into a file. I’ll provide details later.
to:
- Modify the program to, instead of printing on the screen, pretty-print the output into a file. Generate a table with rows corresponding to successive time instances and columns corresponding to buildings and settlers. Create either a formatted text table, or an HTML table.
Changed line 57 from:
to:
Changed lines 47-48 from:
to:
- Add functions to save the state of simulation into a file and restore it from a file, in binary.
Added line 57:
- Lec7.jar Δ — selected code examples from Thinking in Java by Bruce Eckel.
Added line 4:
- Thinking in Java by Bruce Eckel.
Deleted line 5:
- Thinking in Java by Bruce Eckel.
Added line 5:
- Thinking in Java by Bruce Eckel.
Deleted line 10:
- Thinking in Java by Bruce Eckel.
Changed line 37 from:
- Due Dec 2: Modify the simulation inspired by The Settlers game settlers.jar Δ in one of the following ways. (Select one exercise; the first five exercises are simple, the first three require little work.)
to:
- Due Dec 2: Modify the simulation inspired by The Settlers game settlers.jar Δ in one of the following ways. (Select one exercise; the first four exercises are simple, the first three require little work.)
Deleted line 40:
- Configure the simulation by reading a file.
Changed lines 44-47 from:
to:
- Due Dec 9: Modify the simulation inspired by The Settlers game settlers.jar Δ in one of the following ways.
- Configure the simulation by reading a file.
- Modify the program to, instead of printing on the screen, pretty-print the output into a file. I’ll provide details later.
Added line 56:
Changed lines 37-45 from:
to:
- Due Dec 2: Modify the simulation inspired by The Settlers game settlers.jar Δ in one of the following ways. (Select one exercise; the first five exercises are simple, the first three require little work.)
- Write a method to add a road segment between two existing waypoints.
- Add another kind of resources, for example
STONE .
- Make the carriers return to the warehouse they came from after making a delivery, similarly to how they return when they cannot make the delivery; but in case they make the delivery to a warehouse where there is not enough carriers (e.g. less than 3), let them stay. Now, a small number of carriers should still distribute all resources needed.
- Configure the simulation by reading a file.
- Add a terrain: a two-dimensional array of
enum objects that decides which kinds of buildings can be built at which locations. (The terrain can be a field in the Scheduler class.)
- Add another kind of settler: a constructor, add an
underConstruction boolean field to the Building class and modify notFunctional () to account for it. Modify the Building class so that the constructor settler needs to reside in a building for a time proportional to resourcesToBuild().sum() before underConstruction becomes false. Write a method in the Castle class that generates and schedules a task which searches for a building that is underConstruction but does not have a constructor, and sends a constructor there. The constructor should return back to the castle after finishing the job.
- Add another kind of building: sawmill, and another settler: woodcutter. The castle should send a woodcutter and a carrier to a sawmill after it is built. The woodcutter produces the wood and the carrier delivers it periodically to the nearest warehouse.
Added line 45:
- Lec6.jar Δ — selected code examples from Thinking in Java by Bruce Eckel.
Changed line 34 from:
- Due Nov 11: Modify the nested Δ implementation of sets and maps (including the interfaces) to use generic types. (Some change to the class structure might be needed.) Remove the unnecessary class casts. Remember to fix all sources of so called unchecked warnings. To get the locations of warnings, compile with
javac -Xlint:unchecked *.java . For bonus points, select one of the exercises:
to:
- Due Nov 18: Modify the nested Δ implementation of sets and maps (including the interfaces) to use generic types. (Some change to the class structure might be needed.) Remove the unnecessary class casts. Remember to fix all sources of so called unchecked warnings. To get the locations of warnings, compile with
javac -Xlint:unchecked *.java . For bonus points, select one of the exercises:
Changed line 44 from:
to:
- Lecture 6 Δ — Covariance and Contravariance. Generics. Collections.
Changed lines 34-37 from:
- Due Nov 11: Modify the nested Δ implementation of sets and maps (including the interfaces) to use generic types. (Some change to the class structure might be needed.) Remove the unnecessary class casts. Remember to fix all sources of so called unchecked warnings.
- To get the locations of warnings, compile with
javac -Xlint:unchecked *.java .
- For bonus points, implement the Java standard library collection interfaces
Set<E> and Map<K,V> using ordered linked lists, subclassing appropriate abstract classes from the library.
to:
- Due Nov 11: Modify the nested Δ implementation of sets and maps (including the interfaces) to use generic types. (Some change to the class structure might be needed.) Remove the unnecessary class casts. Remember to fix all sources of so called unchecked warnings. To get the locations of warnings, compile with
javac -Xlint:unchecked *.java . For bonus points, select one of the exercises:
- Add an iterator (or another form of browsing the elements) to the
MySet interface. In union and intersect methods, use the instanceof operator to switch to a general way of performing these operations in case the argument is not of the MySetImpl class.
- Implement the Java standard library collection interfaces
Set<E> and Map<K,V> using ordered linked lists, subclassing appropriate abstract classes from the library.
Changed line 34 from:
- Due Nov 11: Modify the nested Δ implementation of sets and maps (including the interfaces) to use generic types. (Some change to the class structure might be needed.) Remove the unnecessary class casts. Remember to fix all sources of _unchecked_ warnings.
to:
- Due Nov 11: Modify the nested Δ implementation of sets and maps (including the interfaces) to use generic types. (Some change to the class structure might be needed.) Remove the unnecessary class casts. Remember to fix all sources of so called unchecked warnings.
Changed lines 34-35 from:
- Due Nov 11: Modify the nested Δ implementation of sets and maps (including the interfaces) to use generic types. (Some change to the class structure might be needed.) Remove the unnecessary class casts.
to:
- Due Nov 11: Modify the nested Δ implementation of sets and maps (including the interfaces) to use generic types. (Some change to the class structure might be needed.) Remove the unnecessary class casts. Remember to fix all sources of _unchecked_ warnings.
- To get the locations of warnings, compile with
javac -Xlint:unchecked *.java .
Changed line 30 from:
to:
Changed line 34 from:
- Due Nov 11: Modify the nested Δ implementation of sets and maps (including the interfaces) to use generic types. Remove the unnecessary class casts.
to:
- Due Nov 11: Modify the nested Δ implementation of sets and maps (including the interfaces) to use generic types. (Some change to the class structure might be needed.) Remove the unnecessary class casts.
Added lines 31-33:
- Exercise update:
- implement the
clone() method for MySetImpl and MyMapImpl ;
- don’t forget to add simple demonstration tests for
MySet.intersect , MyMap.union and clone() methods.
Changed lines 30-33 from:
to:
- Due Nov 11: Modify the nested Δ implementation of sets and maps (including the interfaces) to use generic types. Remove the unnecessary class casts.
- For bonus points, implement the Java standard library collection interfaces
Set<E> and Map<K,V> using ordered linked lists, subclassing appropriate abstract classes from the library.
Changed lines 38-39 from:
- Graphical user interfaces (AWT library). Event handling.
to:
- Graphical user interfaces (comparison of AWT, Swing, SWT…) Event handling.
- More of Swing GUI library. Model-View-Controller.
Changed line 28 from:
to:
Changed lines 28-30 from:
to:
- Attach:Ex3.jar Δ
- DISCLAIMER: this example does not show the right way to implement containers or good programming practice, it is just an exercise in use and limitations of inheritance and interfaces.
Changed lines 13-14 from:
to:
- Clean code: a handbook of agile software craftsmanship by Robert C. Martin
Added line 3:
- The Java Tutorials at Sun/Oracle.
Deleted line 8:
- The Java Tutorials at Sun/Oracle.
Changed lines 26-27 from:
to:
Added lines 35-36:
- Graphical user interfaces (AWT library). Event handling.
- Concurrency.
Changed line 33 from:
to:
- Lecture 5 Δ — Exceptions. Packages. Generating documentation with
javadoc .
Changed lines 26-27 from:
to:
Changed lines 29-31 from:
to:
- Lecture 2 Δ — Classes, objects, inheritance.
- Lecture 3 Δ — Inheritance and interfaces. Nested types and inner classes.
- Lecture 4 Δ — Review: the Java tutorials.
Changed lines 24-26 from:
to:
Changed lines 25-26 from:
to:
Changed lines 25-26 from:
to:
Added lines 19-22:
Run Java code online:
- http://ideone.com/ (do not make the class defining
main public)
- http://www.browxy.com:9001/codeRunner (do make it public)
Changed lines 12-13 from:
to:
- The Object-Oriented Thought Process articles by Matt Weisfeld
Changed lines 1-6 from:
to:
Primary course material:
- The Java Programming Language, 4th ed. by Ken Arnold, James Gosling, and David Holmes.
- Effective Java by Joshua Bloch.
- Java SE6 API and Java SE7 API.
See also:
Deleted line 9:
- Java SE6 API and Java SE7 API.
Deleted line 10:
- Effective Java by Joshua Bloch.
Changed lines 22-23 from:
to:
Changed lines 6-14 from:
to:
- Thinking in Java by Bruce Eckel.
- Effective Java by Joshua Bloch.
- Head First design patterns By Eric Freeman, Elisabeth Freeman, Kathy Sierra, Bert Bates
Integrated Development Environments (Java and general):
- NetBeans
- Eclipse
- Emacs CEDET with JDEE
Changed lines 16-17 from:
to:
Changed lines 1-9 from:
The first exercise list: Self-Avoiding Walk Δ; Introduction to Programming in Java: SelfAvoidingWalk.java.
to:
References:
- The Java Language Specification at Sun/Oracle.
- The Java Tutorials at Sun/Oracle.
- Learning Java at Wikiversity or Java Programming at Wikibooks.
- Java SE6 API and Java SE7 API.
Exercises:
Changed line 1 from:
to:
The first exercise list: Self-Avoiding Walk Δ; Introduction to Programming in Java: SelfAvoidingWalk.java.
|