It 2018
It 2018
OUESTION # 3 [0 nrarksl
  a) [Iow an optical    disk is diffbrent from magnetic disk? Briefly cliscuss the physical
        organization ofboth the storage devices.
                                                                                                        t5l
  b)    Discuss the concept oI parallel processing and pipetining? FIow it hclps improving the
        overall perlbrnrance ol a computer?                                                  tsl
OUESTION # 4                                                                                   It0 marksl
  a)    Describe the following methods that computer criminals use to gain illegal access to
        computer  systems:                                                                             t5]
          i.   Denial of service attacks
                                                                                                     (P.r.o.)
         ii.     Trojan florse
        iii.     Zapping
        iv.      Piggybacking
         v.      Data diddling
Lasr \artre :
Courttrl r Pakislan v
Slgn UP
      (.-ll P,nqli
                           UNIYERSITY OF THE PUNJAB....                                       Roll No.
                                          First Semester             2018
OUES'I'ION # 1 [0 marks]
 Sclcct the bcst option for each of thc following NICQs. Ovcrwriting will result ZERO in
 crcdi t.
      A device driver is
          a)    l'he person who delivers hardware devices to a computer store
          b)   'fhe connector that allows you to attach the device to a computer
          c)   computer program that allows the operating system to communicate with the devioe
          d)   The power supply for the device
      *include<iostream>
      using       namespace       s   tld;                         using namespace s td;
                                                                   j" nt main
      int       main o                                                        o
                                                                    (
      t
                  int a=2 ;                                                       irl i - 4:
                  for (int a:2'a<-10;a++)                                         int r- = i '
                              a:a+2 ;                                             for(r=0;j>i;l--)
                        cout<<a<<endl i                                           {
                  return 0;                                                              ccut<< j-l<<"        ";
                                                                                  )
                                                                                  return 0;
          ii)         A car holds   12 gallons of gasoline and oan travel 350 miles before refueling. Write
                      a program   that  calculates the numbet of rniles per gallon the car gets Display the
                      result on the  screen.
                          /Use the following formula to calculate miles per gallon
                                                                                        (MPG)I
 Question # 3:
                                                                                                       3xl0=30
           program for the following Input a positive
     Wr-te--a                                                     integer from the user (lets say a) and display the
     sum of the first n terms of the following series:
                            l'+2'+3'+4'+5'+6'                      +A
     Three sample runs of your algorithm might look tike (Input is underlined in sample
                                                                                        run, only to
     distinguish from display messages):
      Entet th. nunber of terms: 3
      SuE of first 3 terBs of the series ia:                            14
     auesln# +'
                           iunction specialSearch which takes            a one-dimensional arrayof integers, its size,
     1*plemJni         a
 ,   ond un integer key asarguments. This function                will   determine the number of elements less than'
                                                                              prototype of your
     *rmber of*elemints greater than and equal to key in the given array. The
     function should be:
                                                                                                    int
              void sPecialsearch (int arr[], int n, int key, int& numless, int& numGreater,
      & numEqual)
                                                                                    in unsorted otder,
      In the aboie function prototype: arr is an array which contains n integers
      ;;1;;h; valuo based upon *hi"h the searching       wi1  be performed,   numless    , numGreater
                                                                              the counts  of the number
      oui nrnrpquul are r.efeience parameters which will 'se6
                                                           be       to return
      of elements less ,greater and equal to the key'
      [Nole: only write the tlefinition o.f functionJ
Question # 5:
       Write     a   program that take three district integers from user and display the second smallest of them?
                     UNTYERSITY OF TI{E PUNJAB
                                   Second Semester - 2018                                )..Roll No. ..................
                                  Expmin?tion: B.S. 4 Years
                                                                                                     \\
PAPER: Programming F undamentals                                           TIME ALLOWED:       15   Min.   '.
Course Code: IT-102,rc-12395 Part               - I (Compulsory)           MA)L MARKS: 10
  ii.      The                      searches   for special lines in a C++ program that begin with the #
           symbol.
           a)     Lirker                            b)     Compiler
           c)     Preprocessor                      d)     Object code
  iii.     An escape sequence starts with the                       character, and is followed by one or
           more control characters.
           a) /(Slash)                              b)     \ (backslash)
           c) # (hash)                              d)     ; (semicolon)
  lV.      How many bytes are required to store string "Hellow World".
           a)5                                      b)6
           c) ll                                    d)      t2
  t.       Computer can do many different jobs because they can be programmed.            True / False
  lt.      Machine language is the only language computers really process.                True / False
  iii.     A variable must be defined before it can be used?                              True / False
  iv.      A left brace in a C++ program should always be followed by a
           right brace later in the program?                                              True / False
           The = operator and the   :   operator perforrr different operation?            True / False
                     TJNIVERSITY OF THE PUNJAB
                                  Second Semester - 2018                                      ..RollNo.
                                 Examinatiop: B.S. 4 Years
                                                                                                          \\
PAPER: Digital Logic Design                                                                                    \
Course Code: IT-104 lII-l2397 part
                                                                         TIMEALLOWED:15Min.                        '.
                                             - I (Compulsory)            MAX. MARKS: 10
