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?

Recommended Answers

All 2 Replies

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.

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.