عرض مشاركة واحدة
منتديات طلاب وطالبات جامعة الملك عبد العزيز منتديات طلاب وطالبات جامعة الملك عبد العزيز
قديم 21-03-2010, 10:55 PM   #72

عاصي دوغان

جامعي

الصورة الرمزية عاصي دوغان

 
تاريخ التسجيل: Feb 2010
التخصص: نظم معلومات
نوع الدراسة: إنتظام
المستوى: السابع
الجنس: أنثى
المشاركات: 26
افتراضي رد: تدرس / تدرسي java او++ c وعندك سؤال .. تعـال / تعالي هنا

السلام عليكم انا عندي برنامج في الجافا وابغى حله واكيد مع الشرح بلللللللللليز بسرعه والشكر للجميع والله يوفقكم والبرنامج هوه
Write a program that prompts the user to input his full name and then generates a secure and unrepeatable new account user name that consists of three parts separated by an underscore for any system:

The first part contains the first letters of each part of the user full Name.
The second part contains the date of today with no spaces or symbols like "20112009".
The last part is generated through the following steps.
Generate a random integer number from 1 to 5
Generate a random float number from 0 to 1.0
Raise the float number to the power of the integer number and then print it in a form of two digits only after the decimal point.
Using math methods, bring the absolute of the resulted value and round it to the nearest number less than or equal to it.
Using wrapper methods, convert the integer part of the rounded number to a hexadecimal number. Integer.toHexString(n)
Finally, Concatenate all parts and print the whole Generated User Name.


مع

Needed Library
java.util.*
java..*
Needed Classes and Methods
Random
nextInt(rang)
nextFloat()
Math
pow(a,b)
abs(a)
round()
String
indexOf( string)
substring(index,length)
Date
format(date_object)
DecimalFormat("0.00")
Scanner  System.in
nextLine()
System.out Println()
Integer toHexString(i)

 

عاصي دوغان غير متواجد حالياً   رد مع اقتباس