0% found this document useful (0 votes)
15 views6 pages

Java Programming and Data Structures Guide

Uploaded by

akash.2508
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)
15 views6 pages

Java Programming and Data Structures Guide

Uploaded by

akash.2508
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

Core Paper -5 : Semester –V

CC-5 Programming Using Java


BLOCK – I

Unit-1: Java Language History, evolution, features, comparison with C and C++,, java SE8, phases and
block diagram of execution of java program, first java p rogram, java program with reading input and
printing output.

Unit-2: Java – Data types, variables, keywords, literals, escape sequence characters, type casting, type
conversion, type promotion,

Unit-3: Operators and control statements.

BLOCK-II

Unit-4: Java classes, objects, new operator, object references, methods, box class, types of constructors,
this key word,.instance variable hiding, garbage collection, finalize method, stack class,

Unit-5: overloading methods and constructors, access controls, final method, static method, static
variables nested and inner classes, string class, command line arguments with vararg

Unit-6: Inheritance – member access & inheritance, subclass and super class, second use for
super, multi-level hierarchy, method overriding, dynamic method dispatching, abstract classes,
using final with inheritance

BLOCK-III

Unit-7: Packages –defining package, setting class path, access protection, importing packages. Interfaces
– defining, implementing, nested interfaces, applying interfaces, default interface methods, use static
method in an interface

Unit-8: Java Exception Handling – frame work, types of exceptions, uncought exceptions, try and catch,
nested catch, multiple try, throw, throws, finally, java built-in exceptions, user-defined exceptions,
chained exceptions, recently added 3 exceptions

Unit-9 : Java Applet basics – creating applets, including an applet on a web page, applet tag,
passing paramentrs to applets. Java- animation – painting, re-painting, starting, stopping,
reducing animation flicker

BLOCK-IV

Unit-10 : Java database connectivity – JDBC definition, JDBC structure, registering and calling JDBC
drivers, JDBC URL and the connection, using JDBC drivers, installing JDBC-ODBC bridge, setting up
ODBC drivers, Aceessing ODBC services through JDBC, ODBC URL, JDBC to ODBC calls

Unit-11: , Java Event Hanling – event handling mechanism, event classes, key event class, source of
events, event listener interfaces, using delegation event model, adaptor classes, inner classes

Unit-12 Introducing Visual programming with Swing – Sewing is built on AWT, MVC
connection,swing packages, swing event handling, Jlabel and Image icon, JtextField, swing
buttons, JTabbedPane, JscrolledPane, JList, JComboBox, JTable, JTree

17
PRACTICALS:

Unix / Linux/ Ubuntu


[Link]
[Link]
[Link]

1. Write java program to find largest number in an array


2. Write java program to add two mataices
3. Write java program to demonstrate bit wise operators
4. Write java program to demonstrate java applets
5. Write java program to demonstrate all types of construcotrs
6. Write java program to demonstrate static methods and static variables

7. Write java program to demonstrate multiple inheritance in java


8. Write java program to demonstrate JDBC and ODBC connectivity with mysql or MS-
Acess and write sql database queries
9. Write java program to demonstrate exception handling with nested try and multiple
catch
10. Draw login form with swing and connect and validate the user id and password from
student database
11. Design student data entry form with all GUI controls and enter all details into student
database
12. Write java program to demonstrate event handling

18
Descipline Specific Elective-1 :Semester –V
DSE-1 Operating Systems
BLOCK – I

Unit-1: Operating System - definition, history, concepts, structure, system calls, the world according to
C,research on operating systems

Unit-2: Processes and threads - Processes, threads, Inter Process Communication (IPC).Scheduling,
classical IPC problems, research on processes and threads

Unit-3: Memory management – no memory abstraction, address spaces, virtual memory, page
replacement algorithms, design and implementation issues in paging, page segmentation, research on
memory management.

BLOCK-II

Unit-4: File Systems – Files, directories, file system implementation, management, and optimization, and
example file system, research on file system.

Unit-5: Input / Output – Principles of I/O hardware and software, software layers, disks, user
interfaces, keyboard, ouse, monitor, thin clients, power management, research on input/output

Unit-6: Dead-locks- resources, deadlocks, the ostrich algorithm, deadlocks detection and
recovery, deadlocks avoidance and prevention,other issues, research on dead-locks

BLOCK-III

Unit-7: Virtualization and the cloud – History, requirements, type-1 and type-2 hypervisors, techniques,
memory virtualization, i/o virtualization, virtual machines on multi-core CPUs, licensing issues, clouds,

Unit-8: Virtualization and the cloud - case study VMWARE, research on virtual management. Multiple
processor systems – multiple processors, multi-computers

Unit-9 : Multiple processor systems – Distributed Systems, research on multiple processor


systems

BLOCK-IV

Unit-10 : Security – security environment, operating system security, controlling access to resources,
formal models of security, basics of cryptography, authentication

Unit-11: , Security – exploiting software, inside attacks, malware, defenses, research on security

Unit-12 Android Case Study - Android and google, History, design goals, architecture, Linux
extension, Dalvik, binder IPC, Andriod applications, intents, application sand boxes, security,
process model

PRACTICALS:

Unix / Linux/ Ubuntu


19
1. Execute the Unix commands ls,cd,pwd,mkdir,mv,cp,rm,rmdir,clear,less,head, tail with
various options
2. Execute the Unix commands cat,grep,wc with various options
3. Execute the Unix commands who,sort, wc with <, >, >>, <<, !
4. Execute the Unix commands man, whatis, approve, wildcard characters
5. Execute the Unix commands Chmod, ps, sleep, jobs, fg, kill with various options
6. Execute the Unix commands quota,df,du,gzip,zcat, file, diff, find, set, history
7. Write a Java program. to Set date and time in Linux Operating System

8. Write a Java program Reading date and time from Linux operating system.
9. Write a Java program to set network settings for IPv6 Network in Linux Devices.
10. Write a Java program to set MAC address in Linux Devices.
11. Write a Java program to get MAC address of Linux based network device.
a. Write a Java program to set IP address, subnet mask, network gateway in Linux
System.

20
Descipline Specific Elective-2 :Semester –V
DSE-2 Data Structures and Algorithm Analysis using Java
BLOCK – I

Unit-1: Mathematics review, Recursion revisited, Generic Templates in C++, Algorithm Analysis-
definition,model, running time calculations,

Unit-2: Lists-the list ADT, vector and list as Standard Template Library, implementation of
vector, Implementation of List
Stacks- The stack ADT, stack model implementation of stacks, applications of stacks

Unit-3: Queues - The Queue ADT, Queue model implementation of Queues, applications of
Queue.
BLOCK-II

Unit-4: Trees –preliminaries, binary trees, search tree ADT for Binary search tree, AVL Trees

Unit-5: Trees - Splay trees, tree traversals revisited, B-Trees, Sets and Maps in the Standard Library

Unit-6: Hashing - General idea, hash function, separate chaining, hash tables without linked
lists, rehashing, hash tables in the standard library, hash tables with worst case O91) acess,
universal hashing, extendible hashing

BLOCK-III

Unit-7: Priority Queues (heaps) - model, simple implementation, binary heaps, application of heaps,
leftist heaps, skew heaps, Binomial queues, heaps in STL.

Unit-8: Sorting- Preliminaries, insertion sort, A lower bound for simple sorting algorithms, shell sort,
heap sort, merge sort

Unit-9 : Sorting – quick sort, decision rees, lower bond for decision trees, adversary lower
bound, linear-time sorts - bucket sort, radix sort, external sorting
BLOCK-IV

Unit-10 : Graph-Algorithms – definition, topological sort, shortest path algorithms, network flow
problems,

Unit-11: , Graph-Algorithms - Minimum spanning trees, Application of Dept first search method, NP –
Complete problem

Unit-12 Advanced Data Structures implementation – top-down splay trees, red-black trees,
treaps, suffix array and suffix trees, k-d trees, pairing heaps

PRACTICALS:

13. Implementation of linked kists and double linked lists in Java


14. Implementation of stack in Java
15. Implementation of queues in Java
16. Implementation of binary tree traversals,
21
17. Implementation of Binary trees or Binary search trees
18. Implementation of AVL trees
19. Implementation of splay trees and B-trees
20. Implementation of hashing
21. Implementation of heaps and heap sort
22. Implementation of linear sorting – bucket sort, radix sort
23. implementation of merge sort, quick sort, insertion sort
24. implementation of network flow and depth first search algorithms

22

Common questions

Powered by AI

In Java, stack memory allocation is used for static memory allocation, which contains method-specific values and offers fast access times due to the LIFO nature of stack operation. Objects on the stack are quickly accessible and automatically deallocated when they go out of scope. Heap memory, on the other hand, caters to dynamic memory allocation, where objects are stored, and have generally slower access times due to the need for more complex memory management and garbage collection processes. Efficient use of the stack speeds up method call processing, whereas heap memory accommodates object lifecycles and supports global access, albeit with a performance trade-off due to the overhead of garbage collection .

