Assignment Document

Advanced personal temperature and humidity control

Pages:

Preview:


  • "APPLICATION DESIGN:Description of application:Recently, clothing fabric has been developed that allows its insulation and porosity propertiesto be controlled with small electric currents applied to the fabric. Passing a current through thehorizontal..

Preview Container:


  • "APPLICATION DESIGN:Description of application:Recently, clothing fabric has been developed that allows its insulation and porosity propertiesto be controlled with small electric currents applied to the fabric. Passing a current through thehorizontal fibers causes the insulation properties to increase significantly and in proportion tothe current applied. The rate that the cloth allows moisture to pass through is in proportion tothe current through the vertical fibers. Clothing made with this fabric would be extremelyuseful for sports attire and people working in extreme temperature environments. However togain full advantage of this fabric, a device similar to a smart watch is needed to control theinsulation and porosity properties of the fabric. This device will use sensors to determine thebest settings for the fabric. Software simulates the control of the fabric properties to match the needs of the wearer. Thewearer will set the desired insulation factor and porosity index based on their exercise activity,heart rate and air temperature. This information will be stored so that the wearercan selectfrom their saved settings. Application requirements:We choose the activity type from the list or input a new activity and enter the Insulation factor(%) and porosity index (%) value. Next we enter the air temperature and heart rate of theperson. The programs calculates and display the Insulation current and porosity current in ‘ma’on clicking the calculate button. Save button is used to save the current settings of the present activity in backend MS-Accessdatabase table. Load button can be used to load the previous setting values of the activityselected by the user and its value can be updated by entering new values and re-calculates thenew values for insulation current and porosity current and save the values to the backenddatabase table. Outline of Program Design:The program is designed in VB.NET 2012 with a GRAPHICAL USER INTERFACE form. Theprogram design have a combo box for selecting the activity or entering a new activity as desiredby the user. Next two textboxes are used for getting input for Insulation factor (%) and porosityindex (%). Further air temperature and heart rate are inputted using next two textboxes asprovided in the user interface.There are total 5 buttons on the form. New button isused for to enter a new record of any new activitywhich enables the text boxes for input.Calculatebutton is used to calculate Insulation current andPorosity current as per the settings as given inadjoining figure.Save button is used to store thecurrent record of activity to the backend MS-Accessdatabase table. Load Button let you select the activityfrom the combo box and display the settings stored for that activity in the database table. Usercan update or make changes to the input values and program will re-calculate the insulation current and porosity current as per the new values entered by pressing the calculate buttonand the new values can be saved by pressing the save button. Close button is used to exit theprogram.TESTINGInput Validation:The GUI form is incorporating all the required data validation for the input data. The combo boxis validated when user does not select any activity from the list or leave the textbox empty. Itshows the error if the combo box is empty and asks the user to select any activity from the listor enter a new activity in the textbox.The insulation factor text box is validated when either if the user does not enter any value or try to enternon-numeric value. The textbox allows to enter any numeric value only made of digits (0 – 9) ,or decimalpoint (.) .Same validation is also applied to porosity index, air temperature and heart rate textbox as shown infigures below: Output tested / Test data:Once all the data has been entered and validated, the program calculates the insulation current andporosity current when Calculate button is clicked and display the values in non-editable text boxes asshown in the figure above. DESCRIPTION OF PROGRAMThe program employs a user defined class named ‘fabric’ which is used to calculate the insulationcurrent and porosity current and return this values to the GUI form and display it in correspondingtextboxes in the user interface.Class fabric has following private variable: insfact-Insulation factor of type singleporoidx -Porosity index of type single atemp-Air temperature of type single hrate- Heart rate of type single icurr- Insulation current of type single pcurr- porosity current of type single insucoeff - Insulation coefficient value of type singleporocoeff - Porosity coefficient value of type singlefabric class have the following public property for getting and setting the values of the private variable.The property enables to get the access to the value of the private variable or store the values to privatevariable using a single property name.InsuFactor - Property for accessing and storing the value of insfact (insulation factor) variablePoroIndex - Property for accessing and storing the value of poroidx (porosity index) variableAirTemp - Property for accessing and storing the value of atemp (air temperature) variableHeartRate - Property for accessing and storing the value of hrate (heart rate) variableInsuCurr - It is a read only property to access the value of icurr (insulation current) which is calculated inside the calc() subroutinePoroCurr - It is a read only property to access the value of pcurr (porosity current) which is calculated inside the calc() subroutinefabric class have a public calc() subroutine which is used to calculate the value of insulation current(icurr) and porosity current (pcurr) as per the given formula. The insucoeff and porocoeff variables areused to store the value of insulation coefficient and porosity coefficient depending on the value of theair temperature variable atemp whose value is received from the user interface along with other values.fabric class have a parameterized constructor which is used to initialize the private variables of the classby the actual values as received from the user interface form and call the calc() subroutine to calculatethe insulation current and porosity current. The fabric class code is as under:PublicClassfabricPrivateinsfact, poroidx, atemp, hrate, icurr, pcurr, insucoeff, porocoeffAsSinglePublicPropertyInsuFactor() AsSingleGetReturninsfactEndGetSet(value AsSingle)insfact = valueEndSetEndPropertyPublicPropertyPoroIndex() AsSingleGetReturnporoidxEndGetSet(value AsSingle)poroidx = valueEndSetEndPropertyPublicPropertyAirTemp() AsSingleGetReturnatempEndGetSet(value AsSingle)atemp = valueEndSetEndPropertyPublicPropertyHeartRate() AsSingleGetReturnhrateEndGetSet(value AsSingle)hrate = valueEndSetEndPropertyPublicReadOnlyPropertyInsuCurr() AsSingleGetReturnicurrEndGetEndPropertyPublicReadOnlyPropertyPoroCurr() AsSingleGetReturnpcurrEndGetEndProperty PublicSubcalc()Ifatemp>= 0 Andatemp< 10 Theninsucoeff = 10porocoeff = 5ElseIfatemp>= 10 Andatemp< 20 Theninsucoeff = 15porocoeff = 6ElseIfatemp>= 20 Andatemp< 30 Theninsucoeff = 20porocoeff = 8ElseIfatemp>= 30 Theninsucoeff = 25porocoeff = 10EndIficurr = (insfact * (60 - atemp) * insucoeff * hrate) / 1000pcurr = (poroidx * atemp * porocoeff * (hrate - 60)) / 1000EndSubPublicSubNew(ByValifactAsSingle, ByValpidxAsSingle, ByVal temp AsSingle,ByValhrAsSingle)InsuFactor = ifactPoroIndex = pidxAirTemp = tempHeartRate = hrcalc()EndSubEndClassThe user interface form is as under: "

Why US?

Because we aim to spread high-quality education or digital products, thus our services are used worldwide.
Few Reasons to Build Trust with Students.

128+

Countries

24x7

Hours of Working

89.2 %

Customer Retention

9521+

Experts Team

7+

Years of Business

9,67,789 +

Solved Problems

Search Solved Classroom Assignments & Textbook Solutions

A huge collection of quality study resources. More than 18,98,789 solved problems, classroom assignments, textbooks solutions.

Scroll to Top