| ||||||||||||||||||
| ||||||||||||||||||
| ||||||||||||||||||
| ||||||||||||||||||
| ||||||||||||||||||
| ||||||||||||||||||
| ||||||||||||||||||
| ||||||||||||||||||
| ||||||||||||||||||
| ||||||||||||||||||
| ||||||||||||||||||
| ||||||||||||||||||
| ||||||||||||||||||
| ||||||||||||||||||
| ||||||||||||||||||
| ||||||||||||||||||
| ||||||||||||||||||
| ||||||||||||||||||
| ||||||||||||||||||
| ||||||||||||||||||
Friday, 6 May 2011
cs401 my quiz
cs304 solution # 2
//header files
#include<iostream.h>
#include<conio.h>
// state class defination
class state
//hidden part
{ private :
char name[10];
int num_of_cities;
int population;
//interface
public
state(){}
void setname(char.name1)
{
for(int i=0;i<10;i++ )
name[i]=name1[i];
}
void setnumber(int num1)
{
num_of_cities=num1;
}
void setpop(int pop1)
{
population=pop1;
}
char* getname()
{
return name;
}
int getpop()
{
return population;
}
void input()
{
char name[10];
int num, pop;
cout<>nme;
setname(nme);
cout<>num;
setnumber(num);
cout<>pop;
setpop(pop);
}
~state(){}
};
//country class definition
class country
{
// hidden part
private:
//state type array
state ss[3];
long country_pop;
//interface
public:
country()
{country_pop=0;}
//calculation counrtry population
void cal_country_pop()
{
for(int i=0;i<3;i++)
{
cout<<"enter data about"<<"state"<<i+1<<"\n\n";
ss[i].input();
country_pop=country_pop+ss[i].getpop();
}
}
//display output
void diplay()
{
for (int i=0;i<3;i++)
{
cout<<"\nstate name\t"<<ss[i].getname();
cout<<"\nstate population\t"<<ss[i].getpop();
}
cout<<"\n\n\ntotal population of country is\t"<<country_pop;
}
~country(){}
};
main(){
//declaring country object
country abc;
//calling cal_country_pop
abc.call_country_pop();
//calling display
abc.display();
getch();
}
#include<iostream.h>
#include<conio.h>
// state class defination
class state
//hidden part
{ private :
char name[10];
int num_of_cities;
int population;
//interface
public
state(){}
void setname(char.name1)
{
for(int i=0;i<10;i++ )
name[i]=name1[i];
}
void setnumber(int num1)
{
num_of_cities=num1;
}
void setpop(int pop1)
{
population=pop1;
}
char* getname()
{
return name;
}
int getpop()
{
return population;
}
void input()
{
char name[10];
int num, pop;
cout<>nme;
setname(nme);
cout<>num;
setnumber(num);
cout<>pop;
setpop(pop);
}
~state(){}
};
//country class definition
class country
{
// hidden part
private:
//state type array
state ss[3];
long country_pop;
//interface
public:
country()
{country_pop=0;}
//calculation counrtry population
void cal_country_pop()
{
for(int i=0;i<3;i++)
{
cout<<"enter data about"<<"state"<<i+1<<"\n\n";
ss[i].input();
country_pop=country_pop+ss[i].getpop();
}
}
//display output
void diplay()
{
for (int i=0;i<3;i++)
{
cout<<"\nstate name\t"<<ss[i].getname();
cout<<"\nstate population\t"<<ss[i].getpop();
}
cout<<"\n\n\ntotal population of country is\t"<<country_pop;
}
~country(){}
};
main(){
//declaring country object
country abc;
//calling cal_country_pop
abc.call_country_pop();
//calling display
abc.display();
getch();
}
Tuesday, 3 May 2011
cs401 assignment solution 2
Question No. 1: 10 Marks
Write an Assembly language program as per following instructions and tell what will be the value of CX and BL registers at the End of your program?
Let say your Roll number is MC789207290. So you need to initialize CX with 0, and BX with the least two significant digits of your roll no. i.e. (90 in this case). After this you need to execute the following loop instructions.
Label1: inc bl
inc cx
cmp bl, 0
jnz Label1
Report your values in the BL and CX registers after the execution of the above loop with brief explanation.
Solution No. 1: 10 Marks
Two significant digits= 49 according to mc100403250
[org 0x0100]
mov cx, 0
mov bl,49
Label1: inc bl
inc cx
cmp bl, 0
jnz Label1
mov ax, 0x4c00
int 0x21
Value at the end of program CX=CF)207 in decimal) BL=00
Question No. 2: 10 Marks
Write an Assembly language program as per following instructions and tell what will be the value of BX and CX registers at the End of your program?
Again, Let say your Roll number is MC789207290. So you need to initialize BX with 90 (least two significant digits of your roll no.), and CX with 72 (the next two least significant digits of your roll no.). After this you need to execute the following three XOR instructions.
xor cx, bx
xor bx, cx
xor cx, bx
Report your values in the BX and CX registers after the execution of the above three XOR instructions with brief explanation.
Solution No. 2: 10 Marks
Second two least numbers of roll no. is 50
xor cx, bx
xor bx, cx
xor cx, bx
[org 0x0100]
mov cx,50
mov bx,32
xor cx,bx
xor bx,cx
xor cx,bx
mov ax,0x4c00
int 0x21
At the end values of registers : Cx=32 bx=50
The value registers are such because of Consecutive xor instructions
Question No. 1: 10 Marks
Write an Assembly language program as per following instructions and tell what will be the value of CX and BL registers at the End of your program?
Let say your Roll number is MC789207290. So you need to initialize CX with 0, and BX with the least two significant digits of your roll no. i.e. (90 in this case). After this you need to execute the following loop instructions.
Label1: inc bl
inc cx
cmp bl, 0
jnz Label1
Report your values in the BL and CX registers after the execution of the above loop with brief explanation.
Solution No. 1: 10 Marks
Two significant digits= 49 according to mc100403250
[org 0x0100]
mov cx, 0
mov bl,49
Label1: inc bl
inc cx
cmp bl, 0
jnz Label1
mov ax, 0x4c00
int 0x21
Value at the end of program CX=CF)207 in decimal) BL=00
Question No. 2: 10 Marks
Write an Assembly language program as per following instructions and tell what will be the value of BX and CX registers at the End of your program?
Again, Let say your Roll number is MC789207290. So you need to initialize BX with 90 (least two significant digits of your roll no.), and CX with 72 (the next two least significant digits of your roll no.). After this you need to execute the following three XOR instructions.
xor cx, bx
xor bx, cx
xor cx, bx
Report your values in the BX and CX registers after the execution of the above three XOR instructions with brief explanation.
Solution No. 2: 10 Marks
Second two least numbers of roll no. is 50
xor cx, bx
xor bx, cx
xor cx, bx
[org 0x0100]
mov cx,50
mov bx,32
xor cx,bx
xor bx,cx
xor cx,bx
mov ax,0x4c00
int 0x21
At the end values of registers : Cx=32 bx=50
The value registers are such because of Consecutive xor instructions
cs614 idea solution
Assignment No. 02
SEMESTER SPRING 2011
CS614- Data Warehousing
Please don’t copy the solution,
Please change the solution in your own words. Thanks
Total Marks: 20
Question 1: [13 marks]
In this paper [1] hierarchical de-normalization is used to optimize the performance of data warehouse design. Study the paper and prepare a summary of how the technique is used for optimization.
Answer:
De-normalization means allowing redundancy in a table, it means in de-normalization database, data and information can be duplicated. De-normalized schema avoids joins and it places all data in same place. Full table scanning and it is slower than normalization.
Hierarchical de-normalization is complex method. The dimensions (categories) are placed in hierarchical levels (Step by step categories e.g., day, week, month, year etc)
Hierarchical de-normalization uses bitmap indexes for columns that tell which value should be taken from the columns. This method joins the categories in organized order i.e. moving from highest level category to lowest level category. Every element of any category is called node. This technique is used for optimization because it gives efficient results and helps to drill down the information to the lowest level. It also reduces response times of query.
Organizations define their own Hierarchical structure according to their needs, to be used in data ware house.
Question 2: [07 marks]
Compare the results of one dimensional and multidimensional query, given in this paper [1]. Give reasons, why the response time of multidimensional queries for de-normalized schema is less than that for normalized schema. Justify your answer.
Answer:
A query is a question in form of code that is sent to a database in order to get information back from the database. It is used as the way of retrieving the information from database
Dimensions are categories e.g. Country, Province, Division, Region etc.
One dimensional query means asking the database to get single type of record by selecting 1 column at a time. Multi dimensional query means asking the database to get two or more than two types of records. A number of records required to compute the answer by selecting column at a time. In Normalized schema, Multi dimensional queries response time is Greater because multiple records are selected from the DIFFERENT TABLES OF DATABASE. In De-normalized schema, Multi dimensional queries response time is lesser because multiple records are selected from the SAME TABLE which is less time to retrieve and manipulate the values.
PSY101 GDB SOLUTION
In our society there are many misconception about psycologist , that they are mad , and who will study psycology he or she will be mad, that's why the parents don't want that their children choose this subject ..
Psychology is the scientific study of behaviours & mental process. Psychology follows systematic method of observing, describing, predicting & explaining the subject matter of case or problem.
Psychologist try to understand mental characteristics of particular individual. It may provide psychological evaluation , assessment, testing & treatment but may not prescribe medications. There are many continuing education courses for psychology on web like psychotherapy for men & women & its law & ethics. These type of CE courses are really helpful for psychologist & counselors.
cs201 assignment solution 2
#include<iostream.h>
#include<conio.h>
main()
{
int ary1[3][3],ary2[3][3],ary[18],index,temp,max;
cout<<"Please enter the Elements of First Matrix: ";
for(int n=0;n<3;n++)
{
for(int m=0;m<3;m++)
{
cin>>ary1[n][m];
}
}
cout<<"Please enter the Elements of second Matrix: ";
for(int n=0;n<3;n++)
{
for(int m=0;m<3;m++)
{
cin>>ary2[n][m];
}
}
//Copying first array into single dimenional array
index=0;
for(int n=0;n<3;n++)
{
for(int m=0;m<3;m++)
{
ary[index]=ary1[n][m];
index++;
}
}
//Copying second array into single dimenional array
index=9;
for(int n=0;n<3;n++)
{
for(int m=0;m<3;m++)
{
ary[index]=ary2[n][m];
index++;
}
}
// Here sorting the third array in which ary1 and ary2 are copped....
// This sorting method is bubble sorting method in decending order.
for(int n=0;n<18;n++)
{
for(int m=n;m<18;m++)
{
if(ary[n]<ary[m])
{
temp=ary[n];
ary[n]=ary[m];
ary[m]=temp;
}
}
}
//Show arranged array in decending order
cout<<"Sorted Values from Both the Matrices are: "<<endl;
for(int n=0;n<18;n++)
{
cout<<ary[n]<<" ";
}
getch();
}
Subscribe to:
Posts (Atom)
