Information System And Design

Lecture 11- Project Scheduling & Milestones.

Lecture 10- Software Configuration Management

Lecture 9- Risk Management, Risk Categories

Lecture 8.4 – Basic COCOMO Model, Intermediate Model, Detailed COCOMO Model

Lecture 8.3 – Algorithmic Strategy For Cost Effort Estimation

Lecture 8.2 – Delphi Estimation Strategy For Cost Effort

Lecture 8.1 – Analogy Estimation Strategy For Cost Effort Estimation

Lecture 7- Function Point Based FP Based Analysis

Lecture 6 – Software Metric Measurements

Lecture 5 – Project Planning Methods

Lecture 4 – Blue Prints Of Sanjog Model Study

Lecture 3- Sanjog Model Study

Lecture 2- Components & Models Of Information System.

Lecture 1 – Information System Design Basics.

 

Advertisements

Programming Practice In C Language

Que1.

WAP in C Language to print an input string in reverse order.

Code:-

#include <stdio.h>
#include <string.h>
int main()
{
  char str[20];
  int l,i,count=0;
  printf(” Enter Any  Character String “);
  scanf (” %[^\n]”,str);
  printf(“Input String Is: %s “, str);
  printf( “\nReverse String Is: “);
  /* For Reverse String*/
  for (i=0; str[i] != 0 ;i++)
  {
    count++;
  }
  for (i=count;i>=0;i–)
  {
    printf(“%c”, str[i]);
  }
}

Output:

1.1


Que2.

WAP to replace all characters with another character, take the string, character to replace and the character to substitute from the user. e.g. string = ”Hello World”, character to replace = ’o’, replacing character = ’X’, final string = ”HellX WXrld”.

Code:-

#include <stdio.h>
#include <string.h>
int main()
{
  char str[20];
  int counter;
  printf(” Enter Any  Character String “);
  scanf(“%[^/n]”,str);
  printf(“Input String Is: %s”,str);
while(str[counter]!=’\0′)
{
  {
    if ( str[counter] == ‘o’)
    str[counter] = ‘X’;
     }
     counter++;
}
printf(“Replaced String is %s”, str);
return 0;
}

Output:-

1.2


Que.3

 WAP to remove a character from the entire string. e.g. if string is “how are you”, and character ’o’ is removed, final string will be ”hw are yu”.

Code:-

#include <stdio.h>
#include <string.h>
int main()
{
  char str[20];
  int counter=0;
  printf(” Enter Any Character String “);
  scanf(“%[^/n]”,str);
  printf(“Input String Is: %s\n”,str);
for (counter=0;str[counter]!= ‘\0’; counter++)
{if (str[counter]==’o’)
continue;
else
printf(“%c”,str[counter]);
}
return 0;
}
Output:-

1.3


Que.4

 WAP to take an integer from the user and generate all permutations.

Code:-

#include <stdio.h>
#include <string.h> /* Using Library Function Strings*/
void swap(char *x, char *y) /* Swapping The Letters */
{
    char temp;
    temp = *x;
    *x = *y;
    *y = temp;
}
void permute(char *a, int l, int r) /* Permutation Logic*/
{
   int i;
   if (l == r)
     printf(“%s \n”, a);
   else
   {
       for (i = l; i <= r; i++)
       {
          swap((a+l), (a+i));
          permute(a, l+1, r);
          swap((a+l), (a+i)); /* backtracking */
       }
   }
}
int main()
{
    char str[] = “AB C”;
    int n = strlen(str);
    permute(str, 0, n-1);
    return 0;
}
Output:
2.2

Que:5 WAP  that takes a string from user and prints out if the string is palindrome or not.  Examples of palindrome are ”1213121”,”hannah”.  Palindromes are strings with a property that they read the same forwards and backward.

Code:-

#include<stdio.h>
#include<string.h>

int main()
{
int i,len,flag=0;
char *str;

printf(“\n Enter A String “);
scanf(“%c”, &str);
len=strlen(str);

for(i=0;i<len;i++)
{
if(str[i]==str[len-i-1])
flag=flag+1;
}

if (flag==len){
printf(“\n String is palindrome”); }
else {
printf(“\n String is not palindrome”); }
return 0;

}

3.1


Que6:

Randomly generate  an array of 1000 elements, each element has values from 0 to 100 (0 and 100 inclusive).  You need to write following: a function “float find mean(int* input arrays,  int n)” that takes the array as input and returns mean of all the elements in the array.

Code:-

