InstagramTwitterSnapChat


 
وصف

العودة   منتديات سكاو > الكليات الجامعية > منتدى كلية الحاسبات وتقنية المعلومات > المنتدى العام لكلية الحاسبات وتقنية المعلومات
التسجيل مشاركات اليوم البحث
   
   


المنتدى العام لكلية الحاسبات وتقنية المعلومات قسم خاص بالمواد العامة و الطلاب غير المتخصصين بكلية الحاسبات وتقنية المعلومات

حل بروجكت cpcs203

المنتدى العام لكلية الحاسبات وتقنية المعلومات

 
 
أدوات الموضوع إبحث في الموضوع انواع عرض الموضوع
منتديات طلاب وطالبات جامعة الملك عبد العزيز منتديات طلاب وطالبات جامعة الملك عبد العزيز
قديم 15-08-2011, 11:00 PM   #8

will smith

جامعي

 
تاريخ التسجيل: Feb 2010
التخصص: IT
نوع الدراسة: إنتظام
المستوى: الخامس
الجنس: ذكر
المشاركات: 12
افتراضي رد: حل بروجكت cpcs203

أخوي يا ريت تشرح لي النقطتين ذي لاهنت

System.out.print("Insert the title name you are looking for: ");
String CD_title = input.nextLine();
int CD_title_index = -1;
for(int i = 0; i < CDs; i++)
{
if(CD_Collection[i].getTitle().equals(CD_title))
{
CD_title_index = i;
break;
}
}
if(CD_title_index == -1) System.out.println("no matched title.");
else
{
System.out.println("The title name matches the following CD's title name:");
System.out.println(CD_Collection[CD_title_index].toString());
}
break;



int rented_CDs = 0;
int rented_DVDs = 0;
for(int i = 1; i <= CDs; i++)
{
if(CD_Collection[i-1].getRented()) rented_CDs++;
}
for(int j = 1; j <= DVDs; j++)
{
if(CD_Collection[j-1].getRented()) rented_DVDs++;
}
System.out.println("The shop has " +
(rented_CDs == 0? "no rented CDs":rented_CDs == 1? "only one rented CD":rented_CDs + " rented CDs") +
" and " +
(rented_DVDs == 0? "no rented DVDs":rented_DVDs == 1? "only one rented DVD":rented_DVDs + " rented DVDs")
+ ".");
System.out.println();
System.out.println(".:Rented CDs Details:.");
int rented_CD_index = 1;
for(CD myCD : CD_Collection)
{
if(myCD.getRented())
{
System.out.println("CD#" + rented_CD_index + ":");
System.out.println(CD_Collection[rented_CD_index-1].toString());
rented_CD_index++;
}
}
System.out.println();
System.out.println(".:Rented DVDs Details:.");
int rented_DVD_index = 1;
for(DVD myDVD : DVD_Collection)
{
if(myDVD.getRented())
{
System.out.println("DVD#" + rented_DVD_index + ":");
System.out.println(DVD_Collection[rented_DVD_index-1].toString());
rented_DVD_index++;
}
}

وجزاك الله خير وما قصرت

 

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

 


تعليمات المشاركة
لا تستطيع إضافة مواضيع جديدة
لا تستطيع الرد على المواضيع
لا تستطيع إرفاق ملفات
لا تستطيع تعديل مشاركاتك

BB code is متاحة
كود [IMG] متاحة
كود HTML معطلة

الانتقال السريع

 


الساعة الآن 11:53 AM


Powered by vBulletin® Version 3.8.9 Beta 3
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
Ads Organizer 3.0.3 by Analytics - Distance Education

أن كل ما ينشر في المنتدى لا يمثل رأي الإدارة وانما يمثل رأي أصحابها

جميع الحقوق محفوظة لشبكة سكاو

2003-2025