Define an abstract class "car" with members reg_no, model, reg_date. Define two subclasses of this class "transportVehicles " (validity_no,start_date, period) and "privateVehicle" (owner_name, owner_address). Define appropriate constructors. Create n objects which could be of either transportVehicles or privateVehicle class by asking the user's choice. Display details of all "privateVehicle" objects and all "transportVehicles" objects.
Create an Applet which displays a message in the center of the screen. The message indicates the events taking place on the applet window. Handle events like mouse click, mouse moved, mouse dragged, mouse pressed, and key pressed. The message should update each time an event occurs. The message should give details of the event such as which mouse button was pressed, which key is pressed etc. (Hint: Use repaint(), KeyListener, MouseListener, MouseEvent method getButton, KeyEvent methods getKeyChar)
Write Java program to design three text boxes and two buttons using swing . Enter different strings in first and second textbox. On clicking the First command button, concatenation of two strings should be displayed in third text box and on clicking second command button , reverse of string should display in third text box.
Create an applet to accept a number in a textbox and on click of OK button, it displays if given number is even or odd.
Create an abstract class Student with methods disp_roll_no and calc_total_marks. Derive three classes McaStudent (marks of 6 subject as members), MscStudentfrom(marks of 4 subject as members) and BcsStudent(marks of 8 subject as members) from it. Create set of n students in main. Calculate total and display roll number with total of each student.. (Use method overriding).