Practical Slip 20 - 2019 Pattern

Core Java:

A) Write a java program using AWT to create a Frame with title “TYBBACA”, background color RED. If user clicks on close button then frame should close.     [15 M]

B) Construct a Linked List containing name: CPP, Java, Python and PHP. Then extend your java program to do the following:

i. Display the contents of the List using an Iterator

ii. Display the contents of the List in reverse order using a ListIterator. [25 M]


Python:

A) Write a python program to create a class Circle and Compute the Area and the circumferences of the circle.(use parameterized constructor)  [15 M]

B) Write a Python script to generate and print a dictionary which contains a number (between 1 and n) in the form(x,x*x). 

Sample Dictionary (n=5) 

Expected Output: {1:1, 2:4, 3:9, 4:16, 5:25} [25 M]

Post a Comment

0 Comments