#include<stdio.h>
#include<stdlib.h> /* For rand() Function */
int main()
{
  int i,r[1000]; /* The Array Of 1000 Elements*/
  float mean;
  int sum=0;
  for(i=0; i<1000; i++)
  {
    r[i] = rand()%101;   /* Choosing 1000 Random Numbers, Under Range Of 0 to 100 */
    sum=sum+r[i];        /* Sum of All Random Numbers */
  }
   printf(” \n Sum Is: %d”,sum);
  mean=sum/1000;  /*  Mean Of Random Numbers */
  printf(” \n Mean Of Randomly Generate Array Is: %f”,mean);

Output:-

4.1


Que7:

Randomly generate  an array of 1000 elements, each element has values from 0 to 100 (0 and 100 inclusive).  You need to write following:

a function  “float find median(int* input array,  int n)” that takes the array as input and returns median  of all the elements  in the array.   For this task  you may need to sort the array.

Code:-

#include<stdio.h>
#include<stdlib.h> /* For rand() Function */
int main()
{
  int i,j,r[1000]; /* The Array Of 1000 Elements*/
  float median;
  int sum=0;
  for(i=0; i<1000; i++)
    r[i] = rand()%101;   /* Choosing 1000 Random Numbers, Under Range Of 0 to 100 */
    /* We Have To Sort The Array Now */
    for (i=0;i<1000;i++)
    {
      for(j=i+1;j<1000;j++)
      {
        if(r[i]>r[j])               /* For Example 98 > 95 */
        {
          r[i]=r[i]+r[j];        /* r[i] = 98+95 = 193   */
          r[j]=r[i]-r[j];       /* r[j] = 193-95 = 98  */
          r[i]=r[i]-r[j];      /* r[i] = 193-98= 95  */
        }
      }
    }
  /* Median is middle element in case of odd elements & if there are even elements then median is mean of two middle one elements */
 /* Here we have 1000 elements hence even elements case is here. */
median=((r[499]+r[500])/2);
printf(“Median Of Random Integers Is %f”,median);
}

Output:-

4.2.JPG


Que8:

 WAP  to multiply matrices  of size m * n and n* p.  Initialize the two matrices in the code itself. (since taking  input  from the user is time-consuming).

Code:-

#include <stdio.h>
int main()
{
  int m, n, p, q, c, d, k, sum = 0;
  int first[100][100], second[100][100], multiply[100][1004
  ];
  /* Declared Memory */
  printf(“Enter the number of rows and columns of first matrix\n”);
  scanf(“%d%d”, &m, &n);
  printf(“Enter the elements of first matrix\n”);
 /* Asking From User To Declare First Matrix Size */
  for (  c = 0 ; c < m ; c++ )
    for ( d = 0 ; d < n ; d++ )
      scanf(“%d”, &first[c][d]);
 /* For First Matrix We Feeding The Values From User */
  printf(“Enter the number of rows and columns of second matrix\n”);
  scanf(“%d%d”, &p, &q);
 /* Feeding Second Matrix Size From User */
  if ( n != p ) /* Checking Basic Matrix Multiplicationn Rule */
    printf(“Matrices with entered orders can’t be multiplied with each other.\n”);
  else
  {
    printf(“Enter the elements of second matrix\n”);
    for ( c = 0 ; c < p ; c++ )
      for ( d = 0 ; d < q ; d++ )
        scanf(“%d”, &second[c][d]);
        /* Logic For Multiplication Matrix */
    for ( c = 0 ; c < m ; c++ ){
      for ( d = 0 ; d < q ; d++ ){
        for ( k = 0 ; k < p ; k++ ){
          sum = sum + first[c][k]*second[k][d];}
        multiply[c][d] = sum;
        sum = 0;}}
    printf(“Product of entered matrices:-\n”);
    for ( c = 0 ; c < m ; c++ )
    {
      for ( d = 0 ; d < q ; d++ )
        printf(“%d\t”, multiply[c][d]);
      printf(“\n”);
  } }
  return 0;
}
Output:-

5.1.JPG



SQL Queries Practice & Solutions

Solve following queries using aggregate functions for the table.

Table: sales (orderID OrderDate OrderPrice OrderQuantity CustomerName)

0

1.Count how many orders have made a customer with customer name of Smith.

1

2.Find the number of unique customers that have ordered from the store.

2

3.Find out total no. of items ordered by all the customers.

3

4.Find out the average number of items per order.

4

5.Find out the average order quantity for all orders with order price greater than 200.

5

6.Find out what was the minimum price paid for any of the orders.

6

7.Find out the highest order price from the given sales table.

7

8.List out unique customers name only from the table.

8

9.List out the name of the customers who have given an order in the month of DECEMBER.

9

10.Find out the total amount of money spent for each of the customers.

10

11. Select all unique customers, who have spent more than 1200 in the store.

11


Now I had updated my table and inserted more values in it.

Capture


12.Select all the customers that have ordered more than 5 items in total from all their orders.

12

13.Select all customers who have spent more than 1000, after 10/01/2005.

13

14.Select orders in increasing order of order price.

14

15 Select orders in decreasing order of order price.

15


Thank You, Like, Share, Subscribe.

Important Linux Commands

Some of the important Linux commands are here to get pace up with Linux.

useradd

Basic Syntax Of Command.

useradd [options] username

  1. To add new user on Linux.
  2. Create a user with different home directory.
  3. Create a user with different user id.
  4. Create a user with different specific group id.
  5. Add a user to multiple groups.
  6. Add user login shell.

batch

Basic Syntax Of Command.

After typing the batch command, the at> prompt is displayed.

at

Basic Syntax Of Command.

at 9:30 PM Tue

  1. at executes commands at a specified time.
  2. atrm deletes jobs, identified by their job number.
  3. atq lists the user’s pending jobs, unless the user is the superuser in that case, everybody’s jobs are listed. The format of the output lines job numberdatehouryearqueue, and username.

 

banner

Basic Syntax Of Command.

 $ banner 'Hello!'
 Output Line is as:-

 #     #                                   ###
 #     #  ######  #       #        ####    ###
 #     #  #       #       #       #    #   ###
 #######  #####   #       #       #    #    #
 #     #  #       #       #       #    #
 #     #  #       #       #       #    #   ###
 #     #  ######  ######  ######   ####    ###

cat

cat stands for “catenate.”

Basic syntax of cat is :-

cat mytext.txt

It reads data from files, and outputs their contents. It is the simplest way to display the contents of a file at the command line.

  1. To Copy A Text File.
  2. Append A Text File’s Contents To Another Text File.
  3. Incorporating Standard Input Into cat Output.

cd

For change directory.

Basic Syntax:

$ cd /usr/local
:/usr/local$

  1. To change current directory to local.
  2. Move one directory to back.
  3. Move to users home directory.
  4. The cd command can be used to change into a sub directory, move back into the parent directory, move all the way back to the root directory or move to any given directory.

chmod

chmod ( Change Mode ) is used to change the permissions of files or directories.

Basic Syntax:

chmod options permission file name


chown

To change the owner of group file.

Basic Syntax:

chown [OPTION]... [OWNER][:[GROUP]] FILE...

clear

To clear the terminal screen.

Basic Syntax:

clear


cp

To copy a file and directory.

Basic Syntax:

cp [OPTION]... [-T] SOURCE DEST
cp [OPTION]... SOURCE... DIRECTORY
cp [OPTION]... -t DIRECTORY SOURCE...

cpio

copies files to and from archives.

cpio copies files from one directory tree to another.

Basic Syntax:

cpio {-o|--create} [-0acvABLV] [-C bytes] [-H format] [-M message] 
     [-O [[user@]host:]archive] [-F [[user@]host:]archive] 
     [--file=[[user@]host:]archive] [--format=format] 
     [--message=message][--null] [--reset-access-time] [--verbose] [--dot] 
     [--append] [--block-size=blocks] [--dereference] [--io-size=bytes] 
     [--rsh-command=command] [--help] [--version] < name-list [> archive]

cut

Cut command in unix is used to select sections of text from each line of files.

Basic Syntax:

$ cut -c n [filename(s)]


dc

Desk Calculator.

The desk calculator works with post-fix notation, rather like many HP Calculators. Basic arithmetic uses the standard + – / * symbols but entered after the digits.

Basic Syntax:

dc


dd

Data Duplicator.

To copy and converting data.

dd if=<source file name> of=<target file name> [Options]

 

For More Commands Watch Videos. 

Part 1

Part 2


 

100 Most Important Abbreviations Of Information & Communication Technology ( ICT )

100 Most Important Abbreviations Of  Information & Communication Technology, ICT.

To Get FREE Pdf Click Here Or Download From -> GENERAL Abbreviations 

 

                      Watch Full Lecture On Youtube:-

 

OSI Model (Open System Interconnection) Networking Model

OSI Model Stands For Open System Interconnection Model Which Is Consists Of Seven Layers.

  1. Physical layer
  2. Data Link Layer
  3. Network Layer
  4. Transport Layer
  5. Session Layer
  6. Presentation layer
  7. Application Layer

All Layers Have Their Own Functions And Responsibilities. For Getting Into Details Watch The Video Given In Link Below.

Complete OSI Model Watch Here.

 

For Getting Complete Lecture In PDF Format. Comment OSI Model On Video.