Results 1 to 3 of 3
  1. #1
    ledgman is offline Member
    Join Date
    Apr 2012
    Posts
    1
    Rep Power
    0

    Default How to Save data about 5 Computers?

    I have a course assignment but im stuck.

    this is what I was told.

    Use a text file. Save data about 5 computers: HDD size, model name, weight, and screen diagonal. Find a computer with the biggest diagonal.

    Help please. Thanks.

  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,516
    Rep Power
    25

    Default Re: How to Save data about 5 computers?

    Moved to New to Java. Not an Advanced topic.

    Create a file with one line of data for each computer.
    Read the lines of the file into the program one by one.
    split the words on each line into separate Strings.
    convert the words that are numbers into numbers using the Integer parsing method.
    Compare the numbers from each line to find the biggest value.
    Last edited by Norm; 04-02-2012 at 01:46 PM.
    If you don't understand my response, don't ignore it, ask a question.

  3. #3
    DarrylBurke's Avatar
    DarrylBurke is online now Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,301
    Rep Power
    20

    Default Re: How to Save data about 5 Computers?

    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

Similar Threads

  1. Best way for save data?
    By web_dev in forum New To Java
    Replies: 2
    Last Post: 05-08-2011, 02:00 PM
  2. Replies: 1
    Last Post: 11-09-2010, 09:28 AM
  3. How can i save the data Internally(auto save)
    By Rama Koti Reddy in forum AWT / Swing
    Replies: 2
    Last Post: 11-01-2010, 08:31 PM
  4. Save data entry
    By tiger100plus in forum NetBeans
    Replies: 2
    Last Post: 12-08-2009, 02:53 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •