Sie sind auf Seite 1von 6

Core Java:

Assignment 1:
The goals of this assignment are:
- learn to compile and run a very simple Java program
- To know how to use environment
• WAP to generate Fibonacci Series
• WAP to generate Prime Number generation
• WAP to convert given Celsius to Fahrenheit
• WAP to Sort ‘n’ Numbers

Assignment 2:
The goals of this assignment are:
- learn to compile and run a very simple Java program
- learn to Arrays
• WAP to find the sum of ‘n’ Numbers
• WAP to Addition, Subtraction and Multiplication of two matrices

Assignment 3:
The goals of this assignment are:
- learn to compile and run a very simple Java program
- learn to use String, StringBuffer and StringBuilder
• Demonstrate an example extract substring of from a string
• WAP to parse String using String Tokenizer
• WAP to reverse a String(By character)
• WAP to reverse a String(By words)
• Demonstrate an example StringBuffer and String and StringBuilder
• Demonstrate difference between == and equals operator on String
• WAP to convert cases of given String
• WAP to sort given ‘N’ Strings
• WAP to concatenation of String
• WAP to string comparision

Assignment 4:
The goals of this assignment are:
- learn to use of MATH library
- learn passing command line arguments
• Demonstrate an example for Constants, Truncating, comparison, power,
Trigonometric, square roots and generate random number using Math library

Assignment 5:
The goals of this assignment are:
- learn the basic jargon of object oriented programming and how it appears in code
- learn how a Java program is organized into multiple source files
- learn to compile and run a very simple Java program
• Create an application program that consists of 2 classes, a "startup class" and a second
class that prints out the values of at least 3 instance variables that are initialized in
one method and printed from another. The initialization method should have two
forms. One of them will have no arguments and the other 3 arguments corresponding
to the data types of the 3 instance variables. The second class should also contain a
"class variable" of one of the 8 primitive data types (you choose). Create 2 instances of
the second class. Using one instance, set the class variable to some value and, using
the second instance, print that value out. Also, using either or both of the 2 instances,
call the methods that set and print the 3 instance variables.
• Demonstrate a Bank Application
o Demonstrate 1.Create an Account 2. Deposit 3. Withdraw and 3. Display the
account details
Assignment 6:
The goals of this assignment are:
- learn to use inheritance, Exception Handling, Packaging
- learn to design your own hierarchy
- learn how to write and use a constructor method
- learn how to use access specifiers (public, protected, private, and default or package)
• Write an application with a hierarchy composed of at least 2 classes. One of these
classes will be a subclass derived from the other. The subclass is to have at least 3
constructor methods. Each of these will be called during the creation of 3 subclass
objects. In the example shown, the subclass student has a default constructor, a
constructor with one string argument, and a constructor with a string argument giving
the student's name and an integer argument giving an ID number.
• Create an hierarchy of
 Person

Student Employee
Write a simple java program to show Student and Employee detail.
• Assume necessary hierarchy and demonstrate computation of Student Result
generation/Marks sheet generation.
• WAP to create custom exception handling.

Assignment 7:
The goals of this assignment are:
- learn to use I/O Streams
• WAP to demonstrate Reading/Writing to file using FileInputStream/OutputStream and
Reader/Writer classes
• WAP to reverse a file content
• WAP to concatenate two files
• WAP to copy file to another
• WAP to copy all files from src directory to destination directory
• WAP to demonstrate create, Delete and Modify a file
Assignment 8:
The goals of this assignment are:
- learn to use Multithreading
• WAP to demonstrate an example for Thread extending class and Implementing
Runnable Interface
• WAP to demonstrate thread life cycle
• WAP to demonstrate thread priority

Assignment 9:
The goals of this assignment are:
- learn to use Collection class
• WAP to demonstrate an ArrayList
• WAP to demonstrate Hashtable and Hash Map
• WAP to implementation Stack and Queue
• WAP to demonstrate Tree Set and Sorted Set

Assignment 10:
The goals of this assignment are:
- learn to use Java Applet/Swing/AWT
• WAP to creation of GUI and by assuming necessary steps for student marks sheet
generation
• WAP to Copy file from one directory to another
• WAP to develop a simple calculator
Assignment 11:
The goals of this assignment are:
- learn to use Java Networking
Identifying well known ports on a Local/Remote System:
By trying to listen to the various well-known ports by opening client connections. If the
exception does not occur then the remote port is active else the remote port is inactive.

 Write a chat application:

a. One-One: By opening socket connection and displaying what is written by one party to
the other.
b. Many-Many (Broad cast): Each client opens a socket connection to that chat server and
writes to the socket. What ever is written by one party can be seen by all other parties.

 Data retrieval from a Remote database:


At the remote database a server listens for client connections. The server accepts SQL Queries
from the client executes it on the database and sends the responses to the client.

 Mail Client:

a. POP Client: Gives the server name, user name and password, retrieve the mails and
allow manipulation of mailbox using POP commands.
b. SMTP Client: Gives the server name, send email to the recipient using SMTP
commands.

 Simulation of Telnet:
Provide a user interface to contact well known ports so that client server interaction can be seen
by the user.

 Simple file transfer between two systems (with out protocols):


By opening socket connection to our server on one system and sending a file from one system to
another.

 HTTP Server:
Develop a HTTP server to implement the following commands.
GET, POST HEAD, DELETE.
The server must handle multiple clients.

 Downloading Image Files from HTTP server:


Using Java URL connection class
Assignment 12:
The goals of this assignment are:
- learn to use Develop simple application
• Develop a simple application for Proxy Server/Print Server/Chat Server and Web
Server
• Develop simple application download manager

/*Prime*/
import java.io.*;

class PrimeNumber {
public static void main(String[] args) throws Exception{
int i;
BufferedReader bf = new BufferedReader(
new InputStreamReader(System.in));
System.out.println("Enter number:");
int num = Integer.parseInt(bf.readLine());
System.out.println("Prime number: ");
for (i=1; i < num; i++ ){
int j;
for (j=2; j<i; j++){
int n = i%j;
if (n==0){
break;
}
}
if(i == j){
System.out.print(" "+i);
}
}
}
}

Das könnte Ihnen auch gefallen