[x]

"وقـل اعمـلوا فسـيرى الله عـملكم ورسـوله والمؤمنـون"


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



المحـاضـرات
برنـامج الـدوام
برنـامج الامتحــان
النتـائج الامتحـانيـة
أسـئلة دورات
أفكـار ومشــاريع
حلقــات بحـث
مشــاريع تخـرّج
"وقـل اعمـلوا فسـيرى الله عـملكم ورسـوله والمؤمنـون"
كلية العلوم

مشاريع وأعمال حالية.. وإعلانات
برنامج امتحان كليّة العلوم .. الدورة الصيفيّة .. لكافة السنوات والاختصاصات
محاضرات الطبولوجيا 1 .. قسم الرياضيات .. السنة الثانية
برنامج امتحان كلية العلوم الفصل الثاني لجميع السنوات
مقرر فيزياء الجسم الصلب .. السنة الثانية .. قسم الكيمياء
**""البرنامج النهائي لكلية العلوم **""الفصل الأوّل.."
إعلان هام للطلاب من جميع الاختصاصات ....!!!
سديم العلوم ... العمل على العدد الرابع
إعلان محاضرات الأسبوع الثقافي في كلية العلوم
تعديل شهادة الكيمياء الى صيدلة
مجلة سديم العلوم ... العدد3
مواضيع مميزة..



مواضيع ننصح بزيارتها:
العضو المميز .:. .:.

مشروع ترجمة قاموس البيئة
...{مشاريعنا}... : مجلتنا,,سديم العلوم 3,,, أفكار ومقترحات |\science/| موضوع تعريفي بكلية العلوم...دليل الطالب إلى كلية العلوم |\science/| لنعمل على إغناء منتدانا... مشروع الترجمة في كلية العلوم |\science/| مشروع ترجمة قاموس البيئة |\science/| مشروع محاضرات كلية العلوم |\science/| معاً لنغن مكتبة العلوم بالفائدة

...{مواضيع مثبتة}... : فهرس المواضيع المميزة في كلية العلوم |\science/| لأننا نحبهم...الأعضاء المتألقين في كلية العلوم |\science/| فهرس المواضيع المترجمة... مشروع الترجمة في كلية العلوم |\science/| تعرف على مجلتنا "سديم العلوم" |\science/| فهرس الكتب في مكتبة كلية العلوم |\science/|

برنامج الدورة التكميلية لكلية العلوم .. النسخة النهائية .:. دليل الطالب إلى كلية العلوم .. للطلاب المستجدّين


  ملتقى طلاب جامعة دمشق --> كلية العلوم --> مكتبة كلية العلوم --> قسم البرامج العلمية
    اريد حل هذي الاسئلة من البرمجة؟؟؟؟؟؟؟
عنوان البريد :  
كلمة المرور :  
                    تسجيل جـديد


.اريد حل هذي الاسئلة من البرمجة؟؟؟؟؟؟؟


صبر بلاحدود

جامعـي جديــد




مسجل منذ: 08-11-2012
عدد المشاركات: 2
تقييمات العضو: 0
المتابعون: 1

غير موجود
اشــترك بالتحديثات
رسالة مستعجلة

اريد حل هذي الاسئلة من البرمجة؟؟؟؟؟؟؟

08-11-2012 06:39 PM




ابغي حل هذي الاسئلة ضرورري؟؟؟؟؟؟؟؟؟؟؟



الاسئلة تجدونها في المرفق



 


Problem 1:


 


Write a program that asks the user to enter a favorite color, a favorite food, a favorite animal, and the first name of a friend or relative. The program should then print the following two lines, with the user’s input replacing the items in italics: I had a dream that Name ate a Color Animal and said it tasted like Food!


 


For example, if the user entered blue for the color, hamburger for the food, dog for the animal, and Jake for the person’s name, the output would be


I had a dream that Jake ate a blue dog and said it tasted like hamburger!


Don’t forget to put the exclamation mark at the end.


 


Notes:


 


This project requires careful attention to spaces in output messages.  In particular, a space must be explicitly printed between the variables color and animal.


 


 


 


 


 


 


 


 


 


 


 


 


 


 


Solution:  as an example


 


Problem Analysis Chart:


 

















Given Data


Required Results


name


color


animal


food


Print “I had a dream that Name ate a Color Animal and said it tasted like Food!"


 


Processing Required


Solution Alternatives


System.out.println("I had a dream that " + name + " ate a " + color + " " + animal); System.out.println("and said it tasted like " + food + "!");


 


 


 


Algorithm:


 


1.      Read Name from user.


2.      Read Color from user.


3.      Read Animal from user.


4.      Read Food from user.


5.      Display message “I had a dream that Name ate a Color Animal and said it tasted like Food!"


 


Sample Code Solution:


 


From now on to the end of your four year program here at the University, every program you submit whether it is in lab or as homework should include the following:


·        File name


·        Full description of the coded program


·        Author: Name of student


·        Student ID


·        Student email address


·        Date submitted


 


 


 


 


 


 


 


 


 


 







/**


 


 File name: SillySentence.java


 


 This program does the following:


  Prompts the user to enter a friend's or relative's name,


                        a favorite color, a favorite food, and a favorite animal.


            Prints the following sentence with the user's input inserted:


 


            I had a dream that NAME ate a COLOR ANIMAL and said


                        it tasted like FOOD!


 


 Author: Lew Rakocy


 email address: [email protected]


 Date: 8/13/2000


 


*/


import java.util.*;


 


public class SillySentence


{


    public static void main(String[] args)


    {


        Scanner keyboard = new Scanner(System.in);


 


        System.out.println("Enter the name of someone you know:");


        String name = keyboard.nextLine();


       


        System.out.println("Enter your favorite color: ");


        String color = keyboard.nextLine();


       


        System.out.println("Enter your favorite food: ");


        String food = keyboard.nextLine();


       


        System.out.println("Enter your favorite animal: ");


        String animal = keyboard.nextLine();


       


        System.out.println("I had a dream that " + name


            + " ate a " + color + " " + animal);


        System.out.println("and said it tasted like " + food + "!");


 


    }


}


 


 


 


 


 






المرفقـات :
Assignment+1.pdf التحميل (9) (13 KB)



ملتقى طلاب جامعة دمشق




أنت غير مسجل لدينا.. يمكنك التسجيل الآن.
 








ملتقى طلاب الجامعة... منتدى غير رسمي يهتم بطلاب جامعة دمشق وبهم يرتقي...
جميع الأفكار والآراء المطروحة في هذا الموقع تعبر عن كتّابها فقط مما يعفي الإدارة من أية مسؤولية
WwW.Jamaa.Net
MADE IN SYRIA - Developed By: ShababSy.com
أحد مشاريع Shabab Sy
الإتصال بنا - الصفحة الرئيسية - بداية الصفحة