Untitled Document

 

قديم 11-20-2007, 10:37 PM   #1
bssol
أكاديمي جديد
التخصص الأكاديمي: IS
 

تاريخ التسجيل: Oct 2005
الدولة: Portland, or


واجب معجزني

انا تخصصي بزنز بس ملزوم اخذ كلاس كمبيوتر صاينص

والحين عندي واجب عليه 100 نقطة ولي حول 5 ساعات احاول اسويه بس ماوصلت لاي نقطة.
طلب شباب تشوفوه وتساعدوني، مافي مجال حتى اروح للتوتر يساعدني

الواجب كما عطانياه البروفوسور


HomeWork 5, Array Sorting, 100 Points (10/9/2007)

Due Date: Monday November 12th 2007 at start of class
Subject: Sort an array of integers; output the initial and the sorted array

General Rules: Implement your Homework (HW) in Visual Basic (VB), and email it to the grader in zipped format; include the VB source and .exe object file. Write your name, the HW number, the completion date, and the current PSU term into a comment of each source file.

Abstract: Implement in Visual Basic a program that sorts an array of 30 integers. You may use any sort algorithm, including a bubble-sort, which is recommended due to its simplicity.

Detail: Write a Visual Basic (VB) program that sorts the elements of an array of 30 integers. The program uses 3 buttons, named init print, sort, and output. Execute the program by sequentially clicking all 3 buttons, which will cause initialization, sorting, and output of the final, sorted array.

Initialization: Define an array named data() of 30 integers. Assign integer values to the elements of data(i) with Basic statements, not be reading information from an input file. Use a symbolic constant named max for the number 30 of elements. Initialize the first 10 elements of data(i) to i*11; note that VB uses a zero-based lower bound. Initialize the next 10 elements of data(i) to –i, and set the last 10 elements of data(i) to i. When the initialization is complete, print the whole array, prefixed by the string "initial data:" and then the 30 numbers, 10 numbers per output line. Use the previously established method of first concatenating all substrings into a String object, including vbNewlines and blanks for separation.

Sorting: After data() has been initialized, click the sort button, which then will sort all elements of the array in non-descending order. I suggest you use a doubly nested loop to perform a simple bubble-sort. When the array is sorted, output the string "done sorting."

Output: After data() has been sorted, click the output button. This causes all elements of data() to be printed, 10 elements per line, all prefixed by the string “sorted data:”.

Extra Credit: During the sort process, data elements may have to be swapped. If you implement this swap action via a procedure call that uses reference parameters, you get 10 points extra credit.

أنا بكون اونلاين على طوول
bssol غير متواجد حالياً  
قديم 11-21-2007, 01:58 AM   #2
KFUPM
أكاديمي فعال
التخصص الأكاديمي: هندسه كهربائيه
 

تاريخ التسجيل: Nov 2007
الدولة: جده



أهلاً ومرحباً بك في الملتقى السعودي بأمريكا ... نآمل منك التكرم بالتسجيل (بالضغط هنا) لتتمكن من مشاهدة الردود المطروحة ... شكراً لك 
اسم العضوية
كلمة المرور
KFUPM متواجد حالياً  
موضوع مغلق

مواقع النشر (المفضلة)

أدوات الموضوع
انواع عرض الموضوع

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

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

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

[ دش نيتوورك سفلي ] [ عدد مرات العرض 8469791 ] [ عدد النقرات 0 ] [ دش نيتوورك سفلي ] [ عدد مرات العرض 6213620 ] [ عدد النقرات 0 ]


الساعة الآن 02:30 AM.


Powered by vBulletin® Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
© جميع حقوق الطبع والنشر محفوظة للملتقى السعودي في الولايات المتحدة وكندا
جميع ما يتم طرحه من مواضيع أو أخبار في هذا الموقع تمثل كاتبها أو ناشرها أو ناقلها ، وليس بالضرورة تمثل إدارة الملتقى السعودي ، وهذا يخلي إدارة الملتقى من مصداقية المواضيع المنشوره بغير اسم ادارة الملتقى ولكن حقوقها ترجع لهذا الملتقى
يُمنع نقل أو نسخ أي موضوع أو مداخلة دون ذكر المصدر!