File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes Can you please help me with my Assignment? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Can you please help me with my Assignment?" Watch "Can you please help me with my Assignment?" New topic

Can you please help me with my Assignment?

Ramaphong Letsela

Joined: Oct 07, 2003
Posts: 1
ITRW 122
Assignment 8 Group 21 October 2003
Input and output on the console window.
The following applies to students who apply for bursaries at a certain University. Students between 18 and 25 years old who did not spend more than 5 years at the University studying will get a bursary.
In the test class:
Ask the student number (8 digits, last four represents the first year of entry) as well as the date of birth (yyyy/mm/dd) from the console window.
Send the information to the constructor.
Use a method calcYearsEnrolled to determine the number of years enrolled at the university. The last 4 characters of the student number indicate the first year of enrolment. The getYears method will return the number of years.
Use a method calcAge to determine the person’s age in years. The getAge will return the person’s age.
Use the method determineBursary to determine if the student will get a bursary(Yes) or not (No).
The getBursary will return the answer.
The program must be able to handle an unknown number of students. The user must indicate with a YES whether he/she wants to continue.
The program must consist of two classes namely: the class called Bursary and the test class called BursaryTest
Output must be on the console window
Test data:
Input: 80122001 (student number)
1980/12/12 (date of birth)
Number of years enrolled: 2
Your age is : 23
Bursary: Yes
Input: 70111996
Number of years enrolled: 7
Your age is: 22
Bursary : No

Joe Ess

Joined: Oct 29, 2001
Posts: 9189

If you have specific questions about syntax or design, yes, there are a number of people here who will help. If you want source code to complete your assignment, I will be first to be of no help. I suggest you check out The Java Tutorial

[How To Ask Questions On JavaRanch]
Herb Schildt
Ranch Hand

Joined: Oct 01, 2003
Posts: 253
I can't do your assignment for you. That's your responsibility. But, if you get stuck with a specific problem, such as an error message that you don't understand or trouble understanding a specific concept, then I (or others) would be glad to help you out.

For my latest books on Java, including Introducing JavaFX 8 Programming, see
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
subject: Can you please help me with my Assignment?
It's not a secret anymore!