Q.1. (10x1=10)
  iii.    Which one of the following is not a valid rule of Boolean algebra?
          a)     A+l=l                          b)      A=A
          c)     A.A:A                          d)      A+0=A
  iv. ls}rrrel SR flip flop is designed and it is reset initially. The state of the flip flop when
      S=l and R=l will become:
      a)l                                  b)0
          c)a                                   d)      Q'
  Y.      Decoder is a:
          a)    Combinational circuit           b)      Sequential circuit
          c)    Complex circuit                 d)      Gate
  vi.     To desigrr a firll adder circuit using ROM, the size of the ROM    will   be   _.
          a)     32x4                           b)      8x2
          c)     8xl                            d)      32x.3
  x.      TypesofRAMare:
          a)2                                   b)3
          c)4                                   d)s
                        I]NTVERSITY OF THE PUNJAB
                                                                                                 aaaaaaaaaaaaaaaaa              a   aaaaaaaa
                                      Second Semester - 2018                                     aa
                                                                                                 aa
                                     Examination: B.S. 4 Years
                                                                                                 !la raRot1No......................
                                                                                                         l oo aaaaaaaaa     looa
                                                                                                                                     :
                                                                                                                                    a'   a
                                                                                                      a         aa
             c)    We have to design a circuit that takes 4-bit binary number as input and generates its square as
                   output. How many output variables/ functions are required to design this circuit?
                                                                                       (3)
              d)   To design a combinational circuit using ROM that converts a decimal digit from 2421 code to BCD,
                   what is the size of ROM?                                                         (3)
             e)    write the equation for A>B for a 3-bit magnitude comparator   AzArAoand   BzBrBo. (3)
              f)   Fill up the Excitation table of lK flip flop.                                                 (4)
q(t) Q(t+1) J K
0 0
0 1
1 0
1 7
             a)    lmplement the following function using multiplexer. Keep three variables A,            B   and D as select
                   lines to the m ultiplexer.                                     (10)
                           F(A,B,c,D) =   L   10,7,2,4,8,e,rs\
             c)    Design a 2-bit synchronous counter using D flip flops, whose counting sequence is controlled by
                   a control input x in the following way:                                       (10)
2->1->3->0-> Repeat
     show the transition table, derive the input equations and draw the circuit diagram ofthe counter to 8et
     f   ull cred it.
                                  UNTYERSITY OF THE PTJNJAB
                                                      Third Semester            2018               :                                      :
                                        Examination: B.S. 4 Years Programme                        i.*,j.ol:: ;:.;: ;: ;: ;:...:.;: ;
  PAPER: Object Oriented Programming                                               TIME ALLOWED:2 hrs. & 30 mins.
  Course Code: IT-201 121400                                                       MAX MARKS: 50
                             Atlempt this Paper on Separate Answer Sheet provided
                                                          SUBJECTIYE
Question # 02:-
                                                                                                                         [axs=201
Give precise and short answers of the following:
Question S 03;-
                                                                                                                                I3OI
Provide the implementation of a class named Rational having
                                                            two data members (a and b) of type float with private access.
    1'   Data member of this class should contain negative data or -1 (default
                                                                               value) for a particular object. Write all the set
         functions for each data member to set their varues.
                                                                                                                     Io2+oz+o2l
    2'   lmplement default (sets all data members to .1), parameterized and
                                                                            copy     constructor.                          + 02 +   02]
                                                                                                                     [02
   3'    lmplement getData member function for taking the inputs for a particurar
                                                                                  ob.iect's   data.                             to2]
   4'    overload arithmetic assignment operator (/=) to divide and assign the data of one object to    another.                to3l
   5'    overload stream insertioo operator to dispray the data of object on the   consore                                      t03l'
   6'    overload arithmetic product (*) operator to return the result of two objects
                                                                                      after   multiplication,                   to3]
   7'    over oad unary minus (:l operator, returns true if an object contains data less
                                                                                         than zero, false   otherwise.          to2l
   8'    lmplement getEqualobiects rnember function which accepts an
                                                                     array of Rational objects and return the index of an
         object which is equal to the left hand side object.
                                                                                                                    t05l
                                UNIVERSITY OF TIIE PUNJAB.,..
                                                                                                                Roll No.
                                                   Third Semester              2018
                                      Examination: B.S. 4 Years Prosramme
Question fr 01:- Write the seiected option (A or B) on your answer sheet against each of the following              .   [1 x 10:101
1.   The analysis, design and implementation of inforrnation systems using obiect oriented programming languages, technologies
     and techniques is called object-oriented development?                                             A. True         B. False
2.   The pointer, automatically supplied when you call a non-static class member function is   this?      A. True           B. False
3.   when you call a public static function from outside its class, you can use an object?                A. True           B. False
4.   A member function can always access the data in the private part of its   class?                     A. True           B. False
5.   Gamefl; is a legal constructor for the Game   class?                                                 A. True           B, False
5'   The primary advantaBe to overloading functions is use one function name for many types of   items?   A. True           B. False
7.                                                                            error?
     lf you do not overload an = operator for a class the compiler will not give an                       A. True           B. False
8.  The number of associations possible between classes of ob;ects is called multiplicity?                A. True           B. False
9.  An advantage of inheritance includes facilitating abstract classes?                                   A. True           8. False
10. A virtual fr:nction is a function that causes its class to be abstract?                               A. True           B. False
                        UNTVERSITY OF THE PUNJAB
PAPER: Computer Organization     and Assembly   Language TIME ALLOWED: 2 hrs. & 30 mins.
Course Code: fTA0En1402                                  MAX. MARKS: 50
                   Attempt this Paper on Seporole Answq Sheet provided
                                        SUBJECTIW
                                             Part - ll
   Question # 2:                                                                            I2OI
      a) Describe the purpose of the different flag bits in the flags register.
      b) What are the different addressing modes used in intel architecture?
      c) The CPU is connected to the rest of the computer using what three buses?
      d) Write an assembly language instruction that sets all the bits of AL register.
                                             Part - lll
     Question # 3:                                                                            [10]
    Write a procedure that copies a (text) paragraph from a file, changes it into uppercase and then
    writes the modified text into the other file.
    Question # 4:                                                                             tlOI
    Write a program that inputs 10 digits, stores them into an array and finds the maximum digit.
    Input Validation: you should input only digits and make sure that no other character can be
    input.
    Question #     5:                                                                         tlOI
    write a program that inputs two strings and checks them whether they are same or not.
                         T]NTVERSITY OF TI{E PIIIIJAB... '..                          RoIl No.
                                    Third Semester 2018
                              Examination: B.S. { Years Proeramme                          \\
                                                                                                \\
PAPER: Computer Organization and Assembly Language                    TIME ALLOWED: 30 mins'.'...\
                                                                      MA)L MARKS: 10
Course Code: IT-203121402                                                                            ".
                         Attempt this Paper on lhis Question Sheet only.
                                                 OB.IECTIW
                                                      Part - I
  Question # 1:                                                                             Il OI
  Answer all parts in this question on answer sheet. Wrlte on the answer sheet the part number
  and your answer against it. No
     1'. Cross Assemblers are used to make the source code compatible for different family of
             processors.
                            A.   True                              B. False
             It is not necessary that program written for 80386 runs on g0g6.
                         A. True                               B. False
             The segment registers can only be used when the program is running in the real mode.
                         A.      True                          B. False
             Assembly language is a machine independent language and has one to one correspondence
             with rnachine language.
                         A. True                               B. False
                instruction performs POPF, POP lP.
             IRET
                       A. True                                 B. False
             PROCedures a!'e rnore time efficient than MACROs.
                            A.   True                              B. False
             Local descriptor table is defined by a segment descriptor.
                       A. True                                     B. False
             MOV AX, [SP] is an invalid instruction.
                           A. True                                  B. False
             DOS    lnterrupt handlers are faster than those provided by BIOS.
                           A.    True                              B. False
             CLI   instruction affects   FLAGS register.
                           A.    True                              B. False
                            T]NTVERSITY OF THE PT'NJAB
                                       Fourth Semester - 2018                                  . RoIlNo.
                                      Examination: B.S. 4 Years
                                                                                                     \\
PAPER: Web Engineering                                                             TIME ALLOWED: 15 Min]..
Course Code: IT-205 lfr-22405              Part- I (Com                            MA)L MARKS: l0
  Sue$le!_f     1.
                                                                                      [Marks:1x10=10]
  Evaluate the statement and write down the correct option number,
     1. ln CSS, we can apply different styles to a group of elements.
          a.    True
          b.    Fa    lse
     3.   lf we uses post method technique, then the data will be sent through
          a. body of request
          b.    url
          c.    botha&b
          d,    none of these
                                                                                         (P.T.o.)
 6.   ln N-Tier architecture, which layer is present
                                                     in middle?
      a. Presentation / View Layer
      b.    Eusiness Logic Layer
      c,    Data Access Layer
      d.    None of these
                                                                                                    aa
                                       Examination: B.S. 4 Years
                                                                                                    ItaaoRouNo......................
                                                                                                          t ooot  t       oao
                                                                                                                                     :
                                                                                                                               aaa aa'
                                                                                                                                aaaoooa
 Question f 2.                                                                                      [2 x 10 = 20 Marksl
 Precisely write down the answers of the following questions.
     1.   Describe the two attributes i.e. action and method of 'tabae'tag in html?
     2.   Write down a life cycle of JSP page.
     3.   What is meant by Server-side scripting language?
     4.   What is meant by a mark-up language?
     5.   What is the purpose of JSP directives?
     5.   What is meant by AIAX?
     7.   Def ine Java Beans.
     8.  What are the differences between sessions and cookies?
     9. What are the components of a HTTP Response?
     10. What is the benefit of N-Tier Architectu re?
 Questio!_f 3.                                                                                      [3 x 10 = 30 Marks]
 Briefly write down the answers of the lollowing questions.
     1.
                a.       What are the differences between a servlet andJSP?                                         tsl
                b        What do yoi-l mean by request dispatcher and send redirection?                             ts1
     2.   Write   servlet class which will dynamically create an ordered list of all items stored in database.
                     a
          Table conlarns two columns (ltem Name, Nurnber of items).
          DB Nome: Dotobose
          To   ble   no   me : ltem ( item_No me (vo rCh o r(50) ), no_Of_ltems(int)   )
     3.   Write a JSP page, which will dynamically create a table with politician's information stored in the
          database. Table contains two columns (Politician Name, Politician Current Party Name).
          DB Nome: Dotobose
          To   ble   n o me   : Politicion( pol_No me(vo rCho r(5O) ), pol-Porty(vo rcho 450) ) )
                   I]NIVERSITY OF THE PUNJAB
                                       Fourth Semester - 20I8                                  . RollNo.
                                                                                                           \
