0% found this document useful (0 votes)
8 views3 pages

Cource Outline-Java Programming

The document outlines the course structure for JAVA Programming at Debre Berhan University, including prerequisites, course objectives, and a detailed chapter breakdown covering various Java topics. Key areas of focus include Java GUI development, multithreading, networking, database connectivity, and servlets. Assessment methods consist of quizzes, assignments, a project, and a final exam, with required texts listed for reference.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views3 pages

Cource Outline-Java Programming

The document outlines the course structure for JAVA Programming at Debre Berhan University, including prerequisites, course objectives, and a detailed chapter breakdown covering various Java topics. Key areas of focus include Java GUI development, multithreading, networking, database connectivity, and servlets. Assessment methods consist of quizzes, assignments, a project, and a final exam, with required texts listed for reference.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Debre Berhan University

School of Computing
Department of Computer Science
JAVA Programming
rd
Course outline: 3 year Computer Science Acc. Year: 2014 E.C / 2022G.C
Course Title: JAVA Programming, Course Code: CoSc3053
Course Prerequisite: Object Oriented Programming (CoSc 2051)
Instructor: Amdework A. Office SE 07- G01, Phone: +251933205119
ECTS: 5, Credit: 3 Lecture hrs.: 2 Laboratory hrs.: 3 Tutorial hrs.: 2
Course Description:
This course covers topics on Java which includes: AWT and Swing, I/O Streams,
Multithreading, Network Programming, Java database connectivity (JDBC), RMI, and
Introduction to Servlets.
Course Objectives:
At the end of this course, students should be able to:
 Carry out design and development of complex elements, such as user interfaces,
multiprocessing, and fault-tolerant components;
 Write TCP/IP Client Server applications using Sockets;
 Write Java applications using the JDBC to make database independent queries; and Call
methods remotely.
Course Outline:

Chapter 1: Overview of Java Programming (4hr)

1.1. Data types and variables


1.2. Arrays
1.3. Decision and Repetition statement
1.4. Exception Handling
1.4.1. Exception handling overview
1.4.2. Syntax
Chapter 2: Java Applet (2hr)

2.1. Overview of Java Applets


2.2. Java Applets Vs Java Application
Chapter 3: Java GUI using JAVAFX (8 hrs.)

3.1. JAVAFX architecture and Program structure


3.2. JAVAFX layout components
3.3. Basic UI controls
3.3.1. Event handlers
3.3.2. UI controls
3.4. Composite UI controls
3.5. Shapes
3.5.1. Color, Texts, Fonts
3.5.2. Lines, Circle, Rectangle
3.5.3. CSS styling
3.6. Properties and Bindings
3.7. Graphics and Animation
Chapter 4: Streams and File I/O (4hr)

4.1. Input output streams


4.1.1. Various stream classes
4.1.2. Using Streams
4.1.3. Object Streams
4.2. File management
Chapter 5: Multi-threading concept (4hr)

5.1. Thread vs process


[Link] threads
5.2.1. Thread priorities
5.2.2. Thread synchronization
Chapter 6: Networking in Java (3hr)

6.1. Networking overview


6.1.1. Types of connections
[Link] programming
6.2.1. Socket, port and URI
6.2.2. Implementing Socket programming
[Link] method invocation (RMI)
6.3.1. Overview of RMI
6.3.2. The RMI registry
6.3.3. The remote Interface
6.3.4. Implementing RMI
Chapter 7: Java - Database connectivity (4hr)

7.1. Introduction on database systems


7.1.1. Structured query language (SQL)
7.2. Basic JDBC programming concept
7.2.1. Populating database
7.2.2. Executing queries
7.2.3. Manipulating query results
Chapter 8: Servlets (3 hrs.)

8.1. Servlet overview and architecture


8.2. Handling HTTP methods (GET and POST requests)
8.3. Request redirecting
8.4. Multi-tier applications using JDBC from servlet
Teaching - Learning methods

Assessment method

Quizzes 20%, Assignments 20%, Project 20%, Final Exam 40%, Total 100%

Teaching materials

Required Texts:

 S. Horstmann and Gary Cornell, Core Java 2 – Volume II- Advanced Features, Sun
Microsystems Press
 Harvey M. Deitel and Paul J. Deitel, Java How to Program, Deitel & Associates Inc.
 [Link]/docs/books/tutorialContinues

Common questions

Powered by AI

