Thursday 28 March 2019

UGC NET Computer Science July 2018 – II Question 16

Question 16
16. Coupling is a measure of the strength of the interconnections between software modules. Which of the following are correct statements with respect to module coupling ?

P : Common coupling occurs when one module controls the flow of another module by passing it information on what to do.

Q : In data coupling, the complete data structure is passed from one module to another through parameters.

R : Stamp coupling occurs when modules share a composite data structure and use only parts of it.
Code :
  1. (1) P and Q only
  2. (2) P and R only
  3. (3) Q and R only
  4. (4) All of P, Q and R
Answer : (3) Q and R only

Explanation Question 16
  • Common coupling
    Common coupling is said to occur when several modules have access to the same global data. But it can lead to uncontrolled error propagation and unforeseen side-effects when changes are made.
  • Data coupling
    Data coupling occurs when modules share data through, for example, parameters. Each datum is an elementary piece, and these are the only data shared (e.g., passing an integer to a function that computes a square root).
  • Stamp coupling (data-structured coupling)
    Stamp coupling occurs when modules share a composite data structure and use only parts of it, possibly different parts (e.g., passing a whole record to a function that needs only one field of it).
From above definations for common coupling, data coupling and Stamp coupling we can conclude that given the statement P is not correct defination for the commom coupling.
  • Statement P is not correct
  • Statement Q is correct
  • Statement R is correct
So, Option (3) is correct answer.

Reference : Types of coupling


Previous Next
UGC NET CS 2018 July - II Question 15 UGC NET CS 2018 July - II Question 17

UGC NET Computer Science July 2018 – II Question 15

Question 15

Match the 5 CMM Maturity levels/CMMI staged representations in List- I with their
characterizations in List-II :

List - I List -II
(a) Initial (i) Processes are improved quantitatively and continually.
(b) Repeatable (ii) The plan for a project comes from a template for plans.
(c) Defined (iii) The plan uses processes that can be measured quantitatively.
(d) Managed (iv) There may not exist a plan or it may be abandoned.
(e) Optimizing (v) There’s a plan and people stick to it.

Code :
(a) (b) (c) (d) (e)
(1) (iv) (v) (i) (iii) (ii)
(2) (i) (ii) (iv) (v) (iii)
(3) (v) (iv) (ii) (iii) (i)
(4) (iv) (v) (ii) (iii) (i)

Options:
  1. (1)
  2. (2)
  3. (3)
  4. (4)
Answer : (4)

Explanation Question 15

  • (a) Initial → (iv) There may not exist a plan or it may be abandoned.
  • (b) Repeatable → (v) There’s a plan and people stick to it.
  • (c) Defined → (ii) The plan for a project comes from a template for plans.
  • (d) Managed → (iii) The plan uses processes that can be measured quantitatively.
  • (e) Optimizing → (i) Processes are improved quantitatively and continually.

Reference : What is Capability Maturity Model (CMM) Levels?

Reference 2 : CMMI Staged Representation - 5 Maturity Levels



PreviousNext
UGC NET CS 2018 July - II Question 14UGC NET CS 2018 July - II Question 16

UGC NET Computer Science July 2018 – II Question 14

Question 14
14. A software system crashed 20 times in the year 2017 and for each crash, it took 2 minutes to restart. Approximately, what was the software availability in that year ?

Options:
  1. (1) 96.9924%
  2. (2) 97.9924%
  3. (3) 98.9924%
  4. (4) 99.9924%
Answer : (4) 99.9924%

Explanation Question 14

Given:
Year 2017 Time period = 365 days
No of times crashed in the year 2017 = 20 times
Time to restart = 2 minutes

Solution:
Software availability is ratio of the total time for which a program is available/operating to the Total time. 
Given time period 365 days => Total time of 365 days in minutes = 365 x (each day has 1440 minutes) = 525600 minutes

Software unavailability time = (crashed 20 times in the year 2017) x (each time it took 2 min to restart) = 20 x 2 = 40 minutes

Software availability in year 2017
= 525560 / 525600
= .999924 or 99.9924 %

So, Option (4) is correct answer.

Previous Next
UGC NET CS 2018 July - II Question 13 UGC NET CS 2018 July - II Question 15

UGC NET Computer Science July 2018 – II Question 13

Question 13
13. Which one of the following is not typically provided by Source Code Management
Software ?

Options:
  1. (1) Synchronisation
  2. (2) Versioning and Revision history
  3. (3) Syntax highlighting
  4. (4) Project forking
Answer : (3) Syntax highlighting

Explanation Question 13

(1) Synchronisation -- It is very much required where multiple developers are continuously working on /changing the source code. A user, working on a set of files, updates or syncs their working copy with changes made, and checked into the repository, by other users. Source Code Management Software is a single, central repository on which clients synchronize, each peer's working copy of the codebase.
Below is the commonly used tems:
Commit: 
A commit (checkin) is the process of writing or merging the changes made in the working local copy back of user to the repository.
Conflict:
A conflict occurs when different developers make changes to the same file, and the VCS is unable to reconcile the changes. A developer must rectify the conflict by combining the changes, or by picking one change in favour of the other.
Update:
An sync/update merges changes made in the central repository (by other developer) into the local working copy.

(2) Versioning and Revision history:
Version Control Software VCS is also referred as SCM (Source Code Management) tools or RCS (Revision Control System).
Version control is a way to keep a track of the changes in the code so that if something goes wrong, we can make comparisons in different code versions and revert to any previous version that we want.

(4) Project forking
Branch:  A set of files under version control may be branched or forked at a point in time so that, from that time forward, two copies of those files may develop at different speeds or in different ways independently of each other.

(3) Syntax highlighting is not typically provided by the VCS. As VCS only maintains the version of project as document or file and the different braches of the project.

Some examples of VCS are listed below:
1) Git - Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.
2) CVS - (Concurrent Versions System)
3) Apache Subversion
4) Mercurial is a distributed revision-control tool which is written in python and intended for software developers.

Previous Next
UGC NET CS 2018 July - II Question 12 UGC NET CS 2018 July - II Question 14

UGC NET Computer Science July 2018 – II Question 12

Question 12
12. Match the following in Software Engineering :

List - I List - II
(a) Product Complexity (i) Software Requirements Definition
(b) Structured System Analysis (ii) Software Design
(c) Coupling and Cohesion (iii) Validation Technique
(d) Symbolic Execution (iv) Software Cost Estimation

Code :
(a) (b) (c) (d)
(1) (ii) (iii) (iv) (i)
(2) (iii) (i) (iv) (ii)
(3) (iv) (i) (ii) (iii)
(4) (iii) (iv) (i) (ii)

Options:
  1. (1)
  2. (2)
  3. (3)
  4. (4)
Answer: (3)
  1. Product Complexity → Software cost estimation.
    Software cost estimation must be done more diligently throughout the project life cycle so that in the future there are fewer surprises and unforeseen delays in the release of a product.
  2. Structured System Analysis → Software Requirements Definition
  3. Coupling and Cohesion are used in software design. Cohesion measures the strength of relationships between pieces of functionality within a given module while coupling measures inter-dependency between modules.
  4. Symbolic Execution → Validation Technique
Reference : Differentiate between Coupling and Cohesion

PreviousNext
UGC NET CS 2018 July - II Question 11UGC NET CS 2018 July - II Question 13

UGC NET Computer Science July 2018 – II Question 11

Question 11
Assume the following regarding the development of a software system P :

- Estimated lines of code of P : 33, 480 LOC
- Average productivity for P : 620 LOC per person-month
- Number of software developers : 6
- Average salary of a software developer : ` 50,000 per month

If E, D and C are the estimated development effort (in person-months), estimated development time (in months), and estimated development cost (in ` Lac) respectively, then (E, D, C) =_________.

Options:
  1. (1) (48, 8, 24)
  2. (2) (54, 9, 27)
  3. (3) (60, 10, 30)
  4. (4) (42, 7, 21)
Answer : (2) (54, 9, 27)

Explanation Question 11

Given:
Estimated lines of code(LOC) of P = 33, 480 LOC
Average productivity for P = 620 LOC per person-month
Number of software developers = 6
Average salary of a software developer = 50,000 per month

Solution:
If the average productivity for P = 620 LOC per person-month = one person writes 620 LOC per month

E (Estimated development effort (in person-months)) = Estimated lines of code / Average productivity for P = 33480 (LOC) / 620 (LOC per person months)= 54 person months

D(Estimated development time (in months)) = No of developers required to complete a project in a month/No of available developers= 54/6 (since 6 developers are there)= 9 months