PAPER: Softryare Engineering                                            TIME ALLOWEI):           15   Mints. '...
Course Code: IT-206 llT42406 Part            -   I (Compulsory)         MAX. MARKS: 10
         Question #:      1
                                                                                        (1x10=10)
           l.    Linear Sequential Model is suitable when?
                     A. Requirements are clear                        C. l ime is less
                     B. Frequcnt changes arc there                    D. ResoLr rces are short
           2.   Sequence/arrangel-nent ofsteps to achieve a particular goal is known as:
                    A. Software Process                              C. Software Engineering
                    B. Process                                       D. Both,A,and,B'
           3.   A software rnusl have:
                   A. lnstructions to do the task
                    B. Data structu rcs
                    C. Documentations
                    D. All of thc above
           6.   Which one ol'the follou,ing is not part ol.,,Structured Analysis tvlode l,'?
                   A. Functional Model                               C. Data Design
                   R. Data N,lodel                                   D. Ilehavioral Model
           7.   Which of the lbllorving is not true about conr ponent- leve I design
                   A. It enablcs transformation oldesign ntodel into opcralional softrvare
                   B. [t occurs when data, arch itectr.r ral, and interlace designs have been
                         established
                   C. It has the high dcgree of software design abstraction.
                   D. It establishes the algorithmic dctailrequired to nranipulate data structures
          9.    Which one of the following is not a "golden rule of user interface design"?
                  A. "Place the user in control"
                   B. "Reduce the user's metuory Ioad"
                   C. "Make the interface consistent"
                   D. None of the above
           10. Testing can show rhe abscnce and as      wellas the presence olerrors'
                   A.    Trtre
                    ll   I:a lsr:
            TTNTVERSITY OF THE PUNJAB
                          F'ourth Semester - 2018                                     aaa aa aaa a a aaaaaa        aaaa a a a aaa
                                                                                      aa
                    Examination: B.S. 4 Years Prosramme
                                                                                      3
                                                                                      laoRotl No. .....................
                                                                                                                        :
                                                                                            r   oo   oeo aaaaaaa   aoo   t   o o o a to
                              1:
                 Define'sofiware, and,,Software Engineering,,./
                          ),
                 Name the 4 ps of project Management?
          -3:
                 Explain the unit of ,Effort,i)
                      4:
                 Define "transactional flow', with respect to ,,architectr.rral
                                                                                design,,?
                          \-
                D   i   lfcrentiate,,B lack Box .1-csting,, and,, White l3ox .l-esting,.?
                         1.
                Define 'Risk,? How,,Risk Analysis is conducted,,?
                         3:
                lrxplair thc concepts or'coupJing' and 'cohesion'
                                                                  by taking rcrcvanl exanrples,/
                      T]NIYERSITY OF THE PUNJAB
                                Fourth Semester - 2018                                ..Roll No.
                          Examination: B.S. 4 Years Programme
                                                                                                   i
    Please encircle the correct ootion. Each MCO carries     I   Mark. This Paner wiII be collected
    brck after exnirry of time limit mentioned ebove.
    ii.     How many swaps are required to sort the given anay using bubble sort           -   {2, 5,   1,
            3,4):
            a.4                                        b.5
            c.6                                        d.7
    iii,    A binary tree whose every node has either zero or two children is called:
            a.     Complete binary tree                b. Binary search tree
            c.     Extended binary tree                d. None ofthe above
    iv.     \A/hat is the worst case time complexity of linear search algorithm?
            a.      O(1)                               b.        o(n)
            c.      O(log n)                           d.        O(n')
PAPER: Data Structure and Algorithm                                           TIME ALLO\ilED:          2       Hrs. & 45 Mints.
Course Code: lT-207 I fr-22408 Part - II                                      MAXMARKS:50
                           Attempt this Paper on Separate Answer Sheet provided.
    c)    The following given function runs in time O(n), you have to write an equivalent function
          that runs in time O(1).
a) Write a program to check whether a given string is of the form anbnwhere n = 0, 1' 2' 3. .
Data is:
     s) Regular expression for all strings starting with "ab" and ending with .,bba,, is:
                        a.    aba*b*bba
                        b.    ab (ab )*bba
                        c.    ab (a + b)*bba
                        d.    All ofthe above
     6)    For   I   = { a, b } and L: all strings containing   "aba" as Substring. Difference of transactions made in
           constructing DFA & an equivalent NFA?
                        a.2
                        b.3
                        c.4
                        d. Can't be determined
     7)    Valid strings for a language are:
                        a.Which are over given       f
                        b.    Follow the rules of that specifi,c language.
                        c.    Botha&b
                        d.    None of above.
