Results 1 to 4 of 4
- 03-28-2010, 06:55 PM #1
Member
- Join Date
- Mar 2010
- Posts
- 2
- Rep Power
- 0
class creator !! please read this thread
i need to develop a Java application that generates Java classes from text
files.
A- the program should read the text files’ names as command line arguments.
B- The input file describes the basic structure of a class and has the following format:
# comment line
Classname
variableType variableName
variableType variableName
...
variableType variableName
Notes re file format:
· The character ‘#’ starts a comment which ends with the end of the line.
· White space characters can appear at the beginning of a line of text and several such
characters may separate a variable’s type from its name.
C- For each input file, the program should generate a Java class file where:
1- There is a constructor which has a parameter for each instance field.
2- For every instance field, add mutator and accessor methods to the class.
3- Add the toString method that returns a string which contains the data represented in
each instance field on a separate line.
4- Each method in the class must be preceded by a java-doc comment describing it.
Also, generate the Java driver class that exercises all the methods of the class.
ANY ONE HELP
-
Hello, and welcome to the forum.
So in essence what you've done is to give us your entire assignment without asking a question, and I'm afraid that in this situation there's not much that we can do for you other than to direct you to a tutorial or two.
I suggest that you post your best solution that you've created so far, and ask as specific questions as possible, and we'll be much better able to help. If you really have no idea how to begin here, then please have a look here: Starting Writing a Program. It's a well-written article that can help.
Much luck
- 03-28-2010, 07:17 PM #3
Member
- Join Date
- Mar 2010
- Posts
- 2
- Rep Power
- 0
ok..
i created my main method and a scanner in order to read the text files
i just need to know what is the method in order to create a Java class during run-time
thank you
- 03-28-2010, 07:30 PM #4
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,394
- Blog Entries
- 7
- Rep Power
- 17
Similar Threads
-
change value in the in the creator class
By livnihai in forum New To JavaReplies: 8Last Post: 10-07-2009, 06:14 AM -
Using Scanner class to read int value
By Java Tip in forum Java TipReplies: 1Last Post: 02-07-2009, 02:47 AM -
Gui Swing Creator
By 2o2 in forum New To JavaReplies: 4Last Post: 10-01-2008, 11:38 PM -
Using Scanner class to read int
By Java Tip in forum Java TipReplies: 0Last Post: 01-18-2008, 11:50 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks