Practical Slip 30 - 2019 Pattern

 Core Java:

A) Write a java program to accept a number from a user, if it is zero then throw user defined Exception “Number is Zero”. If it is non-numeric then generate an error “Number is Invalid” otherwise check whether it is palindrome or not. [15 M]

B) Write a java program to design a following GUI (Use Swing).  [25 M]



Python:

A) Write a Python GUI program to accept a string and a character from user and count the occurrences of a character in a string. [15 M]

B) Python Program to Create a Class in which One Method Accepts a String from the User and Another method Prints it. Define a class named Country which has a method called print Nationality. Define subclass named state from Country which has a mehtod called printState. Write a method to print state, country and nationality. [25 M]


Post a Comment

0 Comments