Page 65 - Microsoft Word - B.Tech. Course Structure (R20) WITH 163 CREDITS
P. 65
Week-3
a. Write Java program that inputs 5 numbers, each between 10 and 100 inclusive. As each number is read,
display it only if it’s not a duplicate of any number already read display the complete set of unique values
input after the user enters each new value.
b. Write a Java Program to create an abstract class named Shape that contains two integers and an empty
method named print Area(). Provide three classes named Rectangle, Triangle and Circle such that each one
of the classes extends the class Shape. Each one of the classes contains only the method print Area () that
prints the area of the given shape.
c. Write a Java program to read the time intervals (HH:MM) and to compare system time if the system
Time between your time intervals print correct time and exit else try again to repute the same thing. By
using StringToknizer class.
Week-4
a. Write a Java program to implement user defined exception handling.
b. Write java program that inputs 5 numbers, each between 10 and 100 inclusive. As each number is read
display it only if it‘s not a duplicate of any number already read. Display the complete set of unique values
input after the user enters each new value.
Week-5
a. Write a Java program that creates a user interface to perform integer division. The user enters two
numbers in the text fields, Num1 and Num2. The division of Num1 and Num2 is displayed in the Result
field when the Divide button is clicked. If Num1 and Num2 were not integers, the program would throw a
Number Format Exception. If Num2 were zero, the program would throw an Arithmetic Exception Display
the exception in a message dialog box.
b. Write a Java program that creates three threads. First thread displays ―Good Morning‖ every one
second, the second thread displays ―Hello‖ every two seconds and the third thread displays
―Welcome‖ every three seconds.
Week-6
a. Write a java program to split a given text file into n parts. Name each part as the name of the original file
followed by .part where n is the sequence number of the part file.
b. Write a Java program that reads a file name from the user, displays information about whetherthe file
exists, whether the file is readable, or writable, the type of file and the length of the file
in bytes.
Week-7
a. Write a java program that displays the number of characters, lines and words in a text file.
b. Write a java program that reads a file and displays the file on the screen with line number before each
line.
Week-8
a. Write a Java program that correctly implements the producer-consumer problem using the concept of
inter thread communication.
b. Develop a Java application for stack operation using Buttons and JOptionPane input and Message
dialog box.
c. Develop a Java application to perform Addition, Division, Multiplication and subtraction using the
Mdv
Mdv