• 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

How to Save data about 5 computers?

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 198
Oracle Java Linux
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What you have done ?

In starting just create a small program that creates a file and write your name in this file.
Later extend this program to have data as you required.

Thanks
 
Joe Davis
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I just can't grasp java yet and this task is a little beyond me, could you write it for me, I could pay.

i paid alot for this course and i really dont want to fail.
 
Bartender
Posts: 11497
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to the Ranch.
What have you tried and where are you stuck?


 
Maneesh Godbole
Bartender
Posts: 11497
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Manoj Kumar Jain wrote:
In starting just create a small program that creates a file and write your name in this file.
Later extend this program to have data as you required.



I think the requirement indicates reading a file and analyzing the data.
 
Manoj Kumar Jain
Ranch Hand
Posts: 198
Oracle Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Maneesh Godbole wrote:

Manoj Kumar Jain wrote:
In starting just create a small program that creates a file and write your name in this file.
Later extend this program to have data as you required.



I think the requirement indicates reading a file and analyzing the data.



I think requirement is to save the data as mentioned in the subject line

How to Save data about 5 computers?

 
Maneesh Godbole
Bartender
Posts: 11497
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Joe Davis wrote:I just can't grasp java yet and this task is a little beyond me, could you write it for me, I could pay.
i paid alot for this course and i really dont want to fail.


The Ranch is NotACodeMill
If you wish to pay for someone else to write your code, there are other sites out there to facilitate this kind of thing.

A friendly tip:
Asking someone to write your code so you can pass is not really a good idea. Wouldn't you rather do it yourself? What will you do when you are stuck with a problem at your job? Pay someone to take care of it for you?
I would suggest, give it your best shot. In case you can't get it, show us your code, tell us what part you are having problems with, and we will pool in to point you in the right direction. Best of luck
 
Manoj Kumar Jain
Ranch Hand
Posts: 198
Oracle Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Joe Davis wrote:I just can't grasp java yet and this task is a little beyond me, could you write it for me, I could pay.

i paid alot for this course and i really dont want to fail.



Just try this is not very hard, you can do it and we all are here to help you.
If you have paid a lot for this course then make it worth by learning..
 
Joe Davis
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you for your replies.

I understand this isn't a codemil and i apologize for asking but I haven't had the time to learn Java as well as id hoped, i just don't have the time.
my mother currently has a spinal disease so she cant walk anywhere so I'm constantly looking after her but trying to stay on top of my assignments.
I just need this one little program so i can give myself more time to learn Java, I don't want to lose my money.

It's just really hard:(
 
Manoj Kumar Jain
Ranch Hand
Posts: 198
Oracle Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am really very sorry to know about your problems, but this type of help is not going to help you actually, this will just make you more dependent.
This is not hard as it seems to be. You just start with it and soon you will find that you are about to complete it.
 
Joe Davis
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm actually really self reliant, I just can't think at the minute. I have done my last 5 assignments which I could show you but I just need this little bit of help please.
I have to much on my mind at the minute and i have till tomorrow to complete this.

This was my first.


This is my most recent.

 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
See Oracle's tutorials about I/O. It's also easy to find examples on the web of reading and writing text files in Java line by line.
 
Joe Davis
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't hardly understand them concepts, I desperately need this, please can somebody just help me this once. I'll do anything..
 
Manoj Kumar Jain
Ranch Hand
Posts: 198
Oracle Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I found one tutorial to write to text file, you can extend this code for your program.
Let us know if you face any problem.

http://www.roseindia.net/java/beginners/java-write-to-file.shtml

[Edit]
Search yourself to know how you can read the file once you are done with writing. Later you can write logic to find out the computer with maximum screen size.
 
Bartender
Posts: 5167
11
Netbeans IDE Opera Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Joe, please BeForthrightWhenCrossPostingToOtherSites <-- that's a link
http://www.java-forums.org/new-java/57750-how-save-data-about-5-computers.html

Any more?
 
Joe Davis
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It's okay, I'm going to try myself. Thanks for the help but I need to do this myself, I apologize for cross posting and begging.
 
Saloon Keeper
Posts: 7585
176
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Manoj Kumar Jain wrote:http://www.roseindia.net/java/beginners/java-write-to-file.shtml


Ugh. Roseindia sucks balls. Don't take their code and advice for anything but anti-patterns.
 
lowercase baba
Posts: 13089
67
Chrome Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
1) take a deep breath
2) slow down
3) relax
4) analyze your requirements, and break it apart. write the code a small piece at a time. Compile and test OFTEN - literally, every time you write 2-3 lines, recompile and fix any problems.

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

This has several pieces:

1) writing to a file
2) storing data on 5 computers
3) finding the diagonals
4) saving the largest number of a set
5) getting all the information on the computer with the largest diagonal.

So...why are you asking for username and passwords, if the specs don't ask for it? Don't make the project any more complicated than it needs to be.
 
Manoj Kumar Jain
Ranch Hand
Posts: 198
Oracle Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Tim Moores wrote:

Manoj Kumar Jain wrote:http://www.roseindia.net/java/beginners/java-write-to-file.shtml


Ugh. Roseindia sucks balls. Don't take their code and advice for anything but anti-patterns.



Whats wrong with roseindia ? If the post is useful then whats the harm to use it and start.

So...why are you asking for username and passwords, if the specs don't ask for it? Don't make the project any more complicated than it needs to be.


He is not asking for the user name and password in the current program, these are the some of the programs those he previously created..
 
Joe Davis
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Manoj Kumar Jain wrote:

Tim Moores wrote:

Manoj Kumar Jain wrote:http://www.roseindia.net/java/beginners/java-write-to-file.shtml


Ugh. Roseindia sucks balls. Don't take their code and advice for anything but anti-patterns.



Whats wrong with roseindia ? If the post is useful then whats the harm to use it and start.

So...why are you asking for username and passwords, if the specs don't ask for it? Don't make the project any more complicated than it needs to be.


He is not asking for the user name and password in the current program, these are the some of the programs those he previously created..



Yes, they were some of my previous programs that have yet to be implemented.

Okay, I've got my head back on now, I hope I've nearly done this, it's pretty much just basic I/O, I think I got a little dazzled by the test.

Thanks for all the replies.
 
Bartender
Posts: 6109
6
Android IntelliJ IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Manoj Kumar Jain wrote:

Tim Moores wrote:

Manoj Kumar Jain wrote:http://www.roseindia.net/java/beginners/java-write-to-file.shtml


Ugh. Roseindia sucks balls. Don't take their code and advice for anything but anti-patterns.



Whats wrong with roseindia ? If the post is useful then whats the harm to use it and start.



There are enough blatant errors there that it makes the site not even worth considering, especially in light of the fact that there are far better resources just as readily available.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic