InstagramTwitterSnapChat


 
وصف

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


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

مساعدة في شرح بروجيكت برمجة 2

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

إضافة رد
 
أدوات الموضوع إبحث في الموضوع انواع عرض الموضوع
منتديات طلاب وطالبات جامعة الملك عبد العزيز منتديات طلاب وطالبات جامعة الملك عبد العزيز
  #1  
قديم 25-11-2015, 02:36 AM

Fares2017 Fares2017 غير متواجد حالياً

جامعي

 
تاريخ التسجيل: Dec 2014
الكلية: مسار السنة التحضيرية علمي
نوع الدراسة: تحضيري علمي خطة ب
البلد: جــــدة
الجنس: ذكر
المشاركات: 10
افتراضي مساعدة في شرح بروجيكت برمجة 2


كود PHP:
package ha_1535272_p3;

import java.util.Scanner;
import static jdk.nashorn.internal.objects.NativeString.toUpperCase;


public class 
HA_1535272_P3 {

   
    public static 
void main(String[] args) {
       
       
String e,r,a,b,c,d,g,h,i,j,k;
        
Scanner fares =new Scanner(System.in);
        
        do {
        
//
        
System.out.println("--------------------------------------------------------------------------------");
        
System.out.println("------            Welcome to Jeddah AUTOMALL Customer e-Portal            ------");
        
System.out.println("--------------------------------------------------------------------------------");
        
        
//
        
        
System.out.println("| 1 : Get information about the vehicles available for sale                   | ");
        
        
System.out.println("| 2 : Make appointments for different types of services (sales or maintenance)| ");
        
        
System.out.println("| 3 : Submit customer feedback or complaint                                   | ");
        
        
System.out.println("| 4 : Exit                                                                    | ");
        
        
System.out.println(" ------------------------------------------------------------------------------- ");
        
//
        
System.out.print(" > Please enter your choice : ");
         
int f fares.nextInt();
          if (
>= && <=){
                 
        
             }
          else if (
f==4){{System.exit(0);}
          
          }
          else {
                    
System.out.println(" Invalid Input!!! Please Try Again ..... ");
          continue;
                } 
          
         
          
             
             
         
                if (
== ){
                while(
true){
                
System.out.println(""); 
                
System.out.println(" ------ COMPANIES ------");
                
System.out.println("---------------------------------");
                
System.out.println(" | T or t : Toyota              | ");
                
System.out.println(" | C or c : Chevrolet           | ");
                
System.out.println(" | G or g : GMC                 | ");
                
System.out.println(" | K or k : Kia                 | ");
                
System.out.println(" | R or r : Return to Main Menu | ");
                
System.out.println(" -------------------------------- "); 
                
System.out.print(" > Please enter the choice: ");
                
fares.next();
            
                 switch (
e.toLowerCase().charAt(0)){
                     
                     case 
'r':if (e.equalsIgnoreCase("r"))
                 {
                  
                  break;
                  }     
                     
                case 
't'
                 while (
true) {
                 
System.out.println("  ------ VEHICLES ------     ");
                 
System.out.println("---------------------------------");
                 
System.out.println(" | L or l:  Land Cruiser 2015  | ");
                 
System.out.println(" | S or s:  Sequoia  2015      | ");
                 
System.out.println(" | F or f:  FJ Cruiser 2015    | ");
                 
System.out.println(" | R or r:  Previous Menu      | ");
                 
System.out.println(" --------------------------------");
                 
System.out.print(" > Please enter the choice:  ");
                 
fares.next();
                 
                 if (
e.equalsIgnoreCase("l")){
                  
                      final 
double ff 175000.0 ;
                      final 
int fa 8;
                
                 
System.out.println(" > Price: "ff);
                 
System.out.println(" > Quantity Available:"+fa);
                   
                 }
                 
                 else if (
e.equalsIgnoreCase("s")){
                     
                      final 
double n 140000.0 ;
                      final 
int nn 8;
                      
                 
System.out.println(" > Price: "n);
                 
System.out.println(" > Quantity Available:"+nn);
                      
                 }
                      
                 else if (
e.equalsIgnoreCase("f")){
                      
                        final 
double v 120000.0 ;
                      final 
int vv 6;
                      
                 
System.out.println(" > Price: "v);
                 
System.out.println(" > Quantity Available:"+vv);
                
                 }
                      
                 else if (
e.equalsIgnoreCase("r"))
                 {
                  
                  break;
                  } 
                 else {
                     
                  
System.out.println("");
                  
System.out.println("   Invalid Input!!! Please Try Again ..... ");
                  {continue;}
                 }
                 
                  
                
                 }  
                
                 
                 break;
                    
                    
                    
                  case 
'c'
                 while (
true) {
                 
System.out.println("");
                 
System.out.println("      ------ VEHICLES ------     ");
                 
System.out.println("---------------------------------");
                 
System.out.println(" | S or s:  Suburban 2015      | ");
                 
System.out.println(" | T or t:  Tahoe 2015         | ");
                 
System.out.println(" | Z or z:  Trailblazer 2015   | ");
                 
System.out.println(" | R or r:  Previous Menu      | ");
                 
System.out.println(" --------------------------------");
                 
System.out.print(" > Please enter the choice:  ");
                 
fares.next();
                 
                 if (
e.equalsIgnoreCase("s")){
                  
                      final 
double ff 150000.0 ;
                      final 
int fa 6;
                
                 
System.out.println(" > Price: "ff);
                 
System.out.println(" > Quantity Available:"+fa);
                   
                 }
                 
                 else if (
e.equalsIgnoreCase("t")){
                     
                      final 
double n 135000.0 ;
                      final 
int nn 8;
                      
                 
System.out.println(" > Price: "n);
                 
System.out.println(" > Quantity Available:"+nn);
                      
                 }
                      
                 else if (
e.equalsIgnoreCase("z")){
                      
                        final 
double v 100000.0 ;
                      final 
int vv 4;
                      
                 
System.out.println(" > Price: "v);
                 
System.out.println(" > Quantity Available:"+vv);
                
                 }
                      
                 else if (
e.equalsIgnoreCase("r"))
                 {
                  
                  break;
                  } 
                 
                 else {
                     
                  
System.out.println("");
                  
System.out.println("   Invalid Input!!! Please Try Again ..... ");
                  {continue;}
                 }
                 
                 }
                   break;
                    
                    
                    
                  case 
'g'
                 while (
true) {
                 
System.out.println("");
                 
System.out.println("      ------ VEHICLES ------     ");
                 
System.out.println("---------------------------------");
                 
System.out.println(" | Y or y:  Yukon 2015         | ");
                 
System.out.println(" | A or a:  Acadia 2015        | ");
                 
System.out.println(" | T or t:  Terrain 2015       | ");
                 
System.out.println(" | R or r:  Previous Menu      | ");       
                 
System.out.println(" --------------------------------");
                 
System.out.print(" > Please enter the choice:  ");
                 
fares.next();
                 
                 if (
e.equalsIgnoreCase("y")){
                  
                      final 
double ff 120000.0 ;
                      final 
int fa 8;
                
                 
System.out.println(" > Price: "ff);
                 
System.out.println(" > Quantity Available:"+fa);
                   
                 }
                 
                 else if (
e.equalsIgnoreCase("t")){
                     
                      final 
double n 150000.0 ;
                      final 
int nn 6;
                      
                 
System.out.println(" > Price: "n);
                 
System.out.println(" > Quantity Available:"+nn);
                      
                 }
                      
                 else if (
e.equalsIgnoreCase("z")){
                      
                        final 
double v 105000.0 ;
                      final 
int vv 6;
                      
                 
System.out.println(" > Price: "v);
                 
System.out.println(" > Quantity Available:"+vv);
                
                 }
                      
                 else if (
e.equalsIgnoreCase("r"))
                 {
                  
                  break;
                  } 
               
                 else {
                     
                  
System.out.println("");
                  
System.out.println("   Invalid Input!!! Please Try Again ..... ");
                  {continue;}
                 }
                
                 }  
                                    break;

                  
                  case 
'k'
                 while (
true) {
                 
System.out.println("");
                 
System.out.println("      ------ VEHICLES ------     ");
                 
System.out.println("---------------------------------");
                 
System.out.println(" | M or m:  Mohave 2015        | ");
                 
System.out.println(" | S or s:  Sorento 2015       | ");
                 
System.out.println(" | P or p:  Sportage 2015      | ");
                 
System.out.println(" | R or r:  Previous Menu      | ");
                 
System.out.println(" --------------------------------");
                 
System.out.print(" > Please enter the choice:  ");
                 
fares.next();
                 
                 if (
e.equalsIgnoreCase("m")){
                  
                      final 
double ff 97000.0 ;
                      final 
int fa 6;
                
                 
System.out.println(" > Price: "ff);
                 
System.out.println(" > Quantity Available:"+fa);
                   
                 }
                 
                 else if (
e.equalsIgnoreCase("s")){
                     
                      final 
double n 77000.0 ;
                      final 
int nn 4;
                      
                 
System.out.println(" > Price: "n);
                 
System.out.println(" > Quantity Available:"+nn);
                      
                 }
                      
                 else if (
e.equalsIgnoreCase("z")){
                      
                        final 
double v 67000.0 ;
                      final 
int vv 6;
                      
                 
System.out.println(" > Price: "v);
                 
System.out.println(" > Quantity Available:"+vv);
                
                 }
                      
                 else if (
e.equalsIgnoreCase("r"))
                 {
                  
                  break;
                  } 
               
                 else {
                     
                  
System.out.println("");
                  
System.out.println("   Invalid Input!!! Please Try Again ..... ");
                  {continue;}
                 }
                
                 }  
                                    break;

                  
                  
                  
                   default:
                  
System.out.println("");
                  
System.out.println("   Invalid Input!!! Please Try Again ..... ");
                  {continue;}
                
                 }
              
                
                
                
                 }   
                
               
            
         }  
                
                 if (
== ){
                while(
true){
                
System.out.println(""); 
                
System.out.println(" ------ COMPANIES ------");
                
System.out.println("---------------------------------");
                
System.out.println(" | T or t : Toyota              | ");
                
System.out.println(" | C or c : Chevrolet           | ");
                
System.out.println(" | G or g : GMC                 | ");
                
System.out.println(" | K or k : Kia                 | ");
                
System.out.println(" | R or r : Return to Main Menu | ");
                
System.out.println(" -------------------------------- "); 
                
System.out.print(" > Please enter the choice: ");
                
fares.next();
            
                 switch (
e.toLowerCase().charAt(0)){

                 
                 case (
't'): 
                 while (
true) {
                 
System.out.println("  ---- APPOINTMENT TYPE ----     ");
                 
System.out.println("---------------------------------");
                 
System.out.println(" | 1: Service Appointment      | ");
                 
System.out.println(" | 2: Sales Appointment        | ");  
                 
System.out.println(" | 3: Previous Menu            | ");
                 
System.out.println(" --------------------------------");
                 
System.out.print(" > Please enter the choice:  ");
                 
fares.next();   
                 
                 
                 if (
e.equalsIgnoreCase("1")){
                     
                     
System.out.print("> Enter your name (first and last):  ");
                     
fares.next();
                     
fares.next();
                     
System.out.print("> Enter your mobile (##-###-####):  ");
                     
                     
System.out.print("> Enter vehicle make and model:  ");
                     
fares.next();
                     
fares.next();
                     
System.out.print("> Enter mileage:  ");
                     
fares.next();
                     
System.out.print("> Enter service description:  ");
                     
fares.next();
                     
fares.next();
                     
System.out.print("> When do you want your service appointment:  ");
                     
fares.next();
                     
fares.next();
                     
fares.next();
                     
                     
                     
System.out.println("");
                     
System.out.println("---------------------------------------------------------------------------------");
                     
System.out.println("| Yor request was received; you will be contacted within 24 hours to finalize it. |");
                     
System.out.println("---------------------------------------------------------------------------------");
                     
System.out.println("Here is a confirmation of your request to Toyota: ");
                     
System.out.println("       Appointment Type: Service");
                     
System.out.println("       Name : "+(toUpperCase(e+" "+r))+"                Phone:  ");
                     
System.out.println("       Make and model of your vehicle: "+(a+" "+b));
                     
System.out.println("       Mileage: "+c);
                     
System.out.println("       Service needed: "+(d+" "+g));
                     
System.out.println("       Preferred date for Sales appointment:"+(h+" "+i+" "+j));
                     
System.out.println("");
                     
System.out.println("       **You will now be returned to the Appointment Menu.");
                     
                 }
                 
                 if (
e.equalsIgnoreCase("2")){
                     
                     
System.out.print("> Enter your name (first and last):  ");
                     
fares.next();
                     
fares.next();
                     
System.out.print("> Enter your mobile (##-###-####):  ");
                     
                     
System.out.print("> Which make and model are you interested in:  ");
                     
fares.next();
                     
fares.next();
                     
System.out.print("> How many vehicles are you wanting to purchase:  ");
                     
fares.next();
                     
                     
System.out.print("> When do you want your service appointment:  ");
                     
fares.next();
                     
fares.next();
                     
fares.next();
                     
                     
                     
System.out.println("");
                     
System.out.println("---------------------------------------------------------------------------------");
                     
System.out.println("| Yor request was received; you will be contacted within 24 hours to finalize it. |");
                     
System.out.println("---------------------------------------------------------------------------------");
                     
System.out.println("Here is a confirmation of your request to Toyota: ");
                     
System.out.println("       Appointment Type: Sales");
                     
System.out.println("       Name : "+(toUpperCase(e+" "+r))+"                Phone:  ");
                     
System.out.println("       Make and model you are interested in: "+(a+" "+b));
                     
System.out.println("       Number of vehciles planning to purchase: "+c);
                     
System.out.println("       Preferred date for Sales appointment:"+(h+" "+i+" "+j));
                     
System.out.println("");
                     
System.out.println("       **You will now be returned to the Appointment Menu.");
                     
                 }
                 
                 
                 else if (
e.equalsIgnoreCase("3"))
                 {
                  
                  break;
                  } 
                 else {
                     
                  
System.out.println("");
                  
System.out.println("   Invalid Input!!! Please Try Again ..... ");
                  {continue;}
                 }
                 
                  
 
                 }   break;
                     
                  default:
                  
System.out.println("");
                  
System.out.println("   Invalid Input!!! Please Try Again ..... ");
                  {continue;}
                 
                 }
                 
               
                
                
                }
          
       }
                 
                 
                 
         
       
             
         
         
        
             
             }while(
true);
       
            
    }

    
    } 
