aspose file tools*
The moose likes Beginning Java and the fly likes help with assignment Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "help with assignment" Watch "help with assignment" New topic
Author

help with assignment

jose curle
Greenhorn

Joined: Oct 19, 2010
Posts: 2
I got an assignment due on Monday and I need some help to get at least some of it working so I can get some marks for it.

Scenario
A competition is being organised for the local country children, and prizes have been offered for winners of events. Prize winners in the competition are allowed to choose one prize from a selection of prizes. Several winners can choose the same prize, as there are more than one of each prize. Some prizes might not get chosen. Winners can change their choice, but can never have more than one prize. The prizes have a unique identifying number, a short description and a value. Winners have a unique id, allocated by the system, and starting at 2001, as well as personal details. Competition organisers need a program to help them store the details of prizes and winners. The program is to be menu based with winner and prize details to be stored in text files. Winner details are to be read from a file at the beginning of the program and stored in an array in memory. New winners are to be added to the array only. At the end of the program all winner records are to be written to disk, overwriting the old winner file. Prize details are to be read from a file at the beginning of the program and stored in an array in memory. The prize file will be appended to as and when new prizes are entered.

Program Specifications

When the program starts:
• Display the welcome message.
• Read the winner file (winners.txt) and store all records from the file into an array.
• Read the prizes.txt file and store all records from the file into an array.
• On the screen, display the total number of winner records read from the file.
• On the screen, display the total number of prize records read from the file.
• Display the main menu and wait for the user to enter an option


I was going ok but I am now stuck getting illegal start to expressions on the start of a lot of methods in my PrizeAllocationTUI file causing my program not to compile.




Compilation completed. The following files were not compiled:
2 errors found:
File: F:\learning\programming assignment\PrizeAllocationTUI.java [line: 182]
Error: F:\learning\programming assignment\PrizeAllocationTUI.java:182: illegal start of expression
File: F:\learning\programming assignment\PrizeAllocationTUI.java [line: 288]
Error: F:\learning\programming assignment\PrizeAllocationTUI.java:288: illegal start of expression



Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14688
    
  16

Welcome to the ranch. Please UseCodeTags the next time you want to post code.

It seems that your showWinnerDetails method is not closed. Can you confirm this /


[My Blog]
All roads lead to JavaRanch
jose curle
Greenhorn

Joined: Oct 19, 2010
Posts: 2
that was indeed the problem thanks.
Bobby Smallman
Ranch Hand

Joined: Sep 09, 2010
Posts: 107
Welcome to the Ranch!


Everyday in every way, we get a little better.
 
Don't get me started about those stupid light bulbs.
 
subject: help with assignment