0

I wanted to create a java program usig arrays.
The program uses the file to input student name, city, grades scores and gender information. From this information the percent and letter grade should be calculated. how do i start?

3
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by BestJewSinceJC
0

I would start by creating a person object with those pieces as private variables. Have one of those private variables be the array of grades. Make appropriate getters, setters, and constructors. Make a method to get the grades and store them in the array. Make a method to retrieve the grades and print them. Make a method to calculate the percentage and letter based on the array of grades. I would recommend having that method return a percentage (type double) and then have another method that takes a percentage and converts it into a letter (type char). Create these methods and you should have a solid person object that uses arrays to hold grades. Then create a driver to test your new object.

0

Start like this:

Student[] student = new Student[SIZE];

After you design a Student class similar to the Person class described above. Your teacher might want some sort of hierarchy, such as Student extending Person. Read about inheritance. Read about classes. And read about arrays. Feel free to ask about those concepts here at Daniweb, we will be glad to help you. But do not ask us to tell you how to do your assignment again. Specific and appropriate questions (i.e. you put in the effort) get specific answers.

Edited by BestJewSinceJC: n/a

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.