using namespace std;
#include
#include
void match(int[],int[]);
main()
{
int array1[10];
int array2[10];
int arrayIndex=1;
cout << "\nPlease enter 10 integers for array1:\n" << endl;
while (arrayIndex <= 10)
{
cout << "Enter element "<
arrayIndex++;
}
arrayIndex=1;
cout << "\nPlease enter 10 integers for array2:\n" << endl;
while (arrayIndex <= 10)
{
cout << "Enter element "<
arrayIndex++;
}
match(array1,array2);
getche();
}
void match ( int Array1[], int Array2[])
{
int arrayMatch[10];
int arrayMatchIndex=0;
int i;
int loopRuns=0;
for ( i = 0 ; i <=9 ; i ++)
{
if (Array1[i] == Array2[i])
{
arrayMatch[arrayMatchIndex]=i;
loopRuns++;
arrayMatchIndex++;
}
}
if (loopRuns==10 )
{
cout << "\nBoth arrays are identical\n" << endl;
}
else if (loopRuns==0 )
{
cout << "\nNo element is same in both arrays\n" << endl;
}
else
{
cout << "\nBoth arrays have same elements on:\n" << endl;
for ( i = 0 ; i
cout << "Index "<
}
}
Monday, November 22, 2010
CS201 Assignment 2 Solution
Fin622 GDB No. 1 solution
Semester "Fall 2010"
"Corporate Finance (Fin622)"
This is to inform that Graded Discussion Board (GDB) will be opened according to the following schedule
Schedule
Opening Date and Time
November 22 , 2010 At 12:01 A.M. (Mid-Night)
Closing Date and Time
November 24 , 2010 At 11:59 P.M. (Mid-Night)
Topic/Area for Discussion
“Capital budgeting"
Note: The discussion question will be from the area/topic mentioned above. So start learning about the topic now.
Discussion Question
XYZ Company is one of the biggest manufacturing concerns of the country. Being the finance manager of XYZ Company, you have been assigned a task to evaluate three projects. The future cash flows from the three projects are summarized in given table.
Project A
Project B
Project C
Initial investment
45,000
70,000
50,000
Cash inflows
Year 1
20,000
20,000
30,000
Year 2
20,000
26,000
28,000
Year 3
20,000
30,000
35,000
Consider the discount factor to be 14% and that the company has sufficient funds to take projects.
Required:
I. On the basis of NPV approach, which project(s) you would select if the projects are independent and why?
II. On the basis of NPV approach, which project(s) you would select if the projects are mutually exclusive and why?
.........
FIN622 GDB No. 1 Solution
Project A
Initial Investment = 45000
Years 1 2 3
Cash Flows 20000 20000 20000
Calculation:-
NPV = -Io + CF1/(1+r)t + CF2/(1+r)t + CF3/(1+r)t
NPV = - 45000 + 20000/(1+0.14)1 + 20000/(1+0.14)2 + 20000/(1+0.14)3
NPV = -45000 + 17543.859 + 15389.350 + 13499.430
NPV = - 45000 + 46432.639
NPV = 1432.639
Project B
Initial Investment = 70000
Years 1 2 3
Cash Flows 20000 26000 30000
Calculation:-
NPV = -Io + CF1/(1+r)t + CF2/(1+r)t + CF3/(1+r)t
NPV = - 70000 + 20000/(1+0.14)1 + 26000/(1+0.14)2 + 30000/(1+0.14)3
NPV = - 70000 + 17543.859 + 20006.155 + 20249.145
NPV = - 70000 + 57800
NPV = - 12200
Project C
Initial Investment = 50000
Years 1 2 3
Cash Flows 30000 28000 35000
Calculation:-
NPV = -Io + CF1/(1+r)t + CF2/(1+r)t + CF3/(1+r)t
NPV = - 50000 + 30000/(1+0.14)1 + 28000/(1+0.14)2 + 35000/(1+0.14)3
NPV = - 50000 + 26316 + 21545 + 23624
NPV = - 50000 + 71485
NPV = 21485
1) On the basis of NPV approach, which project(s) you would select if the projects are independent and why?
Reference:
MGT201 (Page 47)
Independent: implies that the cash flows of the two investments are not linked to each other
Solution:-
If the projects are independent then I will select Project C 1st and after that I will select Project A on 2nd because both have Positive NPV.
2) On the basis of NPV approach, which project(s) you would select if the projects are mutually exclusive and why?
Reference:
MGT201 (page 47)
Mutually Exclusive: means that you can invest in ONE of the investment choices and having chosen one you cannot choose another.
Solution:-
I will Select Project C because it has positive NPV and also have greater amount Rs. 21485.
MKT630 GDB 01 Announced
Semester “FALL 2010”
International Marketing(MKT630)”
This is to inform that Graded Discussion Board (GDB) will be opened according to the following schedule
Schedule | |
Opening Date and Time | November 23rd , 2010 At 12:01 A.M. (Mid-Night) |
Closing Date and Time | November 24th , 2010 At 11:59 P.M. (Mid-Night) |
Topic/Area for Discussion
“Role of Governments in International Markets”
Sunday, November 21, 2010
CS 403 2nd idea Solution
Entity-Relationship Diagrams (ERD)
Data models are tools used in analysis to describe the data requirements and assumptions in the system from a top-down perspective. They also set the stage for the design of databases later on in the SDLC.
There are three basic elements in ER models:
1) Entities are the "things" about which we seek information.
2) Attributes are the data we collect about the entities.
3) Relationships provide the structure needed to draw information from multiple entities.
a. In an Organization each of Corporation division is of many departments.
Each of the departments has many employees to it, but each employee works for only one department. The attributes of EMPLOYEE include
NAME, ADDRESS, BIRTHDATE and the attributes of DEPARTMENT are DEPT_NO and DEPT_NAME.
Solution:
b. A university have many colleges where as each college belongs to only that university. Each college is offering many degrees where as each degree is offered by only single college in that university. One college can have many students but one student can only be registered in one college. One student can have study many courses where as many courses can be taught by many students. 5 Marks
Solution:
CS304 Idea Solution
Object Oriented Programming
Object Oriented Programming
{
Private:
char name[50];
char interface[30];
double space[30];
public:
void store detail of data();
void add();
void Search();
void Return();
void Borrow();
}
class Administrator : public Library
{
Private:
Char name[50];
Char Gender[50];
Char id[50];
Char address[50];
Public:
void Login();
void Logoff();
void search();
void Add();
void Borrow();
void return();
}
class staff : public library
{
Private:
Char name[50];
Char Gender[50];
Char id[50];
Char address[50];
Public:
void Login();
void Logoff();
void search();
void Add();
void Borrow();
void return();
}
class student : public library
{
Private:
Char name[50];
Char Gender[50];
Char id[50];
Char address[50];
Public:
void Login();
void Logoff();
void search();
void Add();
void Borrow();
void return();
}