Pages

Showing posts with label CS and IT. Show all posts
Showing posts with label CS and IT. Show all posts

Friday, July 27, 2012

Cs504(Software Engineering) Spring Final Term 2012

Question #1 marks 2
what is the basic unit of object oriented design ? discuss briefly.
Ans:
The basic unit of object oriented design is an object. An object can be defined as a
tangible entity that exhibits some well defined behavior. An object represents an
• individual,
• identifiable item,
• unit, or entity,
• either real or abstract,
with a well defined role in the problem domain. An object has state, behavior, and
identity.

Name any two standards which are being used by ,c++ for writing programs.
Ans:
1. Hungarian Notation
2. Bicapitalization or camel case

quesiton 3 marks 2
what extension should be used for c++ header file?
Ans:
C++ header files should have the extension .h.
Example: MyClass.h

as pre peter coad methodology for deriving the object model , " sale" is a
transaction object keeping in mind any point of sale system list the attributes of
sale object and services profited by it.
Ans:
product
pk Prod.id
Order.id
Dept.id


Question 4 …….marks 3

describe three coverage schemes related to white box testing?
Ans:
Statement Coverage: In this scheme, statements of the code are tested for a
successful test that checks all the statements lying on the path of a successful
scenario.

Branch Coverage: In this scheme, all the possible branches of decision structures
are tested. Therefore, sequences of statements following a decision are tested.

Path Coverage: In path coverage, all possible paths of a program from input
instruction to the output instruction are tested. An exhaustive list of test cases is
generated and tested against the code.

what is difference between inspection and testing?
Ans:
We always need to employ inspection techniques and combine them with testing to
increase the effectiveness of defect removal efficiency.

In inspections the emphasis is on early detection and fixing of defects from the program.
Inspections can check conformance with a specification but not conformance with the
customer’s real requirements. Inspections cannot check non-functional characteristics
such as performance, usability, etc. Inspection does not require execution of program
and they maybe used before implementation. Many different defects may be discovered
in a single inspection.

In testing, one defect may mask another so several executions are required.
For inspections, checklists are prepared that contain information regarding defects.
Reuse domain and programming knowledge of the viewers likely to help in preparing
these checklists. Inspections involve people examining the source representation
with the aim of discovering anomalies and defects. Inspections may be applied to any
representation of the system (requirements, design, test data, etc.) Thus inspections are
a very effective technique for discovering errors in a software program.

Consider the following statement

array[i++] = array[i++]=x;
keeping in mind the problems caused by side effects. how the above statement
can be dangerous.
Ans:
Due to side effects, multiple assignments become very dangerous. In this
statement, a whole depends upon when i is incremented.

question 6 marks 5
A student claims that we cannot implement the software construction activities,
if we don't have supporting tools that could provide us the automated or semi-
automated support? Do you agree with the statement or not ? Provide logical
reason.

Ans:
Only partially we can accept this claim.coz development is a creative activity.
Objective of development is to show that how the program works. tester uses his/her
imagination to come up with use patterns of the application that can help him/her in
describing exact steps that should be executed in order to test a particular functionality.
Moreover, they needs to figure out
loose points in the system from where he/she can discover defects. All these activities
are highly imaginative and a students are supposed to possess above average (if not
excellent) analytical skills. Scenarios missed or misunderstood during development
analysis would never be tested correctly because the corresponding test cases would
either be missing or would be incorrect.


So, student claims that we cannot implement the software construction activities, if we
don't have supporting tools that could provide us the automated or semi-automated
support is not acceptable at all.

quesiton 7 marks 5
Which of the following are the magic numbers?

Any number (even 0 or 1) used in the code can be a magic number.

These are constant that mean something but they do not give any indication
of their importance or derivation, making the program hard to understand and
modify. To a reader they work like magic and hence are called magic numbers.
It should rather have a name of its own that can be used in the program
instead of the number.

while working on a GUI user goes for some clicks in order to delete some
component of that system but that component is in use by some other
stockholder and hence cannot be deleted at that specific time'.
If you are the developer for this GUI , write at least 3 ways for handling above
scenario and also tell which solution is ideal in your point of view.
Ans:

First, if a component is currently in use, it should not have been displayed in the list at
the right.

Secondly, instead of displaying many messages separately in many dialog boxes, it

would have been appropriate to combine them in minimum message pop ups.

Thirdly, close all the other expected application which can use that component.

First option will be ideal to handle such issues.

Saturday, June 4, 2011

CS403 Assignment No. 3 Announced


Assignment No. 3
Semester FALL 2011
Database Management System-CS403

Total Marks: 15
Due Date: June 09, 2011