Java's multithreading model differentiates between threads and processes by defining threads as lightweight execution units within the same process that share the process's resources, including memory. Processes, on the other hand, are isolated with separate memory spaces. In Java, thread synchronization is critical to prevent race conditions when multiple threads access shared resources. Java provides synchronized blocks and methods to handle this. Thread priority in Java is managed using priority levels that suggest the order of execution, helping to ensure that high-priority threads run before lower-priority ones when possible, though exact handling depends on the JVM's thread scheduler .

Key considerations for designing Java UI with JavaFX include selecting appropriate layout components, managing event handling, and using UI controls effectively. JavaFX architecture facilitates GUI application development through a modular API that separates UI styling, layout management, and business logic. It allows developers to easily integrate shapes, text, and CSS styling into their applications to enhance user experience. JavaFX also supports properties and bindings to enable dynamic UI content that reacts to changes in the application's state, thereby offering a comprehensive framework for sophisticated UI design .

RMI enables remote communication in Java by allowing objects to invoke methods on a remote server as if they were local. Key components include the remote interface, which defines the methods that can be called remotely, and the RMI registry, a name service that clients use to locate remote objects. The server creates an instance of a remote object and registers it with the RMI registry. Clients query the registry to obtain the remote object's reference, allowing them to call methods on it. This infrastructure handles marshalling and unmarshalling of method arguments and return values over the network, making remote communication seamless .

The application of priority in managing multiple threads allows programmers to suggest thread scheduling order; however, its effectiveness is platform-dependent as JVM implementations handle priorities differently. Proper synchronization is critical for data consistency when multiple threads interact with shared resources. This is achieved through synchronized methods or blocks that ensure mutually exclusive access to critical sections of code, preventing race conditions. Incorrect synchronization can lead to deadlocks or reduced performance, thus requiring careful design and understanding of thread interactions and potential bottlenecks in concurrent execution environments .

Java enhances program robustness through its structured exception handling mechanism, allowing programs to detect and handle runtime errors gracefully. Key syntactical elements include the try-catch block, which attempts to execute code and catch specified exceptions; the finally block, which executes code after try-catch whether an exception is thrown or not; and the throw statement, used for manually raising exceptions. Developers can also define custom exceptions by extending the Exception class, providing tailored error handling for specific conditions, thus improving the program's reliability by making error messages more descriptive and error handling more precise .

Handling HTTP GET and POST requests in Java servlets involves several security and performance considerations. From a security perspective, ensuring the safe transmission of sensitive data using POST requests is critical, as it does not append data to the URL which GET requests do. This helps prevent sensitive information from being logged or cached inadvertently. Performance-wise, managing concurrent requests efficiently is vital, which might involve pooling and reusing servlet instances. Proper session management and efficient use of server resources further contribute to the performance of server-side applications built using servlets .

Input/output streams in Java are fundamental for file management, facilitating the reading and writing of data. They abstract data transfers to and from various sources and destinations, including files and network sockets. Java provides Byte Streams for handling 8-bit byte data and Character Streams for 16-bit Unicode data, allowing applications to handle binary as well as text data types efficiently. Streams such as FileInputStream and FileOutputStream provide a way to read and write byte streams to files, while classes like ObjectOutputStream and ObjectInputStream support serialization, enabling complex data types and objects to be represented within file io operations .

The main differences between JavaFX and older AWT/Swing technologies lie in their versatility, performance, and ease of use. JavaFX offers a more modern, scene graph-based architecture compared to the peer-based architecture of AWT/Swing, leading to smoother and richer UI designs. JavaFX supports CSS for styling, FXML for declarative UI creation, and better animation capabilities, which significantly enhance application design flexibility and user experience. The JavaFX approach facilitates easier UI updates, separating design from application logic. In contrast, AWT/Swing are more static and less conducive to sophisticated visual effects, impacting the adaptability and responsiveness of applications .

JDBC (Java Database Connectivity) is an API that enables Java applications to interact with a wide range of databases via SQL queries. It allows developers to execute queries, retrieve results, and update database records with simple Java calls. Key components of JDBC include Connection, Statement, and ResultSet objects, among others. JDBC is significant in multi-tiered applications as it serves as the bridge between the application layer and the database layer, allowing for flexible data management and manipulation. This separation of concerns supports robust application architecture, facilitating scalability and maintainability across different system layers .

Java applets and applications differ fundamentally in structure and execution context. Applets are designed to run within a web browser using the Applet class and require an HTML page to be executed, whereas Java applications run standalone with a main method entry point. Security considerations for applets are more stringent as they execute in a restricted environment called the 'sandbox,' limiting their access to local file systems and networks to prevent malicious activity. In contrast, Java applications have full access to system resources, which means they require proper security management but are not bound by the applet architecture's constraints .

You might also like