C(Estimated development cost (in ` Lac)) = Average salary 50,000 paid to each 6 developers for 9 months = 50000 x 6 x 9 = 27 lacs

That forms (E, D, C) = (54,9,27)                                 

So, Option (2) is correct answer.

PreviousNext
UGC NET CS 2018 July - II Question 10UGC NET CS 2018 July - II Question 12

UGC NET CS 2018 July – II Question 10

Question 10
10. Consider the matrix  M=
2 0 0
0 1 0
0 1 1

representing a set of planar (2D) geometric transformations in homogeneous coordinates. Which of the following statements about the matrix M is True ?
  1. (1) M represents first, a scaling of vector (2, 1) followed by
    translation of vector (1, 1)
  2. (2) M represents first, a translation of vector (1, 1) followed by
    scaling of vector (2, 1)
  3. (3) M represents first, a scaling of vector (3, 1) followed by
    shearing of parameters (−1, 1)
  4. (4) M represents first, a shearing of parameters (−1, 1) followed by
    scaling of vector (3, 1)
Answer: (2) M represents first, a translation of vector (1, 1) followed by scaling of vector (2, 1)

PreviousNext
UGC NET CS 2018 July - II Question 9UGC NET CS 2018 July - II Question 11

UGC NET Computer Science July 2018 - II | Question 9

Question 9
9. Which of the following statements is/are True regarding the solution to the visibility problem in 3D graphics ?
S1 : The Painter’s algorithm sorts polygons by depth and then paints (scan - converts) each Polygon on to the screen starting with the most nearest polygon.
S2 : Backface Culling refers to eliminating geometry with backfacing normals.
Code :
  1. (1) S1 only
  2. (2) S2 only
  3. (3) Both S1 and S2
  4. (4) Neither S1 nor S2
Answer : (2) S2 only
  • Statement S1 is False.
    The ‘painter's algorithm’ arranges all the polygons in a view by their depth and then paints them in this order, extreme to closest. It will paint over the existing parts that are usually not visible hence solving the visibility issue at the cost of having painted invisible areas of distant objects.
  • Statement S2 is True
    Backface culling is an important part of how a 3D engine performs visibility checks. Its purpose is to detect polygons that are invisible in a particular scene - that is, polygons that face away from the viewer. Detecting back-facing polygons allows us to eliminate them from an engine's rendering pipeline at an early stage, thus reducing the amount of computation and memory traffic. There are various ways to detect whether a polygon faces towards or away from the viewer, and each method has its own level of complexity and accuracy.
Statement S2 only true statement.

So, Option (2) is correct answer.

Reference : Painter’s Algorithm

Reference 1 : Painter’s Algorithm

Reference 2 : A Compact Method for Backface Culling



PreviousNext
UGC NET CS 2018 July - II Question 8UGC NET CS 2018 July - II Question 10

UGC NET Computer Science July 2018 - II | Question 8

Question 8
A graphic display system has a frame buffer that is 640 pixels wide, 480 pixels high and 1 bit of color depth. If the access time for each pixel on the average is 200 nanoseconds, then the refresh rate of this frame buffer is approximately :
  1. (1) 16 frames per second
  2. (2) 19 frames per second
  3. (3) 21 frames per second
  4. (4) 23 frames per second
Answer : (1) 16 frames per second
Explanation Question 8

Given Values:
Frame buffer width is 640 pixels = horizontal line on screen
Frame buffer height is 480 pixels = vertical line on screen
Color depth is 1 bit

Solution:
Framebuffer is the size of the maximum image that can be displayed.
Screen forms a Matrix of pixels with width of 640 and height of 480.

No of total pixels in the frame buffer = (width  x height)= 640 x 480 px = 307200
Here, color depth is 1 bit.
Memory required by frame buffer = Memory required for total pixel =
Total pixels in the frame buffer x (Color depth) = 307200 x 1

If access time for each pixel on the average is 200 nanoseconds
Time requires to refresh the "whole screen" or "frame buffer" = Memory required by frame buffer x 200 ns = 61440000 nano second = 61440000 x 10−9 second

Then, refresh rate of frame buffer =
number of frame changes per second = 1 / 61440000 x 10−9 second = 100,00,00,000 / 61440000 = 100,000 / 6144 = 16.2760 = 16 (Approximately)

So, Option (1) is correct answer.

What is color depth?
Color depth, also known as bit depth, is either the number of bits used to indicate the color of a single pixel, in a bitmapped image or video framebuffer, or the number of bits used for each color component of a single pixel.
Reference: Color depth

Here Color depth is 1 bit. bit can either depict 0 or 1, i.e., the two colors used for a binary image are black and white. Image with 1 bit color depth is called 1-bit monochrome.

UGC NET Computer Science July 2018 - II | Question 7

Question 7
7. Which of the following statements is/are True ?
P : C programming language has a weak type system with static types.
Q : Java programming language has a strong type system with static types.
Code :
  1. (1) P only
  2. (2) Q only
  3. (3) Both P and Q
  4. (4) Neither P nor Q
Answer : (3) Both P and Q
  • Static Typing
    Essentially, static typing means that variable types are checked at “compile-time”, or before the code is executed.
  • Statement P is True.
    C programming language has a weak type system with static types because it lets you define object types as structures, but it doesn’t do much to enforce or remember them. C automatically convert between many types. C++ and Objective-C go further with the definitions but still don’t enforce the resulting types.
  • Statement Q is True.
    Java programming language has a strong type system with static types because Java forces you to define all types and checks them with a virtual machine.

Example of weak static languages: Weak Static Languages: C, C++ And Objective-C

Find here an example to understand strong static language: Strong Static Languages: Java

Both P and Q statements are true.

So, Option (1) is correct answer.

Reference : Understanding Types; Static vs Dynamic, & Strong vs Weak.


PreviousNext
UGC-NET CS 2018 July - II Question 6UGC NET CS 2018 July - II Question 8

UGC NET Computer Science July 2018 - II | Question 6

Question 6
6. In Java, which of the following statements is/are True ?
S1 : The ‘final’ keyword applied to a class definition prevents the class from being extended through derivation.
S2 : A class can only inherit one class but can implement multiple interfaces.
S3 : Java permits a class to replace the implementation of a method that it has inherited. It is called method overloading.
Code :
  1. (1) S1 and S2 only
  2. (2) S1 and S3 only
  3. (3) S2 and S3 only
  4. (4) All of S1, S2 and S3
Answer : (1) S1 and S2 only
Explanation Question 6

  • Statement S1 is True → Final classes Prevent inheritance. So, final classes cannot be extended or inherited in java.
  • Statement S2 is True → A class can only inherit/extend one class but can implement multiple interfaces.
  • Statement S3 is False → Java permits a class to replace the implementation of a method that it has inherited. It is called method overriding.

Statements S1 and S2 are True statements

So, Option (1) is correct answer.

PreviousNext
UGC-NET CS 2018 July - II Question 5UGC NET CS 2018 July - II Question 7

UGC NET Computer Science July 2018 - II | Question 4

Question 4
4. What is the output of the following ‘C’ program ?
(Assuming little - endian representation of multi-byte data in which Least Significant Byte (LSB) is stored at the lowest memory address.)
#include <stdio.h>
#include <stdlib.h>
/* Assume short int occupies two bytes of storage */
int main ( )
{
         union saving
         {
         short int one;
         char two[2];
         };
         union saving m;
         m.two [0] = 5;
         m.two [1] = 2;
         printf(’’%d, %d, %d\n”, m.two [0], m.two [1], m.one);
}/* end of main */

Options:
  1. (1) 5, 2, 1282
  2. (2) 5, 2, 52
  3. (3) 5, 2, 25
  4. (4) 5, 2, 517
Answer : (4) 5, 2, 517


Explanation Question 4

A union is a special data type available in C that allows to store different data types in the same memory location. You can define a union with many members, but only one member can contain a value at any given time. Unions provide an efficient way of using the same memory location for multiple-purpose.


PreviousNext
UGC-NET CS 2018 July - II Question 3UGC NET CS 2018 July - II Question 5

UGC NET Computer Science July 2018 - II | Question 5

Question 5
5. Given below are three implementations of the swap( ) function in C++ :
(a) (b) (c)
void swap(int a, int b) {
   int temp;
   temp = a;
   a = b;
   b = temp;
}

int main()
{
  int p = 0, q = 1;
  swap(p, q);
}
void swap(int &a, int &b) {
   int temp;
   temp = a;
   a = b;
   b = temp;
}

int main()
{
 int p = 0, q = 1;
 swap (p, q);
}
void swap(int *a, int *b) {
   int * temp;
   temp = a;
   a = b;
   b = temp;
}

int main()
{
 int p = 0, q = 1;
 swap (&p, &q);
}

Which of these would actually swap the contents of the two integer variables p and q ?
  1. (1) (a) only
  2. (2) (b) only
  3. (3) (c) only
  4. (4) (b) and (c) only
Answer : (2) (b) only
Explanation Question 5

  • Implementation (a) performs the swap on the local variables. So, the original variables are not changed.
  • Implementation (b) swaps the the memory location of a and b (to which they are pointing to) inside swap(), hence p and q also get swapped in main(). Swap() function is accepting the alias of the variable (int &a) - it will evaluate parameter as int &a=p;. To swap values implementation (b) uses pass by reference without pointers.
  • Implementation (c) is incorrect because inside swap function definition there is incorrect assignment of values at the addresses of a and b.

Hence, implementation (b) reflects the swapped value to the passed variable.

So, option (2) is right answer.

Function implementation to swap values using pass by reference without pointer:
void swap(int &n1, int &n2) {
    int temp;
    temp = n1;
    n1 = n2;
    n2 = temp;
}


Function implementation to swap values with pass by reference using pointers:
void swap(int* n1, int* n2) {
    int temp;
    temp = *n1;
    *n1 = *n2;
    *n2 = temp;
}


Reference : Example 1: Passing by reference without pointers


PreviousNext
UGC-NET CS 2018 July - II Question 4UGC NET CS 2018 July - II Question 6

Tuesday 26 March 2019

UGC NET Computer Science July 2018 - II | Question 3

Question 3
3. What is the output of the following JAVA program ?
class simple
{
     public static void main(String[ ] args)
    {
         simple obj = new simple( );
         obj.start( );
    } 
   void start( ){
         long [ ] P= {3, 4, 5};
         long [ ] Q= method (P);
         System.out.print (P[0] + P[1] + P[2]+”:”);
         System.out.print (Q[0] + Q[1] + Q[2]);
   }
   long [ ] method (long [ ] R)
         {
         R [1]=7;
         return R;
   }
} //end of class

Options:
  1. (1) 12 : 15
  2. (2) 15 : 12
  3. (3) 12 : 12
  4. (4) 15 : 15
Answer : (4) 15 : 15
Explanation Question 3

long [] Q will contains the updated array [3,7,5] returned by the method(P) and the value passed to function as array. So, modification to array reflected to the passed array P.

Actually arrays are passed as reference. So, whatever changes you make in R, it actually gets reflected in P.

Hence both the arrays will display sum=3+7+5=15. So, prints 15:15   

PreviousNext
UGC-NET CS 2018 July - II Question 2UGC NET CS 2018 July - II Question 4

Friday 22 March 2019

UGC NET Computer Science July 2018 - II | Question 2

Question 2

Consider the JavaScript Code :
  var y = "12" ;
  function f( ) {
      var y = "6" ;
      alert (this.y) ;
      function g( ) { alert (y) ; }
      g( );
  }
  f( );
If M is the number of alert dialog boxes generated by this JavaScript code and D1, D2, ....,DM represents the content displayed in each of the M dialog boxes, then :

Options:
  1. (1) M=3;  D1 displays ”12”;  D2 displays ”6”;  D3 displays ”12”.
  2. (2) M=3;  D1 displays ”6”;  D2 displays ”12”;  D3 displays ”6”.
  3. (3) M=2;  D1 displays ”6”;  D2 displays ”12”.
  4. (4) M=2;  D1 displays ”12”;  D2 displays ”6”.
Answer : (4) M=2; D1 displays ”12”; D2 displays ”6”.

Explanation Question 2

The JavaScript this keyword is used within any function scope or the global scope, and in each scope it receives a different value. The value of this inside a function, effectively depends on the object which called it.

Solved Question-2 NTA UGC NET Computer Science July 2018 - Paper II, Java Script

PreviousNext
UGC NET CS 2018 July - II Question 1UGC NET CS 2018 July - II Question 3

UGC NET Computer Science July 2018 - II | Question 1

Question 1

The definitions in an XML document are said to be __________ when the tagging system and definitions in the DTD are all in compliance.
  1. (1) well-formed
  2. (2) reasonable
  3. (3) valid
  4. (4) logical
Answer : (3) valid

Explanation Question 1

An XML document with correct syntax is called "Well Formed".
An XML document validated against a DTD is both "Well Formed" and "Valid".

XML stands for eXtensible Markup Language.
DTD is a Document Type Definition.

Here is the example of External DTD Declaration for student details.

The XML file definition must contain a reference to the "student.dtd" file:

<?xml version="1.0"?>
<!DOCTYPE student SYSTEM "student.dtd">
<student>
  <firstname>Raj</firstname>
  <lastname>Jani</lastname>
  <mobileno>0123xxxx0123</mobileno>
  <city>Ahmedabad</city>
</student>

Here is the file "student.dtd", which contains the DTD:

<!ELEMENT student (firstname,lastname,mobileno,city)>
<!ELEMENT firstname (#PCDATA)>
<!ELEMENT lastname (#PCDATA)>
<!ELEMENT mobileno (#PCDATA)>
<!ELEMENT city (#PCDATA)>

PreviousNext
NTA UGC-NET CS 2018 July - Paper IIUGC NET CS 2018 July - II Question 2

UGC NET Computer Science December 2019 | Question 16

Question 16 In a certain coding language. 'AEIOU' is written as 'TNHDZ'. Using the same coding language. 'BFJPV' wil...

Popular Posts