السلام عليكم ورحمة الله
ياليت لو أحد منكم يقدر يساعدني و يشرح لي هالبروجيكت لان حايس فيه 1- ماعرفت كيف اخليه يرجع للقائمة الرئسية 2-ماعرفت لل exit اللي هيا تحسب كل اللي دخلتو ويطلعو في جدول و يتقفل البرنامج 3- واخر نقطة للمتغيرات اللي هيا حق (####-###-##) الجوال والمتغيرات اللي تحت الجوال مني عارف كيف اخلي المستخدم يكتب اللي يبغاه مثلا اقعد اخليه يكتب اذا ظغط انتر ينتقل للمدخل التالي , اتمنى الفزعة ياشباب نقرتين لعرض الصورة في صفحة مستقلة نقرتين لعرض الصورة في صفحة مستقلة الكود اللي ارسلتو ماهو كامل بس اتمنى توضيح للثلاثة نقاط بس .

راح أكون شاكر لكم
الصور المرفقة
نوع الملف: pdf CPCS202_Program3_2016_1st.pdf‏ (361.0 كيلوبايت, المشاهدات 18)
نوع الملف: pdf CPCS202_Program3_2016_1st_SAMPLERUN.pdf‏ (115.6 كيلوبايت, المشاهدات 12)
نصائح مهمة : 1 - إفحص الملف المرفق بأي برنامج مضاد للفيروسات
2 - قم بمراسلة الإدارة عن أي مرفق يوجد به فيروس
3 - المنتدى غير مسوؤل عن مايحتويه المرفق من بيانات
رد مع اقتباس

 

منتديات طلاب وطالبات جامعة الملك عبد العزيز منتديات طلاب وطالبات جامعة الملك عبد العزيز
قديم 26-11-2015, 05:05 AM   #2

Azzoz1996

جامعي

 
تاريخ التسجيل: Jun 2014
كلية: كلية الحاسبات وتقنية المعلومات
التخصص: IT
نوع الدراسة: إنتظام
المستوى: الرابع
البلد: جــــدة
الجنس: ذكر
المشاركات: 194
افتراضي رد: مساعدة في شرح بروجيكت برمجة 2

1- لازم يكون nested loops فلازم زر الريترن يخلي شرط اللوب خطأ فيرجع للوب اللي شمله..
2- نفس طريقة count++ لكل شيء، واخر شيء تجمعهم.
3- لـ ##-###-#### استخدم سترنق.. وبس
للمعلومية... input.next(); هذي تقرا كلمة وحدة
اما
input.nextLine(); هذي بتقرا السطر كامل..

بالتوفيق، التسليم اليوم ;)

 

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

إضافة رد

أدوات الموضوع إبحث في الموضوع
إبحث في الموضوع:

البحث المتقدم
انواع عرض الموضوع

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

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

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

 


الساعة الآن 03:43 PM


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

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

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

2003-2023