Search

Custom Search

Saturday, November 20, 2010

computer science assignment

Part:1
Have a new class called PartTimeStudent. A PartTimeStudent is a kind of a student with a job. The PartTimeStudent has an employer property, and the appropriate constructors, and a toString() method that includes the employer.
Modify ex9.java from the first set of notes to include part time students initially and we can also add them.
Part :2
Create an abstract class called Pet. This class should have at least two abstract methods in it. Create two classes named Cat and Dog that implement these abstract methods. Write a program that creates a TreeSet; adds Cats and Dogs to it, and outputs the values sorted by the names of the pets. Make sure that your Pet class implements the Comparable interface.
Create an interface called Pet. This class should have at least two methods in it. Create two classes named Cat and Dog that implement this interface. Write a program that creates a TreeSet; adds Cats  to it, and outputs the values sorted by the names of the pets. Make sure that your Pet interface contains the compareTo method and your Cat and Dog classes implement the Comparable interface also.
Part:3

   1. A program that, using a Prepared Statement, executes the query of your choice from the database and outputs the results.

   1. A program that lets the user enter data to be inserted into the COURSES table, thereby adding a new course.

Make sure that your URL for the connection is: jdbc:odbc:registrar for part-3
And as I am using Jdeveloper as my platform . I request You guys work on the same platform. Thank You

No comments:

Post a Comment