473,406 Members | 2,710 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

storing student grades in a two-dimensional array in a class grade book

I am struggling to figure out how to create a java program that can store student grades in a two dimensional array in a class grade book. If anyone could provide some help i would greatly appreciate it.
Dec 5 '12 #1
5 5471
zmbd
5,501 Expert Mod 4TB
Sounds like a homework question?
If not then one of the many tutorials via google will help you such as http://www.freejavaguide.com/corejava.htm
Dec 5 '12 #2
i understand the whole array aspect but dont know how to store them as a grade book
Dec 5 '12 #3
zmbd
5,501 Expert Mod 4TB
Respectfully, if you understood how arrays worked and the methods for using them then you would have no need to ask the question as this is a fundamental usage for arrays.

The tutorial I linked you to has a very nice example and explanation of the array structure and methods for implementation.

Please show your work to this point.
Remember to format posted programs/html/sql using the <CODE/> button in the toolbar.
Dec 5 '12 #4
but im trying to make a grade book so can i make the first column the names of the student and then the second column their grades?
Dec 5 '12 #5
zmbd
5,501 Expert Mod 4TB
Declaring Arrays

Like other variables in Java, an array must have a specific type like byte, int, String or double. Only variables of the appropriate type can be stored in an array. You cannot have an array that will store both ints and Strings, for instance.
So, if this is true then how would one go about defining a data-type that would allow one to use use a string and an integer primal types?

Once you have the user defined data type figured out, then you will understand that you would need only a single dimensional array to store the name/grade elements.
Dec 5 '12 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Joachim Dahl | last post by:
I would like to inherit the builtin array class and write som extension methods in C. Other people have suggested that I use numarray for that, but all I want is a simple continuous C array of...
2
by: zoe | last post by:
Is it possible to initialize a non-static const array class-member of a fundamental type? Something like: class Foo{}{ public: Foo(); private: const int myArray;
8
by: Protoman | last post by:
Is there any way I can improve this bounded array class? What other ops should I overload? How do I use operator() to make multiple subscripts? Here's the code: class OutOfBounds{}; template...
7
by: grbeltran | last post by:
Hey everybody, I am having lots of trouble storing values in an array and I want to be prompt at the beginning of each value. The values I will enter will be two digit values such as 23, or 42,...
3
by: droomwever | last post by:
Hi, Let me first say that I'm new to C#. (Maybe that's my biggest problem). What I want is a twodimensional array of undefined length to store coordinates. At each coordinate I want to store...
0
by: hockeyjock | last post by:
I need to develop a grade book program. This is my first programming class. I have learned variables, data types, math operations and precedence, I HAVE not learned methods, I have read about 5 book...
9
by: Peri | last post by:
Dear All, I have written a common array class which has insert, search and other functions. For Example (Code in VB.NET): ' Client Class Public Class Client Public ClientCode As String ...
14
by: xtheendx | last post by:
I am writing a gradbook type program. It first allows the user to enter the number of students they want to enter. then allows them to enter the first name, last name, and grade of each student. The...
6
beacon
by: beacon | last post by:
Hi everybody, I asked my professor for some practice problems to work on over the summer to prep me for Data Structures this fall and he gave me Conway's Game of Life to recreate. I haven't had...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.