Thread: Marks programm
Hi, I have to program a markssaver:
which is able to
- I give it some marks
- It saves these marks
- It saves the number of students
- It gives me back the marks + the students+ the average
Does someone knows about such a program code for me (java)?
Can i download it somewhere?
My first response was not really helpful. The query was from a student trying to satisfy a class assignment. I just said:
I googled "class grades" and got a bunch of choices.
Rule 12: Never program for yourself what others have already done.
Many teachers get by with just a spreadsheet.
Later I responded in general terms with some wisdom gained from writing/rewiting many programs:.
Here's some notes that may help.
The important design step is to focus on interfaces:
Now write GrayList methods to
- read into a GrayList list from the console,
- write a GrayList to a file,
- read a file into a GrayList,
- and compute the average from a GrayList.
The final program more or less just calls these methods.
A Framework for building components
Some recent posts have had problems organizing the outline of a program.
To add yet another option, I'll include below the sort of framework
I use for building JComponents. Each source file has its own main()
method and an enclosed class called TestFrame. The main method creates
an instance of the JComponent and then an instance of TestFrame displaying that JComponent. Finally it starts the ball rolling by calling the TestFrame's
setVisibility() method.
SamplePanel.java
|