Objective:

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:

  • The assignment is submitted after due date.
  • The submitted assignment does not open or file corrupt.
  • The assignment is copied (from other student or copy from handouts or internet).
For any query about the assignment, contact at cs403@vu.edu.pk



Q1: Find E-R Diagram of ABC Hospital, below.

a.       You are required to translate diagram and write relations (tables) on behalf of E-R diagram provided. 3 Marks
b.      You are required to Normalize tables obtained from part a of Question 1 to 3rd Normal Form. All tables / relations should be in 3rd normal form. (You are not required to show all procedure from 1NF to 3NF, only final relations in 3NF are required to write.) 12 Marks

Attribute Details:

P-ID                   Patient ID
D-ID                  Doctor ID
D-Phone            Doctor Phone
M-Code             Medicine Code


** You are not required to change / update new attributes or entities in E-R Diagram, while writing relations in part a / part b.

Friday, June 3, 2011

CS402 Assignment No. 3 Announced


Theory of Automata (CS402)

Assignment No.3


Total Marks: 20                                                                                   Due Date: 09-06-2011

Rules for Marking
It should be clear that your assignment will not get any credit if:
  • The assignment is submitted after due date
  • The assignment is copied

Objectives:
After completing this assignment you will be able to have a great deal of understanding of:
  • Moore machine 
  • Mealy machine 
  • Regular language
  • Non-regular language
  • Complement method
Question No.1
Moore and Mealy machine 

Consider the following Moore machine 

IMAGE HERE

a)      Draw the transition table
b)      Run the string babbab over the above machine and determine corresponding output string plus table as well.
c)      Convert given Moore machine into an equivalent Mealy machine
                                
Question No.2

Regular Languages

Consider FA1 and FA2 representing languages L1 and L2 given below,

IMAGE HERE

Prove that Language representing FA1FA2 is regular using complement method.

                                              
Hint:
We know that a language is regular if it’s RE or FA or TG exists, so to prove L1L2 is regular you need to find FA1 U FA2 using complement method
[First find L1and L2Then L1∩ L2then (L1c∩ L2c) c  then find out the final FA as (L1c∩ L2c) c = L1 U L2

Assignment Uploading Instructions:
Upload single word file in office 2003 format having solutions for all questions.

CS302 Assignment No. 3 Announced

Assignment No. 03
Semester: Spring 2011
CS302: Digital Logic Design


Total Marks: 10
Due Date: 08/06/2011


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 submitted assignment does not open or file is corrupt.
 All types of plagiarism are strictly prohibited. 


Objectives:


This assignment has been designed to enable you to understand the concepts of:


• Flip-Flops
• Flip-flops with asynchronous inputs
• Counters


Guidelines:


• Perform/write all steps while solving the problems.



Question No. 1                                                                                                    [Marks: 7]


Determine Q output waveform for a negative edge triggered J-K flip-flop with preset, clear and J, K inputs. You are required to draw Q output waveform on timing diagram.

Question No. 2                                                                                                    [Marks: 1+2]

Provide to-the-point answers to the following questions:

a)      How does a synchronous counter differ from asynchronous counter?
b)      How many states does a mod-12 counter have? What is minimum number of flip-flops required?


Note: You can use Microsoft Paint or MS Visio to draw output waveform.

CS402 Assignment No. 3 Announced


Theory of Automata (CS402)

Assignment No.3


Total Marks: 20                                                                                   Due Date: 09-06-2011

Rules for Marking
It should be clear that your assignment will not get any credit if:
  • The assignment is submitted after due date
  • The assignment is copied

Objectives:
After completing this assignment you will be able to have a great deal of understanding of:
  • Moore machine 
  • Mealy machine 
  • Regular language
  • Non-regular language
  • Complement method
Question No.1
Moore and Mealy machine 

Consider the following Moore machine 

IMAGE HERE

a)      Draw the transition table
b)      Run the string babbab over the above machine and determine corresponding output string plus table as well.
c)      Convert given Moore machine into an equivalent Mealy machine
                                
Question No.2

Regular Languages

Consider FA1 and FA2 representing languages L1 and L2 given below,

IMAGE HERE

Prove that Language representing FA1FA2 is regular using complement method.

                                              
Hint:
We know that a language is regular if it’s RE or FA or TG exists, so to prove L1L2 is regular you need to find FA1 U FA2 using complement method
[First find L1and L2Then L1∩ L2then (L1c∩ L2c) c  then find out the final FA as (L1c∩ L2c) c = L1 U L2

Assignment Uploading Instructions:
Upload single word file in office 2003 format having solutions for all questions.

Is this blog is useful for you?

Powered by Blogger.