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

مشاهدة النسخة كاملة : لا تطنشواا كالعادة ياااهل الخيير أرجوووكم ساعدووني تعبت



لوتس11
31-10-2010, 02:36 PM
لا تطنشواا كالعادة ياااهل الخيير أرجوووكم ساعدووني تعبت

نداء لاخواني المبرمجيين أو أي أحد عنده خلفية عن لغات البرمجة وخصوصا الجافا أرجوكم وصلوها له لا تتجاهلوها....أرجوكم ساعدوني تعبت أريد اكتب برنامج على الاكلبس عبارة عن مصفوفة تحمل بيانات لعشرة طلاب اسمائهم والرقم الجامعي والمتوسط متلا تقديرهم أ او ب......باستخدام مصفوفة وحدة لحفظ بيانات الطلبة تتيح للقارئ انه يشوف بيانات كل وااحد من الطلبة ....
وهذا المطلوب بالانجلش للي يفضل:
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 should allow the user to read the related information about each student and show the results

PcSpeed
01-11-2010, 12:40 PM
السلام عليكم
أنا ايضا متدىء في الجافا
كتبت هذا الكود فيه بعض الأخطاء لكنه يعمل... أحسن من لا شيء



import java.util.Scanner;

public class Stdnt {

/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub

Float semesterAvg;
//String Metric,name;

System.out.print("Enter the informations: \n");
Scanner sc = new Scanner(System.in);

String[][] Students = new String[20][5];
int i;
for(i = 1; i <= 10; i++){
System.out.println("Student "+i);
System.out.print("Metric: ");Students[i][1]=sc.nextLine();
System.out.print("Name: ");Students[i][2]=sc.nextLine();

System.out.println("Semester average: ");semesterAvg = sc.nextFloat();
Students[i][3]=Students[i][3].valueOf(semesterAvg);
}

System.out.print("Show the results: \n");
for(i = 1; i <= 10; i++){

System.out.print("Metric: "+Students[i][1]+"\t");
System.out.print("Name: "+Students[i][2]+"\t");
System.out.print("semester Avg: "+Students[i][3]+"\n");
}

}

}

abokalid
23-03-2011, 02:28 AM
ما قصر أخونا
PcSpeed (http://www.montada.com/member.php?u=803340)

الكريم