• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Popular Baby names help

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey everyone my name is Thomas and I'm new to this website. Anyways I'm a beginning programmer and I am completely stumped on this next assignment. It graphs the popularity of baby names from 1880 to 2010.

The directions are pretty long so here they are http://www.cs.washington.edu/education/courses/cse142/13wi/handouts/14.html

The program basically asks us to give an introduction, ask the user for a name and gender combination and then then it will read the data file. If it finds it it should graph the data. If it doesn't find it there will be a short message saying it is not found. Also if the combination is found there should be a DrawPanel graph for the data.

Thanks in advanced!
 
Saloon Keeper
Posts: 15510
363
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Thomas, welcome to CodeRanch!

How familiar are you with Swing, or AWT? Did you have lectures regarding these technologies?
 
Ranch Hand
Posts: 177
Hibernate Python Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Either i am way to tired right now or there really is no question there.

Due to tuesday might be a stretch if you haven't started yet and don't know anything about swing.
Are you allowed to use third party libraries? What have you done yet? What exactly is your problem?
 
Bartender
Posts: 10780
71
Hibernate Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Thomas Guan wrote:The program basically asks us to give an introduction, ask the user for a name and gender combination and then then it will read the data file. If it finds it it should graph the data. If it doesn't find it there will be a short message saying it is not found. Also if the combination is found there should be a DrawPanel graph for the data.


Well, like Manuel, I'm not sure what your question is.

I'm also no GUI expert, so I can't advise on how to display your graph beyond looking at something like JGraph; but I can tell you that there are two components to your problem, and you should try to keep them as separate as possible:
1. Translating the file data to a Java Object (GraphData?), most likely in java.util.Map form.
2. Retrieving entries of that object based on user input and plotting them.

Winston
 
Manuel Petermann
Ranch Hand
Posts: 177
Hibernate Python Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
jfreechart might be better suited/easier for the job.
 
Sheriff
Posts: 17644
300
Mac Android IntelliJ IDE Eclipse IDE Spring Debian Java Ubuntu Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The assignment states that they are supposed to use a class that's being provided: DrawingPanel.java

I think that class is all the OP needs to draw the graph.
 
Junilu Lacar
Sheriff
Posts: 17644
300
Mac Android IntelliJ IDE Eclipse IDE Spring Debian Java Ubuntu Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Winston Gutkowski wrote:
1. Translating the file data to a Java Object (GraphData?), most likely in java.util.Map form.



The instructions also specifically state how the input should be processed, and it's not supposed to be with a Map. I don't want to get into the "slavishly following" discussion again, so OP should be advised to ask instructor how much they are allowed to deviate from the letter of the instructions.
 
Winston Gutkowski
Bartender
Posts: 10780
71
Hibernate Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Junilu Lacar wrote:The instructions also specifically state how the input should be processed, and it's not supposed to be with a Map. I don't want to get into the "slavishly following" discussion again, so OP should be advised to ask instructor how much they are allowed to deviate from the letter of the instructions.


Agreed. I'd only say that if the DrawingPanel is not to be translating directly from String data, then you will, at the very least, need something that converts a line from the file to a bunch of numbers; and I reckon that should be held in an object.

Overspecification again?

Winston
 
reply
    Bookmark Topic Watch Topic
  • New Topic