VU

Search Here All Mid & Final Papers

CS101 Assignment No. 02 Fall 2017 Discussion + Solution

CS101 Assignment No. 02 Fall 2017 Discussion + Solution


Assignment No. 02
Semester: Fall 2017
Introduction to Computing - CS101
Total Marks: 20
Due Date:  12-01-2018
Objectives:
After solving this assignment, students will learn about,
  • HTML tags and handling of HTML tags.
  • Table creation and handling in HTML.
  • Knowledge about JAVASCRIPT functions and JAVASCRIPTS events.
Instructions:
Please read the following instructions carefully before submitting assignment:
It should be clear that your assignment will not get any credit if:
§  The assignment is submitted after due date.
§  The assignment is submitted via email.
§  The assignment is copied from Internet or from any other student.
§  The submitted assignment does not open or file is corrupt.
§  It is in some format other than .html.
Note: All types of plagiarism are strictly prohibited.
For any query about the assignment, contact at cs101@vu.edu.pk
Question Statement:

Note:  Students are required to submit HTML code file only with .html extension.Don’t upload word format file(.doc) etc.

You are required to write HTML with Java Script code to create Weight Converter Calculator web page which can be used to convert values entered in Kilo Gram to Gram, Pounds, Milligrams, US tons and Ounces respectively.

 

Solution guidelines of this  web page are given as follow,

  • You are required to create a text for taking input from the users in Kilo Grams. This text box can be labelled as Weight in KG.
  • The users will be required to enter their input in Weight in Kg.
  • Create one button labeled as Convert. On Mouse Click event the function “Converter” should be called to covert KG value to other units.

If no value or less than 0 is entered in KG text box and Covert button is clicked then alert should be shown through window.alert() as:




  • If the values is greater than 0 then your webpage will show converted values in Grams, Pounds, Milligrams, US tons and Ounces in the given text boxes as shown in sample output.
  • Create another button labeled as Reset Form to clear text box values.
  • You are required to use table so that items of the webpage will be shown in the arranged form.

Formula for KG to Grams conversion is:

Kilo Grams= KG*1000

Formula for KG to Pounds conversion is:

Pounds = KG* 2.2046

Formula for KG to Milligrams conversion is:

Milligrams = KG* 1000000

Formula for KG to Pounds conversion is:

US Ton = KG* 0.0011023

Formula for KG to Pounds conversion is:

Ounce = KG* 35.274

Sample Output (Snapshot): Color Scheme may be of your choice


Solution:
Copy Code and Paste in Notepad and Save as Your Id with dot HTML Extension like bs00000000.html



Welcome to Our Site! - Virtual Ustaad This site is basically Design to help all Virtual University Students in their Study programs.its a plateform where you can get all your past papers which are made by Different Students of Virtual University. The Main purpose of this site to help and guide you by giving all materials, which will be helpful for you.