.com.unity Forums
  The Official e-Store of Shrapnel Games

This Month's Specials

Raging Tiger- Save $9.00
The Star and the Crescent- Save $9.00

   







Go Back   .com.unity Forums > Illwinter Game Design > Dominions 3: The Awakening

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #5  
Old July 23rd, 2009, 08:08 AM
hEad's Avatar

hEad hEad is offline
Sergeant
 
Join Date: Dec 2007
Location: WA, Australia
Posts: 228
Thanks: 18
Thanked 7 Times in 5 Posts
hEad is on a distinguished road
Default Re: O.T Help sought from Java Programmers

Quote:
Originally Posted by ano View Post
There's no problem to write this, actually. If I have time in the evening, it will take about 15 mins. I'm just not sure that's what you want. Because it will give absolutely no knowledge and make you vulnerable to simplest questions.
Sorely tempted... The thing i find with code is when you have an example to follow it makes sence. You can trace through it - work it out. I feel at present that i have gone from making simple procedural style programs to this, and i have got lost along the way.

Quote:
Originally Posted by Psycho View Post
First, in the constructor you inverted your assignments - it should be studentID = sId, instead of sId = studentID, etc. Then, your fields should be private. You also need setters. And probably not everything should be a String, but that's less important.

In printDetails() you would use a StringBuilder class to combine all those Strings from fields into one String the method will return.

Enrollment would have one array of Student objects, addStudent() would add a new student to the array and return the index, getStudent() would use the index to retrieve the Student object, printEnrolment would iterate through the array and invoke printdetails on each student and write that to System.out. It would be useful to have a method to return the number of Students as well.

Admin would have the Main method in which he would call filData and then searchStudent in a loop until he gets a result. fillData creates an Enrollment object, then Student object whose data are hardcoded and inputs them into the enrollment using addStudent, then finally printsEnrollment. searchStudent takes a year, then calls getStudent for each Student, takes his year and if it matches prints his data to System.out; it returns true if successful, otherwise false.

Anyway, that's how I understood what you are expected to do. I know it's a total beginner level project, but I think it's very poorly composed.
Looking at this i get some tingling in the back of my head. Its like understanding wants to burst through damn it! This is helpful though almost makes sence!
Reply With Quote
 

Bookmarks


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 07:48 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2025, Shrapnel Games, Inc. - All Rights Reserved.