8)   For a string "aaaaaa" What is the smallestvalid length? lf t={a, aa, aaa}
                   a.6
                   b.2
                   d.0
9)   lf   S   = { ab, bb } then S* will not contain
                   a. abbbab
                   b. bbba
                   c. bbbbab
                   d. ababbb
iOl Wtrlctr one       is true?
                   a.   All FA's are also NFA
                   b.   All NFA's are also FA
                   c,   Both are true
                   d.   None ofthem
                              UNIVERSITY OF THE PUNJAB
                                                                                             aaaaaaal,aaaaaaaaaaa
   Question    f   02
                                                                                                           ls*4]
     a)   Give Recursive definition of Regular Expressions.
   Question # 03
                                                                                                           [s*6]
     a)   construct a Turing Machine which will double every,b, ln all inputted string
                                                                                       over { c, d }.
     b)   Construct a pDA for the language PALINDROME over c, d
                                                                    {      }.
     c)   construct MooRE machine (an         FA   with outPut) which can subtract any two inputted binary
          strings.
 1) A --------- uses its own employees to do some work activities and networks of outside suppliers to provide other
 needed product components or work processes,
         A: Network organization                        B: Learning organization
         C: Virtual organization                        D: Bound ary-less orga n ization
 2)A person needs for internal factors such as self-respect, autonomy, and achievement, and externalfactors such      as
 status, recognition, and attention are called ------------?
        A: Hygiene factors                                    B: Referents
        C: Safety needs                                       D: Esteem needs
 3) ------------ are any constituencies in the organization's environment    that are affected by an organization's
 decisions and actions.
                   spirituality
        A: Workplace                                          B: Strong cultures
        C: Socialization                                      D: Stakeholders
4) ------------ means that the two merging companies became history and a new firm is established.
        A: Acquisition                                   B: Merger
        C: Joint Venture                                 D: Both A and B
5) ----------- means the degree to which a job provides substantial freedom, independence, and discretion to the
individual in scheduling work and determining the procedures to be used in carrying it out.
       A: Job scope                                     B: Autonomy
       C: Task significance                             D: Both A and B
6) ----------- says that authority comes from the willingness of subordinates to accept it.
       A: Employee empowerment                               B: Decentra lization
       C: Acceptance theory of authority                     D: Both A and C
7) Which element of structure refers to the continuous line of authority that extends from the highest
organizational levels to the lowest and clarifies who reports to whom?
     A: Work specialization                                B: Span of control
      C: Centralization                                      D: Unity of command
8) For a manager to control or direct the work of an employee, the manager must have
      A: Line authority                                   B: Responsibility
      C: Referent power                                   D: Staff authority
10. Explain the concept of bounded rationality in the decision making process?
    1.   Differentiate between planning and controlling process. Mention four advantages and four
         limitations of planning?
3. Define motivation? Explain how do goal-setting and reinforcement theories explain employee
         m ot   ivation   ?
                       UNMRSITY OF THE PUNJAB '''-... RorNo.                                 t..
   3. Use Yenn diagram to determine the validity of the following syllogism. And also apply fallacy
   if commit.                                                         10 marks
       a.   EIO-2
       b.   AAA-3
       c.   AOO-l
       d.   EAE.2
       e.   OOO-4
        2.   lf every times we get 'Lahore' as a city name against caty code '042'then Database            is
                          a.   Consistent
                          b.   Neither Consistent nor lntegral
                          c.   Consistent but not lntegral
                          d.   Not Consistent But lntegral
                          e.   lntegral
             d) _
                           UNIVERSITY OF THE PUNJAB
                                                                                                                           aaaaaaa
                                                                                      aa
                                     Fifth Semester 2018                              a.
              Q3:Normalize the following table up to 3rd Normal form but step by step show each
              intermediate resultant table with its data. (05 Marks)
Branch Staff
                                                                                                        1 't
                                                                                                          1-923-
                                                                                                        923
                                                                                       Eng.             111-921-
                                                                                       Dept             921
        Student can appear in the exam. Question Paper only contains MCQs but having
        variation ofoptions and also there is a variation ofcorrect number ofoptions in one
        question. Different Questions may contain different marks and some of them may
        have negative marking. System Calculates the student Results and student can
        review there incorrect questions with their correct answers. System can also
        maintain the history of Personal information for our students.
Q5: Write SQL Queries for thc given statements: (20 Marks)
a)   Show Emp name salary of those employees working in LHR and working in finance
     and having salary less than the average salary of all employees.
b)   Find ename and salary of those employees getting salary less than the average salary
     of any department.
c)   Find the total numbers of employees department wise.
d)   Show emp-name of those employees whose getting salary more than smith and less
     than lara.
e)   Show ename salary of employees working in Jordan department but getting salary
     more than lordsan
Select the best option for the following multiple choice questions. t10l
      6. Which module gives control of the CPU to       the process selected by the short-term scheduler?
      a) dispatcher
      b) interrupt
      c) scheduler
      d) none of the mentioned
                                                                                                    P.T.O.
7. Spinlocks are   :
a) must always be less than the total number of resources available in the system
b) must always be equal to the total number of resources available in the system
c) must not exceed the total number of resources available in the system
d) must exceed the total number of resources available in the system
Part-ll
    A very short answer is required for each of the following questions.                              [10x2=20]
        1.   Which system call is used to create a process in UNIX?
        2.   How hardware devices use the functionality of an operating system?
        3.   What is meant by CPu-protection?
        4.  What is meant by dual-mode operation?
        5.  What is the function of ready queue?
        5.  What is the difference between Long Term Scheduler and Short Term Scheduler?
        7.  ln which memory management technique process can be divided into equal parts?
        8.  ln which memory management technique, system suffers from External Fragmentation?
        9.  What is meant by critical section?
        10. What is meant by race condition?
                                                        part   -Il
    Answer the following questions briefly.
                                                                                                      [6xs=30]
        1.   Explain five states process model.
        2.   What are the different multithreading models?
        3.   Name the different techniques used for process synch ronization.
        4.   What are the necessary conditions for the deadlock to exist?
        5.   Determine the system state for the following resource allocation state by using Banker's
             algorithm.
                                       Allocation                    Max                  Available
                                       A 8CD                         ABCD                 ABCD
                      PO               2707                          5163                 3181
                      P1               25LL                          4832
                      P2               0101                          0207
                      P3               0227                          0225
                      P4               3110                          9180
                      P5               oL22                          ot77
        6.   Consider a computer system with a 24-bit logical address space and with 2 KB page size.
             Suppose that the maximum physical memory size is 54 MB, and the system is byte-addressa ble.
             Let paging be implemented for the system. Give answer to following five questions:
             a. How many bits for p and d are there in the logical address?
             b.   How many.pages are there in the process?
             c.   How many frames are there in the memory?
             d.   What is the size of the page table if one entry in the page table is of 4 bytes?
             e.   How many levels of paging will be required for the above scenario?
                                                                                            ....
                               UNIVERSITY OF THE PUNJAB                                                 Roll No.
                                           Fifth Semester 2018
                                     Examination: B.S. 4 Years Prosramme                                       \\
PAPER: Object Oriented Analysis and Design                                      TIME ALLOWED: 30 mins)'.
Course Code: IT-307                                                             MAX. MARKS: 10
                          Attempt this Paper on this Question Sh'eet only.
                                       OBJECTIVE TYPE
   Q1: Choose the correct Answer.                                          (10*1 = 10)
     4)   9)   .._-is         the property that distinguishes an active object from one that is not active.
               a) Persistence         b) Typing
               c) Aggregation         d) Concurrency
     6)    what is that concept in type theory in which a single name may denote objects of many
     different classes that are related by some common super class referred to
          a) Homomorphism          b) Type Checking
          c) Polymorphism          d) Generalization
a) Technology b) deployment
               c)   lmplementation         d) behaviora I
                      UNIVERSITY OF' THE PUNJAB
                                                                                      a aaaa   a   aa aataaa   ata
                                                                          aoaaaoaaa
                                                                          aa
                                Fifth Semester 2018
                          Examination: B.S. 4 Years Prosramme             !o.....o
                                                                              Rotl No. .....................
                                                                                                     .....,
                                                                                                                 :
PAPER: Object Oriented Analysis and Design                    TIME ALLOWED:2 hrs. & 30 mins.
Course Code: IT-307                                           MAX. MARKS: 50
                   Attempt this Paper on Separate Answer Sheet provided.
                                    SUBJECTIVE TYPE
   Question # 2,                                                                       [2 x 10 = 20 Marks]
   Precisely write down the answers of the following questions.
   Question # 3.                                                                       [3 x 10 = 30 Marks]
   Briefly write down the answers of the following questions.
      1.   A client wants to send a request to server for reversing a string. So, you have to make a server-
           client application, in which client sends a string to the server and server resends it after
           reversing the string. (Do your task with serialization method in which either you can use built-in
           class String or make your own string class).
      2.   Write a JSP page, which will dynamically create a drop down list with all smartphones along with
           their company saved in data base.
           DB Name: Dotobose
           Table name: Smortphone(model (vorChor(15)), compony(varChar(15)))
      3.   Write a program in which a thread will be created. This thread will take a positive nurnber         as
           input from main thread and display all number from 0 to that number.
                        UNIVERSITY OF THE PUNJAB
                                          Sixth Semester - 2018                                                              '...Roll No.
                                   Examination: B.S. 4 years proqramme
            Question fi 1.
            Evaluate the statement and write down                                                                  [Marks: 1x 10 = 1Ol
                                                  the correct option number.
                     b.2
                     c. Multiple
                     d. None of the above
             6.    Finalize method is                   in java.
                   a. a destructor --
                   b. a garbage collector
                   c. called before destroying the objects
                   d. called after destroying the objects
            7.    There              a   this reference in static methods-
                  a.    exists--
                  b.    does not exist
Question No 2: Give the short answers of the following short            Questions? [2x1O=2O]
1: What is the size in Bytes of PORT address?
2: Which layer is responsibie for the delivcry of data from one process to another?
3: Which topology is the ideal one for point to polnt     networks?
4: The attenuation of a signal is -10 Db. What is the final signal power if it was originally 5 Watt?
5: Calculate the bit rate for the baud rate of 1oo0 baud under 8-PSK modulation?
6: How many bits can be transmitted in 1 sec if 10 bits can be transmitted in 0 1 ms?
7: What are the three types of decision taken by a bridge for an incoming frame?
g: using   4 bit sequence number, what is the maximum size of the send and receive windows for
           a
   each of the following Protocol:
                           Selective RePeat ARQ
                           Go-Back-N ARQ
10: How the hop by hop choke packets approach is better than the other choke packets                  approach
(affect only the   sou rce)?
(2)   Encode the bit stream O1OO11O1 into digital signal with the following encoding schemes?
        NRZ.L
         Ma nchester
         Differential Manchester
(3) The code 11010101101 was received.            Using the Hamrning encoding algorithm, what   as   the
      original code sent?
                                                                                           protoco '
(4) Two nodes (assume'A'rs sender and'B'is receiver) use a sliding window.(go- back-N )
                              window positions for the iollowing succession of events: (Assume  that
Show the sender and receiver
sender window size is 4)
   a) Before 'A' sends any frame.
   U) efter'A' sends frame 0, !, 2 and receives acknowledgement from 'B'.for 0 and 1
   cj efter'A'sends frames i, +, and 5 and'B'acknowledges 3, and 4 and the ACK of 4 is lost
       whereas ACK of 3 is received bY'A'.
(5) Determine the level of sensitivity ('High'or'Low') of each application in the following table for
given parameters.
                   File shari
                   Web access
                   Audio on demand
                   Video conferencin
(6) From the following network find the shortest path from 'A' to all destinations using Dijkstra's
Algorithm.
                         T]NIVERSITY OF THE PUNJAB
                                         Sixth Semester - 2018                                     Roll No.
    7. To solve the looping problem,           bridges on LAN use      the         algorithm, to create a loop
          less topology,
                     a) Dijkstra's                         b) Distance Vector
                     c) Spanning tree                      d) none
Question #    2.                                                                [2 x 10 = 20 Marks]
Precisely write down the answers of the following questions.
    1.   "To achieve the objectives of lnformation Technology, firm must be able to implement new
         technology effectively". Now what are the problems in adrieving the objectives?
    2.   Define information system w.r,t functional perspective.
    3.   Define the following terms
         a.   P   rocess
         b.   Knowledge
   4. Differentiate lower and higher productivity.
   5. What are the risks involved in utilizing information systems?
   6. What is meant by customer relationship management?
   7. Describe the stages of innovation based model of lnformation system implementation?
   8. What are the management issues in information technology?
   9. What is meant by forecasting?
   10. What are the common type of issues in an organization?
Question # 3.                                                                   [3 x 10 = 30 Marks]
Briefly write down the answers of    thl   following questions.
  Question # 1.                                                                          [Marks:1r19=101
  Evaluate the statement and write down the correct option number.
     1.   Cooperation between business manaBers and lS personnel           is   the key to     the potential of
          any new or modified system.
               a.   Unlocking
               b.   Locking
               c.   Botha&b
               d.   None of these
     2.   tf        is not accurate or complete   -   People can make poor decisions.
               a..lnformation
          b. Expenditure
          c. Profit
          d. None of these
     3. Valuable Can help manaBers decide whether to invest in additional information systems
          and tech nology.
               a.   Sou rces
               b.   Things
               c.   lnformation
               d.   None of these
     4.           mechanism - The component that helps organizations achieve their goals, such as
          increasing profits or improving customer service.
               a.   lnput
               b.   Output
               c.   Feedback
               d.   None of these
     5.   World's largest computer network is known        as
               a.   Skype
               b.   lnternet
               c.   Whatsapp
               d.   None of these
                                                                                             (P.r.o.)
6. __        management systems            -   Organized collection of people, procedures, software, databases,
     and devices.
         a.   lnformation
         b.   Knowledge
         c.   Artif icial
         d.   None of these
                                                                                                                  ! oonouNo. .....................
                                                                                                                  oa           aoaa aoooaoaa
                                                                                                                                                             :
                                                                                                                         o    ooaa   aa                a   al
PAPER: Linear Algebra (MA)                                                                            TIME ALLOWED:2 Hrs. &                    45   Mints.
Course Code: IT-312 Part - II                                                                         MAX MARKS: 50
                    Attempt this Paper on Separate Answer Sheet provided.
     (i)        Determine the values of a for which the system of linear equations has no solution, exactly one
                solution and infinitely many solutions.
                x+\t+Jz=-7
                2x+3tt-r17z=-16
                x +21t + (s2 + l)z = 3cr.
     (ii)                            la'   + b'
                                                          c
     (iii)      Show that the vectors                     (1,-2),and (3,-5)                span the vector space IR'
     (iv)       Defjne        'I   : ^li
                                           r+     .Rr by       7'(_r,,xr,x.,) = (-_r.,,x,,x, + _r"). f ind N(7'). rs 7'one-to-one?
     (v)                                              [o I -rl
                Show that the matrix |                 :i --l 4 | rs involutery
                                                      I
[: -3 4 I
                                                                           sEcTtoN-ilt
                                                                   LONG    QUESTIONS                                      (6x5 = 30 Marks)
     Q.4
                 Findthereal orthogonal matrix Pfor which J'-tAPisorthogonal,urr,"r"                                            y'=[i jl
                                                                                                                                           l
     Q.s                                                                                   .l    2    _,.l
                 lf possible, find the inverse of the matrix
                                                                                           | 0 -2 0
                                                                                           l-z -2 rl
                                                                                                         |
     Q.6         Show that any finite dimensional vector space contains a basis.
     Q.7         Determine whether or not the given set of vectors is a basrs of lR'
                  {(r,
                         z,   -r ),(0,:, r), (r, -s, 3)}
                                      TJNTVERSITY OF THE PUNJAB
                                                                Sixth Semester - 2018                                                                     .    Roll No.
                                                                                                                                                                         \
PAPER: Linear Algebra (MA)                                                                                            TIME ALLOWED:                       15    Mints.
Course Code: IT-312 Part- I (Comnulso                                                                                 MAX. MARKS:10
(iii) ll ,4 is a rrratrix of order 3 x 3 and de(,,1) -- -2 , then the value of det(31) is --------
               (.c1
                       1\)t           -.   |                                   (d) Nonc ot-ilri.sc
            TINIVERSITY OF THE PUNJAB
                                                                              aa a a   aaaa aaaa aaaaaaaaaaaoaa
                          Sixth Semester - 2018                               aa
                                                                              aa
                   Examination: B.S. 4 Years Prosramme
                                                                              ItoaRott
                                                                                   t
                                                                                       No. .....................
                                                                                       ao  aaaaaa     aao
                                                                                                                         :
                                                                                       aa     aa        o        ooa o   oo
          Question - 2:
          Short Questions (2 Marks X l0 Question             :20 Marks)
          Question - 3:
          Long Questions (10 Marks X 3 Question              :30   Marks)
            4. Variables that are resrrlt ol introdLrced stiinuli in the experitnental method are :
            (a) The Independent Variable                               (b) Tlre Depencient Variables
             (c) Both & (a)    (b)                                     (d) None ol'these
            5. Who presented thcory ol'Social Learnirrg?
                (a)   AlbertBandura                                    (b) Wilhelrn Wundt
                (c)   Ivan Pavlov                                      (d) Roger Wolcott
            6.    psychoanalysis is a nreathod of searching a person's:
                   (a)       Conscious Memories                              (b)   UnconsciousMemories
                   (c)       [,atent Mernories                               (d)   None of them
            7. whole        is the greater than the sum of parts is the key point of
                      (r)          Cognitive School of thotLght                (b) ["unct ionalisrn
                      (")          Behaviorisur                                (d) Getatt School ofthought
            8 tl.U. -l'itchencr used the n.relhod    ol':
            (a) Fu nctiorr alisnt                                      (b)    lnttospcct iott
            (c) Observation                                            (d)    C linical Methocl
            10. Who opened the first psychology Iab at the ttniversity       ol l,eipzig?
                      (a)         Wilhelnt Wurtdt                               (b)       ts.F Sirtncr
                      (c)         lvan Pavlov                                   (d)       E.B. Titchener
             UNIVERSITY OF THE PI]NJAB
                   Sixth Semester - 2018                                           ."""""""""""".
                   Examination: B.S. 4 Years Proeramme                             !   RouNo. ..................... :
      Question - 2:
      Short Questions (5 Marks X 4 Question = 20 Marks)
      Question - 3:
      Long Questions (10 Marks X 3 Question               :30 Marks)
        l.   Define rhc terrn sociology.'? Sociology is the scientilic study of lrLrrnan relationship &
             interaction elaborate
II. Define the term "Soc ia lizat ion". DiscLrss the dilferent Agents ol'Socialization n
detail.
      lll.   Terrorism has becotne a real anrl potential threat to global peace and stability' What
             ro,c social scientist can play to cornbat tlreir problem?
                  UMVERSITY OF THE PT]NJAB
                                    Sirth Semester - 2018                                                        ..Roll No.
                                                                                                                              \
PAPER: Introduction to Sociology (SS)                                   TIME ALLOWED:                        15    Mints.
Qourse Code: IT-314 Part - I (Compulsory)                               MAX. MARKS: 10
              I   . Survey means:
               (a)    Overlooking                                        (b) Observation
               (c)    Organizing social data                             (d) None ofthese
              5.   Who can be taker as early pure sociology among the sooial thinkers?
              (a) Auguste comte                                          (b)     lbSn_e-khuldun
              (c) Durkheim                                               (d)     None ofthese