المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : من يعرف الحل؟؟؟؟


سالي
28 - 10 - 2010, 21:20
one of the academic staff is trying to keep track of students information and their semester results in his class.write a program to read the name,metric number,and the semester average for ten students in this class using one array to save the information for each individual student.your program shoud allow the user to read the related information about each student and show the result



use Eclipse platform to write and run the program

الفيلسوفة
28 - 10 - 2010, 22:10
one of the academic staff is trying to keep track of students information and their semester results in his class.write a program to read the name,metric number,and the semester average for ten students in this class using one array to save the information for each individual student.your program shoud allow the user to read the related information about each student and show the result



use Eclipse platform to write and run the program

فديتج المشكلة أن تخصصي ما كمبيوتر وإلا كنت ساعدت بس بحاول أسأل زميلاتي في التخصص ولا يهمج :1eye:

سالي
28 - 10 - 2010, 22:30
مشكوووووووووره
بصراحه حاولت فيها ماعرفت :confused:وتسليم بالأثنين:ee:

الحسني
28 - 10 - 2010, 23:43
.write a program to read the name,metric number,and the semester average for ten students in this class using one array




هلا

مافهمت هذي النقطة .. الداتا من وين راح يقراهم .. هل من ملف .. ولا اليوزر بنفسه يدخل معلومات الـ10 طلاب ؟؟:cupidarrow:


طيب بعد حفظ المعلومات في الاراي .. ايش وظيفه البرنامج ؟؟.. هل اليوزر يدخل رقمه وتظهر له بياناته .. ولا القصد انه يظهر معلومات كل الطلاب دفعه وحده .. ولا كيف لاني مافهمت اخر نقطة ..

.. اخر سؤال .. الكود تريديه بالجافا ؟؟:ev:

سالي
29 - 10 - 2010, 17:19
هلا

مافهمت هذي النقطة .. الداتا من وين راح يقراهم .. هل من ملف .. ولا اليوزر بنفسه يدخل معلومات الـ10 طلاب ؟؟:cupidarrow:


طيب بعد حفظ المعلومات في الاراي .. ايش وظيفه البرنامج ؟؟.. هل اليوزر يدخل رقمه وتظهر له بياناته .. ولا القصد انه يظهر معلومات كل الطلاب دفعه وحده .. ولا كيف لاني مافهمت اخر نقطة ..

.. اخر سؤال .. الكود تريديه بالجافا ؟؟:ev:



اليوزر بنفسه يدخل معلومات الـ10 طلاب
ايه بالجافا
:icon_wink:

الحسني
29 - 10 - 2010, 20:17
هذا واحد سويته اتمنى انه يفيدك..
المعلومات يظهرن بعد ما يدخل اليوزر بيانات كل طالب ..

import java.util.Scanner;

public class Main {

/**
* @param args the command line arguments
*/
public static void main(String[] args) {

Scanner scan= new Scanner(System.in);
int size = 10; //عدد الطلبة



String [] name = new String[size];

int [] metric_number = new int[size];

double [] average = new double[size];

int count=0;

for (int k=0 ; k<size ;k++)
{
System.out.println("inter name of student " + (count+1) + " :" );
name[count]= scan.next();

System.out.println("inter metric number of student " + (count+1) + " :" );
metric_number [count]= scan.nextInt();

System.out.println("inter average of student " + (count+1) + " :" );
average[count]= scan.nextDouble();



//هنا راح تظهر بيانات كل طالب بعد مايدخل اليوزر البيانات على طول
System.out.println("name of student number " + (count+1) + " : " + name[count] +
" \n number : " + metric_number[count]+
" \n average : "+average[count] );

count++;




}


اما اذا تريدي ان المعلومات كلهن يظهرن بعد مايخلص مدخل كل الـ10 طلاب .. بس نقلي مكان الفور لووب خليه اخر الكود ..

for(int h=0;h<size ;h++)
{
System.out.println("student name : "+ name[h] +
" \n number : " + metric_number[h]+
" \n average : "+average[h] );


}

ماروكو^^
29 - 10 - 2010, 21:57
بالتوفيق لكي سالي


ومشكور الحسني ما قصرت وإن شاء الله يفيدها



تحياتي