Results 1 to 5 of 5
Thread: edit data??
- 03-05-2009, 10:22 AM #1
Member
- Join Date
- Mar 2009
- Posts
- 5
- Rep Power
- 0
- 03-05-2009, 02:10 PM #2
You mean something like the following:
- user inputs data
- print to screen what user input
- ask again if user want's to change his input
Luck,
CJSLLast edited by CJSLMAN; 03-06-2009 at 02:37 AM. Reason: typo
Chris S.
Difficult? This is Mission Impossible, not Mission Difficult. Difficult should be easy.
- 03-05-2009, 04:54 PM #3
Member
- Join Date
- Mar 2009
- Posts
- 5
- Rep Power
- 0
thanks for the help but I don't really understand how to do that.I made this code for the user to input data:
class editstudentdetails
{
public static void main(String[] args){
int N;
String[] studName;
if (int N=0;N<studName.length;N++){
System.out.print("Enter name for student number" +N+ ":" );
studName[N]=keyboard.nextInt();
System.out.print("Enter form /1-5/ for student " +N+ "." +studName+ ":" );
studForm[N]=keyboard.nextInt();
System.out.print("Enter group /A-D/ for student " +N+ "." +studName+ ":");
studGroup[N]=keyboard.nextChar();
System.out.print("Enter mark of maths for student" +N+ "." +studName+ ":");
studMarkMths[N]=keyboard.nextInt();
System.out.print("Enter mark of physics for student" +N+ "." +studName+ ":");
studMarkPhys[N]=keyboard.nextInt();
System.out.println("Enter mark of computing for student" +N+ "." +studName+ ":");
studMarkComp[N]=keyboard.nextInt();
- 03-05-2009, 05:07 PM #4
Member
- Join Date
- Mar 2009
- Posts
- 5
- Rep Power
- 0
This is what I did so far but it's a total mess. Is this the way to display the details for each student of from 1-5 consecutively? I don't know how to make it right. I'm confused
public class viewDetails(String[] studName, int[] studForm, char[] studGroup, int[] studMarkMths, int[] studMarkPhys, int[] studMarkComp)
{
public String getstudName()
{
return studName;
}
public Double getstudForm()
{
return studForm;
}
public Char getstudGroup()
{
return studGroup;
}
public Double getstudMarks()
{
return studMarkMths;
return studMarkPhys;
return studMarkComp;
int f;
for (f=0,f<=form.length, f++){
System.out.print("Name:"+studName[f]);
System.out.print("Form:"+studForm[f]);
System.out.print("Group:"+studGroup[f]);
System.out.print("Maths:"+studMarkMths[f]);
System.out.print("Physics:"+studMarkPhys[f]);
System.out.print("Computing:"+studMarkComp[f]);
System.out.print("");
System.out.print("");
}
- 03-06-2009, 03:12 PM #5
I'm thinking two things right now:
1) You don't know what you need to do.... at least I'm confused about it. So why not sit down, take a big breath and write down exactly what you need your program to do. Then, when you understand that, write down the steps that need to happen to get that task done. Then when that is done you can start to commit grey matter to code.
2) You don't have the Java basics to go forward. I would suggest studing the following tutorial:
The Java™ Tutorials
Another good link is the Java 6 API Specification,, which tells the specifics about the Java classes and their methods:
Java Platform SE 6
Luck,
CJSLChris S.
Difficult? This is Mission Impossible, not Mission Difficult. Difficult should be easy.
Similar Threads
-
How To Edit/Add JSP Pages in NetBeans IDE
By JavaForums in forum NetBeansReplies: 2Last Post: 02-17-2009, 11:14 AM -
Edit and compile
By lmperator in forum New To JavaReplies: 7Last Post: 01-03-2009, 05:15 PM -
Edit Command
By viji83 in forum New To JavaReplies: 1Last Post: 08-15-2008, 03:26 AM -
Basic keyboard input and edit
By BHCluster in forum New To JavaReplies: 18Last Post: 08-08-2008, 11:52 PM -
how to edit lines.
By jason27131 in forum New To JavaReplies: 1Last Post: 08-01-2007, 04:41 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks