منتديات التقني عالم التجارة
SPTechs منتديات
 اسم المستخدم حفظ بيانات الدخول 
كلمة المرور
  منتديات SPTechs   > لغات برمجة
 thread

pleas help me with this program

 

  السبت 18 أغسطس 2018 م الموافق ‏07/‏ذو الحجة/‏1439 هـ الساعة 18:51

 


الرد على الموضوع عدد القراءات : 1378   

معلومات :   البلد : ليبيا
  عدد المشاركات : 1
ayad1989


[ الخميس 22 فبراير 2007 ]
 
 
 

pleas help me with this program



this is my email send me an email if u dont understand so i will contact u back بارك الله فيكم • design a C++ programme that meets the requirements defined, build and test that program so that it produces the required outputs, do this using three approaches. Requirement: Figure 1 is a series circuit containing a resistor R a capacitor C and an inductor L. The circuit is supplied by an alternating current supply V. Write a program in which the user enters values for C, R, L and Vsinωt. Vsinωt is an ac voltage. The program will undertake calculations and print the results to screen as defined in the program specification. Program specification: • the user can enter the value of a capacitor e.g. 0.01µF. • the user can enter the value of a resistor e.g. 1kΩ. • the use can enter the value of an inductor e.g. 10mH • the user can select a range of frequencies e.g. 10kHz to 100kHz in ten steps; the program will calculate the following: • the reactance of the capacitor XC. • the reactance of the inductor XL • the circuit impedance Z. • the phase angle between the voltage across the resistor and the supply voltage ø. • . • the program will print the values of frequency, capacitive reactance, inductive reactance, impedance and phase angle to the screen in an ordered format for ten frequencies. • the program can be run continuously unless terminated by a user input. • the program will calculate the resonant frequency. Produce 4 versions of the program these versions are: 1. Using global variables and using functions, the program will need to use a loop and print to the screen the values of frequency, XL, XC, Z and ø each time they are calculated in a loop. 2. Similar to 1 above but using functions that return a value and have local variables, there will be some global variables; 3. Similar to 1 above but using functions that return values by the use of referencing and have local variables, there will be some global functions; 4. Similar to 1 above but using functions that return values by the use of referencing and have local variables, there will be some global variables. This program is to use arrays to store the calculated values of XL, XC, Z and ø. The student is to produce the following: A virus free disc containing the source code, the executable files of the three programs and print-offs of the programs. Assessment: The assignment will be assessed as follows: the production of a successful program using global variables and using functions; (50 % of the total mark) the production of a successful program using functions that have parameters passed to them by value and returns a value the functions should also use variables local to the functions; (20% of the total mark) the production of a successful program using functions that pass parameters by the use of referencing and also uses local variables to the functions. (20 % of the total mark) the production of a successful program using functions that pass parameters by the use of referencing and also uses local variables to the functions, but in addition uses arrays to store the values of Z, X. and ø, the array is then passed to another function which prints to the screen the contents of the array. (10 % of the total mark) The marking scheme above indicates the maximum mark that can be gained by each element of the assignment. Each program will be assessed on its ability to meet the specification, incomplete programs or programs that do not wholly meet the specification will still be awarded marks. Additional electrical principles notes: Capacitive reactance Xc = 1/(2πfC), where f = frequency and C is capacitance. Inductive reactance XL = 2πfL, where L is inductance. Overall impedance Z = √{( XL-Xc)2 +R2} The phase angle ø The angle between the voltage across the resistor and the supply voltage can be calculated as ø = tan-1 (XL-Xc)/R or cos-1 R/Z or sin-1(XL-Xc)/Z i.e. fig 2. Note that because it’s a series circuit the phase diagram for the impedance triangle is the same as that for the voltages across the components i.e. fig 3. The resonant frequency is when XL-Xc = 0 i.e. the circuit is resistive. The resonant frequency is when XL = Xc Figure 2. Figure 3 Additional programming notes: To generate 10 different frequencies between two frequencies f_upper and f_lower use a first calculate the value of the frequency increment as follows: (f_upper – f_lower)/(n-1) where n is the number of increments e.g. if f_upper = 1000 Hz and f_lower = 100 Hz and 10 increments are needed between f_lower and f_upper then the increment f_inc = (1000-100)/(10-1) = 900/9 = 100Hz. To generate a frequency that will be used in a calculation f_calc use the principle: f_calc = f_lower + f_inc*loop index value the loop index value will then range from 0 to 9, this will generate ten frequencies in this example only of 100, 200……1000Hz To calculate the resonant frequency you’ll need to evaluate XC-XL and test if it’s <1 To do part 2 of the assignment you need to use functions that return by value, these types of functions will accept any number of parameters but will only return one. So to use them for every function that could be written for the program would make the program long and untidy. So just use the return by value functions for the calculations of XL ,XC ,Z and ø.

اضافة رد على الموضوع




  منتديات SPTechs : مشاركات شبيهة .  لموضوع : pleas help me with this program

   .   قصة جميلة جدا باللغة الانجليزية مع الترجمة لها
   .   باتش لفتح اكثر من ماسنجر ياهو على نفس الجهاز
   .   اسرار وخفايا المسنجر حصرياامن الالف الى الياء
   .   وسام الديب .. برنامج فوتوشوب مشروح بالصور .. رائع لا يفوت ال
   .   اسرار الحاسب والانترنت
   .   ودعا لسرقة الاميلات حقا وداعا طريقة استرجاع الاميل المسروق م
   .   برنامج Google ماسنجر الجديد معرب بالكامل
   .   تعريف كرت الشاشة
   .   أفضل برنامج لمشاهدة القنوات الفضائية عبر الانترنت: سريع وبسي
   .   اكبر مكتبه العاب 2008 باخر اصداراتها (( تحتوي على60لعبه من ا




اسم المستخدم                        كلمة المرور

حفظ معلومات الاشتراك

# pleas help me with this program

register
 مستخدم جديد