This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Qestions about java (aka Homework) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Reply locked New topic
Author

Qestions about java (aka Homework)

PrashantM Darekarrrrr
Greenhorn

Joined: Mar 21, 2006
Posts: 29
4.Write a typical MyDate class. This class should include � data members � dd, mm, yy and methods as follows-
a.A default constructor to set date to 1-1-1970
b.A parameterized constructor
c.Getters and setters for dd, mm and yy
d.Display method for date
e.Compare dates method that will compare the current date with the date passed as arguments. Return 0 if d1=d2; return 1 if d1<2; return 2 if d1>d2
Write a client class that has a main method which creates the objects of MyDate and calls its methods.
5.Write a student class that uses the MyDate data member. The data members will be- roll number, name and dob. The methods will be �
a.A default constructor to set roll= 0; name=�� and dob=null;
b.A parameterized constructor
c.Getters and setters for dd, mm and yy
d.Display method for student that will call the display/toString method of MyDate
e.method to sort the students with respect to date of birth
Write a client class that has a main method which creates the objects of Student and calls its methods.

6.Add a static method to student class that indicates how many objects of the class are created. Call the method from the client class.
7.Write a class to accept integers from command line and display the addition.
8. Add equals method in MyDate and Student class. Check from client class whether 2 given student objects have same data.
9.Put the MyDate class in package dst.prog. Modify Student class to use the packaged MyDate.
10.Write a is-a relationship for classes Book and EnggBooks, Novels, SpiritualBooks, MysteryStories, Biographies, AdventureStories. Write appropriate datamembers in each class. The methods should be
a.Constructor
b.toString
c.getters and setters for data members


11.write a hierarchy Employee, WageEmployee, SalariedEmployee. Override the calculateSalary() method and give implementations for wage and salaried employee. Use the hierarchy in the client class.
12.Write an interface Sortable that has a sort method. Write a client usage class that has a method displayList(Sortable) use the sort method and display list of MyDate, Employees and Students. Assume a suitable sorting criteria for each.
13.Write an application that displays 3 textboxes and a button. When 3 numbers are inserted into the textboxes and the button is clicked then display the addition as a label.
14.Write a data entry screen to accept information for an employee as follows �
a.Name text box
b.Dob text box
c.Address city �state � assume suitable components.
d.Designation � drop down list

e.Sex � radio button.
The screen should have a select list of designations �which when selected will show the list of all employees having the specified designation.

15.Rewrite the above using swing � assume suitable components.
16.Write an application frame that displays a ball at the location where a mouse is clicked. Modify the application such that the previously created balls are moving randomly on the screen.
17.Modify the employee data entry screen so that it also displays a digital-clock in the corner.
18.Modify the data entry screen such that all the data that is fetched from the user is stored in a
a.Text file.
b.Binary file
19.Use a collection object to store all the employee data fetched from the user using the data entry screen.
20.Write a two way chat program for multiple clients using sockets. Follow the following steps-
a.One way one-to-one chat
b.Two way one-to-one chat
c.One way one-to-many chat
d.Two way one-to-many chat
21.Modify employee data entry screen application such that the data fetched should be stored in the database using JDBC.
22.Write a modify employee screen that displays the list of names of all employess. Whenever any name is selected the data for that employee is fetched from DB and displayed on the screen. If the data is modified and modify button is clicked the modified data should be updated in the DB.
23.Write a RMI program to give the client a functionality to view the horoscope for the current date if the sun sign is entered by the user.
[ August 31, 2006: Message edited by: Barry Gaunt ]
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

And some sugar with your coffee sir ?
Try to do it yourself and comeback when you've got problems.


[My Blog]
All roads lead to JavaRanch
Praveen Babu
Ranch Hand

Joined: Jul 30, 2006
Posts: 138
Good Question and Good Answer too.
Gowher Naik
Ranch Hand

Joined: Feb 07, 2005
Posts: 643
PrashantM Darekarrrrr if you are not able to do it then you better hire
some programmer.
Vaibhav Chauhan
Ranch Hand

Joined: Aug 16, 2006
Posts: 115
Prashant, how can you even imagine that anybody can read all this whatever you have written.... you have neither written the question to ask nor a single line of code..... please atleast start it then come here....

BETTER LUCK NEXT TIME
Shaan Shar
Ranch Hand

Joined: Dec 27, 2005
Posts: 1249

Originally posted by Vaibhav Chauhan:
Prashant, how can you even imagine that anybody can read all this whatever you have written.... you have neither written the question to ask nor a single line of code..... please atleast start it then come here....

BETTER LUCK NEXT TIME


Even I wouldn't tell

atleast start


I would tell Atmost done at your side first and then come up with exact problem code where you have stuck.


The Best way to predict your future is to create it - Every great individual common man
Barry Gaunt
Ranch Hand

Joined: Aug 03, 2002
Posts: 7729
Sorry, we do not have a homework forum. Try and do some of the problems yourself. If you are really stuck try our Java In General (Beginners) forum, presenting an exact description of the difficulty you are having.
I will not move this post because I will get beaten up by the JIG moderators.


Ask a Meaningful Question and HowToAskQuestionsOnJavaRanch
Getting someone to think and try something out is much more useful than just telling them the answer.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Qestions about java (aka Homework)
 
Similar Threads
JSP date field
Nested while loop inside do...while loop?
Date format
JDBC SQL server date format problem
Need Help Creating Classes