Polymorphism in Java is primarily achieved through method overriding, where a subclass provides a specific implementation for a method already defined in its superclass. Dynamic method dispatch is the mechanism that allows the JVM to determine and invoke the appropriate overridden method at runtime, based on the actual object's class type, rather than the reference type, thus supporting runtime polymorphism. Abstract classes play a crucial role by allowing the definition of abstract methods—methods without implementations—that must be overridden in derived classes, enforcing a contract for subclasses to follow, which enhances polymorphism and design flexibility .

Binary trees are critical for efficient search, insertion, and deletion operations, offering a structured format that enables logarithmic time complexity for balanced cases. AVL trees, a type of self-balancing binary search tree, enhance this efficiency by maintaining a balanced height through rotations during insertion and deletion operations, significantly reducing the time complexity for search operations to O(log n). This ensures that the tree structure remains optimal over a series of operations, thus maintaining high-performance levels even with large data sets. The balance adjustments in AVL trees help avoid degradation into linked-list-like structures, which would otherwise lead to inefficient linear performance .

Memory management is a critical function of an operating system, ensuring that applications have adequate memory allocation while optimizing the use of the continuous memory space available. Virtual memory enhances efficiency by allowing programs to use more memory than physically available, employing a combination of RAM and disk space, effectively creating an illusion of a large main memory. Page replacement policies, such as Least Recently Used (LRU) and FIFO, decide which memory pages to page out when new pages need to be loaded into the memory, thus impacting performance and resource utilization. These techniques ensure efficient processor time allocation, reduce waiting periods, and improve system throughput by minimizing the frequency of accessing slower secondary storage .

Java provides platform independence through the use of the Java Virtual Machine (JVM), which allows Java programs to be executed on any platform that has the JVM installed, ensuring portability and cross-platform compatibility. In contrast, C and C++ require platform-specific compilers, which can lead to platform dependency issues. The execution process in Java involves both compilation and interpretation. Java source code is first compiled into bytecode by the Java compiler, and this bytecode is then interpreted by the JVM at runtime, offering a balance between performance and portability .

Java's exception handling mechanism enhances program robustness by allowing programs to catch and manage errors gracefully without crashing. This is achieved through try-catch blocks, which enable the program to handle exceptions locally or propogate them up the call stack. Built-in exceptions in Java, such as NullPointerException and ArrayIndexOutOfBoundsException, cover common error scenarios, while user-defined exceptions provide developers the flexibility to handle specific error conditions unique to their applications by extending the Exception class and providing custom error handling logic .

JDBC (Java Database Connectivity) in Java applications acts as a bridge that provides a standard interface for connecting Java programs to a wide range of databases. By defining a set of classes and interfaces for querying and updating data, JDBC abstracts the complexities of interacting with different database management systems. This is achieved through JDBC drivers that translate Java calls into specific database commands, allowing developers to execute SQL statements, retrieve data, and perform transactions across various relational databases seamlessly, enhancing Java's platform-independent paradigm .

Java packages and interfaces support modularization by organizing code into logical groupings and standardizing interactions between objects. Packages facilitate encapsulation by grouping related classes and interfaces, allowing for easy management of namespaces and access control, thus reducing collision and increasing modularity. Interfaces define a contract that classes must adhere to, promoting code flexibility and reusability. By separating interface definitions from implementations, interfaces enable multiple implementations, adherence to specific coding standards, and ease in changing implementations without affecting existing codebase, thus significantly enhancing maintainability and scalability of Java applications .

Operating system virtualization involves creating multiple isolated execution environments on a single physical hardware using hypervisors, which helps in optimizing hardware utilization by running multiple operating systems simultaneously. Cloud computing extends virtualization techniques to provide scalable IT resources and services over the internet. Both share concepts of resource abstraction and dynamic allocation; however, cloud computing further includes service delivery models like IaaS, PaaS, and SaaS. Their architectures complement each other, as virtualization provides the backbone infrastructure enabling cloud's elasticity, automation, and flexible resource management capabilities, thus facilitating efficient, on-demand service provisioning in diverse environments .

Setting up event handling in Java is essential for developing responsive and interactive GUI applications. Event handling allows the application to respond to user actions such as clicks, key presses, and mouse movements. Java employs an event-delegation model, which separates event listening from the event-generating component, enhancing modularity and separation of concerns. Common patterns include using event listener interfaces, adapter classes for convenience, and implementing inner classes to handle events locally. These patterns promote clean and maintainable code by allowing developers to clearly define responses to user interactions, thereby enhancing user experience and application performance .

You might also like