CS101 Introduction to Computing Assignment No.2 April Spring 2012
Assignment No. 02
Semester: Spring 2012
Introduction to Computing-CS101
Total Marks: 20
Due Date: 02-05-2012
Objective: To develop your own JavaScript functions and using them in form.
Instructions:
Please read the following instructions carefully before solving & submitting assignment:
Assignment should be in your own wordings not copied from internet, handouts or books.
It should be clear that your assignment will not get any credit (zero marks) if:
o The assignment is submitted after due date.
o The submitted assignment does not open or file is corrupt.
o The assignment is copied (from other student or copied from handouts or internet).
o Student ID is not mentioned in the assignment file or name of file is other than student ID.
For any query about the assignment, contact at cs101@vu.edu.pk
GOOD LUCK
Question 1 [20 marks]
Make a form in HTML document containing only one field named as Email and one Submit Button. Write your own JavaScript function to validate the email address.
The Validation should be as follows:
1. It must accept only your VU Student email address i.e; it must not accept any other student’s VU email address.
2. It must show alert on acceptance or denial of the email address after validation.
3. The name of the function should contain your student ID like CheckEmail_BC102034568.
4. If you enter your wrong student email id then it must show alert as well.
5. It must accept your student ID only at vu.edu.pk, means if you enter BC102034568@hotmail.com then it must not accept it.
6. There must be unique alerts for each error; like if the length of the student ID is larger or smaller than the original ID then the alert should be according to that.
7. During each alert, the entered email address must also be shown in the alert box like: “BC102034560000008@vu.edu.pk is not your Valid Email address”
Hint: See the attached sample html file for simply checking @ and dot in an email address.
Note:
o Assignment should be done by your own efforts, not copied from net, handouts or books.
o You should submit your html file as well as word file containing the code, zip the both files in one single file and upload via your assignment interface.
ENG101 English Comprehension Assignment No. 2 April Spring 2012
Assignment No. 2 (Spring 2012)
English Comprehension (ENG101)
Total Marks: 15
Due Date: 03.05.2012
Objectives:
• To enhance and test students’ knowledge of grammatical terms, and their usage.
• To assess students’ knowledge of writing skills.
• To gauge students’ ability to distinguish between facts and opinion.
Instructions:
1. No assignment will be accepted via e-mail after the due date.
2. Plagiarism will not be tolerated. Plagiarism occurs when a student uses work done by someone else without acknowledging the actual author. It also means copying and pasting the material from handouts and internet source without rephrasing it in his/her own words.
3. Students must solve their assignments in Microsoft Word file.
Q 1 Define the following terms and give an example for each. (5)
i. Hasty generalization
ii. False Cause
Q 2 Read the given statements and determine if these are Facts (F) or Opinions (O).
(5)
1. Many people order pepperoni on their pizzas.
2. Basketball is more interesting to watch than golf.
3. Flowers bloom in the spring and summer months.
4. Exercising outdoors is more fun than exercising indoors.
5. Daisies are the prettiest of all flowers.
Q 3- Fill in the blanks with the help of appropriate choices. (5)
1- The question of purpose of writer is closely related the matter of ………………
Attitude.
tone
style
opinion
2- ———– is the most important skill you will need for success in your studies.
Reading
Writing
Listening
Speaking
3- Authors and their works are …………………
complex
simple
biased
fair
4- The writer can indicate his character through the words he put into his character’s …………..
mind
knowledge
mouth
experience
5- As biasness is unavoidable while writing, writers do try to remain as …………..as possible.
objective
subjective
comprehensive
neutral
CS201 Introduction to Programming Assignment No. 02 Semester Spring April 2012
CS201 Introduction to Programming Assignment No. 02 Semester Spring April 2012 Due Date:02/05/2012
Problem Statement: Temperature Calculation system
Write a program that displays average, highest and lowest temperatures.
Detailed Description:
- The program will take temperature readings as input from user for specified number of consecutive days.
- Program will store these temperature values into an array.
- Then it will pass this array to three different functions.
- One function will return highest temperature, one will return lowest temperature and third one will return average temperature.
- All these functions will be called inside main() function where these temperature results will be displayed to the user.
Sample Output:
Enter the number of consecutive days to read their temperature : 5
Enter temperature for day 1: 50
Enter temperature for day 2: 80
Enter temperature for day 3: 30
Enter temperature for day 4: 92
Enter temperature for day 5: 47
The average temperature is 59.80
The highest temperature is 92.00
The lowest temperature is 30.00
Introduction to Computing CS101 Assignment No 01 10th April 2012 solution
Question 1 [10 marks]
Write the URLs and types of the following popular websites
No. Web site Name URL Type
1 AOL
2 Microsoft
3 Yahoo
4 Google
5 Amazon
Question 2 [10 marks]
Consider you have developed your first web page on your computer. Your Web page is visible only on your computer. It would be nice if it was also visible on the computers of all your friends and relatives as well. So what steps you will take for it?
Note 1:
Do not copy solution from the announcement for webs.com regarding lecture 06, else you will be given zero marks.
Note 2:
o Assignment should be in your own wordings not copied from net, handouts or books.
o Your answer should be “to the point”.
o Lectures covered – 1 to 8
CS501 Advance Computer Architecture final term current solve paper february 2012
FINALTERM EXAMINATION
CS501- Advance Computer Architecture (Session – 1)
Marks: 75
Question No: 1 ( Marks: 1 ) – Please choose one
Which one of the following is the memory organization of SRC processor?
- 28 * 8 bits
- 216 * 8 bits
- 232 * 8 bits
264 * 8 bits
Question No: 2 ( Marks: 1 ) – Please choose one
Type A format of SRC uses ———–instructions
- two
- three
- four
- five
Question No: 3 ( Marks: 1 ) – Please choose one
The instruction —————will load
the register R3 with the contents of the memory
location M [PC+56]
- Add R3, 56
- lar R3, 56
- ldr R3, 56
- str R3, 56
Question No: 4 ( Marks: 1 ) – Please choose one
Which format of the instruction is called the accumulator?
- 3-address instructions
- 3-address instructions
- 2-address instructions
- 1-address instructions
- 0-address instructions
Question No: 5 ( Marks: 1 ) – Please choose one
Which one of the following are the code size
and the Number of memory
bytes respectively for a 2-address instruction?
- 4 bytes, 7 bytes
- 7 bytes, 16 bytes
- 10 bytes, 19 bytes
- 13 bytes, 22 bytes
Question No: 6 ( Marks: 1 ) – Please choose one
Which operator is used to name registers, or part of registers, in the Register
Transfer Language?
- :=
- &
- %
- ©
Question No: 7 ( Marks: 1 ) – Please choose one
The transmission of data in which each character is self-contained units with its
own start and stop bits is ———–
- Asynchronous
- Synchronous
- Parallel
- All of the given options
Question No: 8 ( Marks: 1 ) – Please choose one
Circuitry that is used to move data is called ————-
- Bus
- Port
- Disk
- Memory
Question No: 9 ( Marks: 1 ) – Please choose one
Which one of the following is NOT a technique used when the CPU wants to
exchange data with a peripheral device?
- Direct Memory Access (DMA).
- Interrupt driven I/O
- Programmed I/O
- Virtual Memory
Question No: 10 ( Marks: 1 ) – Please choose one
Every time you press a key, an interrupt is generated.
This is an example of
- Hardware interrupt
- Software interrupt
- Exception
- All of the given
Question No: 11 ( Marks: 1 ) – Please choose one
The interrupts which are pre-programmed and the processor automatically finds
the address of the ISR using interrupt vector table are
- Maskable
- Non-maskable
- Non-vectored
- Vectored
Question No: 12 ( Marks: 1 ) – Please choose one
Which is the last instruction of the ISR that is to be executed when the ISR
terminates?
- IRET
- IRQ
- INT
- NMI
Question No: 13 ( Marks: 1 ) – Please choose one
If NMI and INTR both interrupts occur simultaneously, then which one has the
precedence over the other
- NMI
- INTR
- IRET
- All of the given
Question No: 14 ( Marks: 1 ) – Please choose one
Identify the following type of serial communication error condition:
The prior character that was received was not still read by the CPU and is
over written by a new received character.
- Framing error
- Parity error
- Overrun error
- Under-run error
Question No: 15 ( Marks: 1 ) – Please choose one
———-the device usually means reading its status register every so often until
the device’s status changes to indicate that it has completed the request.
- Executing
- Interrupting
- Masking
- Polling
Question No: 16 ( Marks: 1 ) – Please choose one
Which I/O technique will be used by a sound card that may need to access data
stored in the computer’s RAM?
- Programmed I/O
- Interrupt driven I/O
- Direct memory access(DMA)
- Polling
Question No: 17 ( Marks: 1 ) – Please choose one
For increased and better performance we use _____ which are usually made of glass.
- Coaxial Cables
- Twisted Pair Cables
- Fiber Optic Cables
- Shielded Twisted Pair Cables
Question No: 18 ( Marks: 1 ) – Please choose one
In _____ if we find some call party busy we can have provision of call waiting.
- Delay System
- Loss System
- Single Server Model
- None of the given
Question No: 19 ( Marks: 1 ) – Please choose one
In ____ technique memory is divided into segments of variable sizes depending upon
the requirements.
- Paging
- Segmentation
- Fragmentation
- None of the given
Question No: 20 ( Marks: 1 ) – Please choose one
For a request of data if the requested data is not present in the cache, it is called a _____
- Cache Miss
- Spatial Locality
- Temporal Locality
- Cache Hit
Question No: 21 ( Marks: 1 ) – Please choose one
An entire _____ memory can be erased in one or a few seconds which is much faster
than EPROM.
- PROM
- Cache
- EEPROM
- Flash Memory
Question No: 22 ( Marks: 1 ) – Please choose one
________chips have quartz windows and by applying ultraviolet light data can be
erased from them.
- PROM
- Flash Memory
- EPROM
- EEPROM
Question No: 23 ( Marks: 1 ) – Please choose one
The _______signal coming from the CPU tells the memory that some interaction is
required between the CPU and memory.
- REQUEST
- COMPLETE
None of the given
Question No: 24 ( Marks: 1 ) – Please choose one
______ is a combination of arithmetic, logic and shifter unit along with some
multiplexers and control unit.
- Barrel Rotator
- Control Unit
- Flip Flop
- ALU
Question No: 25 ( Marks: 1 ) – Please choose one
1. In Multiple Interrupt Line, a number of interrupt lines are provided between the
____________________ module.
- CPU and the I/O
- CPU and Memory
- Memory and I/O
- None of the given
Question No: 26 ( Marks: 1 ) – Please choose one
The data movement instructions ___________ data within the machine and to
or from input/output devices.
- Store
- Load
- Move
- None of given
Question No: 27 ( Marks: 1 ) – Please choose one
CRC has ———— overhead as compared to Hamming code.
- Equal
- Greater
- Lesser
- None of the given
Question No: 28 ( Marks: 1 ) – Please choose one
The ________ is w-bit wide and contains a data word, directly connected to the data
bus which is b-bit wide memory address register (MAR) .
- Instruction Register(IR)
- memory address register (MAR)
- memory Buffer Register(MBR)
- Program counter (PC)
Question No: 29 ( Marks: 1 ) – Please choose one
In_______technique, a particular block of data from main memory can be placed in
only one location into the cache memory .
- Set Associative Mapping
- Direct Mapping
- Associative Mapping
- Block Placement
Question No: 30 ( Marks: 1 ) – Please choose one
_______ indicate the availability of page in main memory.
- Access Control Bits
- Used Bits
- Presence Bits
None of the given
Fundamentals of Algorithms CS502 Assignment No 5 solution fall January 2012
Question# 1 (5)
Illustrate precisely what you have learned from the course of
Fundamentals of Algorithms (CS-502); your level of analytical
skills has been accelerated up-to which extent ?
Question# 2 (10)
Illustrate the concept of Complexity theory in terms of
Polynomial and Non-deterministic polynomial time algorithms.
Comparison based answer; along with examples of problem
domains of both types; is required.
Recommended book for solving assignment
Cormen, Leiserson, Rivest, and Stein (CLRS) 2001, Introduction to Algorithms, (2nd ed.)
McGraw Hill.
Estimated Time 3 hours
You can make justified search for the topic in One hour and 1.5 hour to
understand the whole themes you are asked and 0.5 hour to organize and type
whole material.
This assignment will help you to understand the concepts of Knapsack Problem and
Chain matrix Multiplication which results in efficient calculation time wise.
Advance Computer Architecture CS501 assignment no 5 fall January 2012
uestion No 1
Marks: 5
According to the Radix conversion algorithm, convert 49210 to base 16 (Write down all the steps which are involved in conversion).
| Question No 2 |
|
Marks: 5 |
According to the Radix conversion algorithm, convert the hexadecimal number D416 to base 10 (Write down all the steps which are involved in conversion).
CS408 Human Computer Interaction assignment no 4 fall 2011 January 2012
Q: 1 Imagine you are an interface designer in well known software house. While designing an interface what are the important points that you take care keenly with respect to alignment of visual elements?
Marks[5]
Q: 2 Suppose you are a system analyst in a well reputed software house. There your job specifications are to identify the problem, analyze the existing system and understand user need in order to propose a solution. You collect data though observation, taking notes and use camera. Describe what the use of notes is and still cameras in data collection process?
Marks[5]
CS201 Introduction to Programming Assignment No 5 Solution fall January 2012
Problem Statement: Airline Fare System
Write a program for air fare System which will calculate fare on already reserved ticket.
Detailed Description:
In the program, you are required to make a class with name ‘airfare’ and following are the data members of class airfare.
ñ Seat type
ñ Price
ñ Tax
ñ Airline charges
In the main () function, create a constructor of class to initialize the class data members. Class must have a destructor. Create following user defined function as discussed below along with class constructors and destructor:
GetData(), this function will take the input for seat type variable from the user and will set the ticket price according to the input taken from user. The function GetData() will prompt user to enter required information for seat type.
Seat Type:
User can select one of the Seat type:
1. First Class Seat
2. Business Class Seat
3. Economy Class Seat
The function GetData() will also read the data from file named data.txt ( created in assignment no 3 ) to read the destination and then assigns the price for the given destination.
Price:
Price will be calculated on the basis of following information:
1- Fare type
2- Destination (Desire destination information will be read from the file “data.txt” )
The price will be assigned according to the table given below:
Seat Type
Destination
Ticket Price
Economy Class
Karachi
3000
Economy Class
Peshawar
2500
Economy Class
Lahore
4000
Business Class
Karachi
5000
Business Class
Peshawar
4500
Business Class
Lahore
6000
First Class
Karachi
7000
First Class
Peshawar
7000
First Class
Lahore
7000
Airline charges:
All airlines will charge 15% of ticket price extra to the all fare types along with the tax.
Class should have a user-defined function named CalculateTax() to calculate the tax according to seat type and ticket price.
Tax calculation will be done as below:
If seat type is First class then tax will be 30% of ticket price
If seat type is Business class then tax will be 20% of ticket price
If seat type if Economy class then tax will be 10% of ticket price
Calculateprice(), this member function will calculate price of already reserved ticket and will display total fare on the screen. Price calculation will add above calculated tax, airline charges to the actual ticket price according to following information.
Fare = Airline Charges + Tax + Ticket Price
In the function WriteData(), you are required to create a new text file name “fare.txt” in same folder/directory where you have saved your .cpp file. Open this file by using file handling functions and then write all air fare information in that file in following format.
————————————————————————
Name | Address| Date | Destination | Flight. No | Seat. No | Fare
————————————————————————.
.
.
.
.
.
.
————————————————————————
Required information of Name, Address, Date, Destination, Flight No, Seat No, should be taken from assignment no 3 output file.
Points To Remember:
Following points should be kept in mind and handled accordingly, otherwise marks will be deducted.
ñ Reading and writing from text file, must be done with standard file handling functions provided in handouts.
ñ All data members must be declared and initialized with appropriate data type.
ñ Exceptional cases must be kept in mind and handled accordingly while taking input from user.
ñ User must be prompted if there is any error while:
◦ Creating a file.
◦ Opening a file for reading/ writing.
Introduction to Computing CS101 Assignment No 5 Solution Semester Fall 2011 January 2012
Assignment No. 05
Semester Fall 2011
Introduction to Computing
You are required to develop an MS Excel spreadsheet which fulfills the following requirements:
Create two columns with headings Student Name and GPA.
The Student Name column should contain the names of twenty students and GPA column should contain the GPAs of the students respectively.
You can use any twenty names for Student Name column but all the values in GPA column must be in the range of 0.0 to 4.0 (0.0 ~ 4.0 both inclusive).