Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Aug 2005
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    converting pseudocode to java

    Hi,I'm really new to java and am a student at university.For one of my projects I have to convert pseudocode to java.I have completed most of it but now I'm stuck on one module and I've just got no idea where to start on this.If anyone could give me any help on this it would be much appreciated.I just need a starting point.For example whats the equivaleny for "Write" in java or how do I open the stats file.Thanks to anyone that could help me.






    Module 11 : saveStatistics
    IN : Year
    OUT : ---
    BEGIN
    11.1 StatsFile ← "Stats" + Year + ".txt"
    11.2 Open StatsFile for writing
    11.3 Write MonthName[WettestMonth] to StatsFile
    11.4 Write WettestFigure to StatsFile
    11.5 Write HighestDay to StatsFile
    11.6 Write MonthName[HighestDayMonth]to StatsFile
    11.7 Write HighestTemp to StatsFile
    11.8 Write MonthName[SunniestMonth] to StatsFile
    11.9 Write MaxSunshine to StatsFile
    11.10 Close StatsFile

  • #2
    Registered User
    Join Date
    Oct 2004
    Posts
    592
    Thanks
    0
    Thanked 1 Time in 1 Post
    Post it in "Computer Programming"
    This is the place only for JavaScript not Java.

    What about here?

    Another useful forum you need to post this thread is

    http://saloon.javaranch.com

  • #3
    Senior Coder nikkiH's Avatar
    Join Date
    Jun 2005
    Location
    Near Chicago, IL, USA
    Posts
    1,973
    Thanks
    1
    Thanked 32 Times in 31 Posts
    For example whats the equivaleny for "Write" in java or how do I open the stats file

    Got reading and file writing examples here.
    http://www.ipwebdesign.net/help_java.html

    If this post contains any code, I may or may not have tested it. It's probably just example code, so no getting knickers in a bunch over a typo, OK? If it doesn't have basic error checking in it, such as object detection or checking if objects are null before using them, put that in there. I'm giving examples, not typing up your whole app for you. You run code at your own risk.
    Bored? Visit
    http://www.kaelisspace.com/


  •  

    Posting Permissions

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