Skip to content

chaithanyarlk/Lab-Cycle-4

Repository files navigation

National Institute of Technology Andhra Pradesh

Department of Computer Science and Engineering

Assignment-4

Course: CS255 (Object Oriented Programming)

Year & Sem: II B. Tech – II Sem (2019-20) Branch: CSE

Date: 19th March, 2020 Instructor: Mr. Raghava Rao Manubrolu

Develop an application to Solve 8-Queens problem (Placing 8 queens on a chess board successfully without affecting each other).

Develop an application to generate a randomized virtual key board layout for each execution. The virtual key board contains only digits from 0 to 9. For Reference: SBI yono application’s login scheme.

Implement a java program to construct a binary heap tree for the given set of integers (assume set of integers) and perform the following operations:

Max-Heap tree.

Min-Heap tree.

Write a Java program that works as a simple calculator. Use a grid layout to arrange buttons for the digits and for the +, -,*, % operations. Add a text field to display the result. Handle any possible exceptions like divided by zero.

Write a Java program that creates a user interface to perform integer divisions. The user enters two numbers in the text fields, Num1 and Num2. The division of Num1and Num 2 is displayed in the Result field when the Divide button is clicked. If Num1 or Num2 were not an integer, the program would throw a Number Format Exception. If Num2 were Zero, the program would throw an Arithmetic Exception. Display the

Write a Java program that implements a multi World-thread application that has three threads. First thread generates random integer every 1 second and if the value is even, second thread computes the square of the number and prints. If the value is, the third thread will print the value of cube of the number.

Write a Java program for the following:

Create a doubly linked list of elements.

Delete a given element from the above list.

Display the contents of the list after deletion.

Write a Java program that simulates a traffic light. The program lets the user select one of three lights: red, yellow, or green with radio buttons. On selecting a button, an appropriate message with “Stop” or “Ready” or “Go” should appear above the buttons in selected color. Initially, there is no message shown.

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 exception in a message dialog box. 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.

Implement a program with help of given two linked lists, insert nodes of first list in to second list at even positions of second list. For ex: first list is 5 7 17 13 11 and second list is 12 10 12 4 6. Output must be 5 12 7 10 17 12 13 4 11 6.

Implement a program to create circular doubly linked list with set of data elements 2 5 1 8 9 59 4 33 66 and perform insert (at starting, ending and specified positions), delete (from starting, ending and specified positions) and display operations.

Demonstrate user defined Exceptions with suitable example programs.

About

This is about java applets and some backtracking

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages