Ads

Pages

Showing posts with label CS and IT. Show all posts
Showing posts with label CS and IT. Show all posts

Friday, October 28, 2011

CS201 Assignment No. 1 Fall 2011 solution

Assignment No. 01

Semester: Fall 2011

CS201: Introduction to Programming Total Marks: 20

Due Date:02/11/2011

Problem Statement: Virtual Restaurant

You are required to write a program for BILLING SYSTEM of a virtual restaurant. The basic idea is that by entering the meal price, your billing system will calculate the Sales Tax, Total amount and Complement offer upon that meal. The program will process the billing of undetermined number for customers. At the end, program will show sum of total amount of all the customers.

Detailed Description:

Billing System should work as under:

> You are required to take meal price as input from user.

> After getting this input, program will calculate the sales tax on it as given below:

Meal Price Sales Tax applicable

Less than or equal to 1000 No sales Tax on it.

Greater than 1000 and less than or equal to 2000 1% of meal price.

Greater than 2000 2% of meal price.

> After calculating the sales tax, program will calculate and display the total amount of the meal according to given formula:

Total Amount = Meal_Price + Sales_Tax

> Now, program will prompt to serve the complement sweet dish to customer on the basis of total amount as given below:

Total Amount Sweet Dishes

Less than 1000 Candies

Greater than or equal to 1000 and less than 2000 Sweet Bread

Greater than or equal to 2000 and less than 3000 Pudding

Greater than or equal to 3000 and less than 4000 Cake

Other amounts Trifle

> After displaying the information of one customer, the program should ask the user if he/she again wants to process the bill of another customer. The user will be given two options. If user selects "Y or y", the program will start the processing of another customer. If user selects "N or n", the billing system exits.

> Before exiting from billing system, this program should display the total number of customers it processed, and sum of total amount of all the customers.

:::::::

You are required to write a program for BILLING SYSTEM of a virtual restaurant. The basic idea is that by entering the meal price, your billing system will calculate the Sales Tax, Total amount and Complement offer upon that meal.

#include

#include

int main()

{

int price;

cout << "Please enter meal price? ";

cin >> price;

float saleTax;

if(price<=100)

{

saleTax = 0.0 * price;

}

else if(price <= 200)

{

saleTax = 0.1 * price;

}

else

{

saleTax = 0.2 * price;

}

int totalAmount;

totalAmount = price + saleTax;

cout << "The total price of Meal is = " << totalAmount << endl;

getch();

}

CS507 Assignment No. 1 Fall 2011 Solution


Assignment No. 01

SEMESTER Fall 2011

CS507- Information Systems

Total Marks: 10

Due Date: 31/10/2011

Q#1: A Shoe manufacturing company wants to transfer its manual working system into computerized based information system. Suppose you are in the design team who is developing a technology based information system.

What factors would you consider while developing a new system? Mention at least five factors. [5 marks]

Q#2: Given diagram belongs to a certain system. Identify that the diagram belongs to closed loop system or open loop system? Give three valid reasons to support your answer. [ 2+3 marks]


Solution:



Solution Q 1.

Information Systems


In modern age, there has been felt a growing need for the use of information being in the design team I will consider the following five important factors:

· Transforming Industrial Economies

· Transformed Business Enterprise

· Emerging Digital Firms

· Emerging Global Economies

· Effective and efficient utilization of resources


Emerging Global Economies
High level of foreign trade has resulted in imports and exports which require inter linkage for smooth coordination. Core business functions (manufacturing, finance and customer support) have been distributed in different countries.


Coordination
Transforming Industrial Economies
Industrial economies have started merging as knowledge-and-information-based economies. Manufacturing activities being shifted to low wage countries. More opportunities are available in education, health care, banks, insurance firms and law firms. More knowledge and information intense products are being created. Higher commitment expected from customer e.g. overnight package delivery, worldwide reservation systems.


Transformed Business Enterprise
The structure of business enterprise have also changed, initially the organizations used to be Hierarchical, Centralized, Structured following a Fixed Set of SOP’s. However, now the organizations are moving towards more Flatter, Decentralized and Flexible structures. Information Technology makes it convenient and efficient to promote this new culture.


Emerging Digital Firms
Firms where all significant business process and relationships with customers and suppliers and employees are digitally enabled and key corporate assets are managed through digital firms. This results in rapid response with more flexibility to survive and getting more global.


Effective and efficient utilization of resources
Effectiveness and efficient usage of resources has become a dire need of today’s organization and it cannot be ignored


Solution Q 2.
This system is a closed system because

· Input is manipulated in a controlled mechanism

· It is not connected with the environment

· Neither environment exerts any influence on the system nor does system influence the environment

Friday, June 3, 2011

IT430 Assignment No. 3 solution

Please note that Assignment No. 3 of IT430 has been uploaded. The due date to submit solutions is 06-06-2011 (06-June-2011). All the instructions for solving assignment are there in assignment file. Please make sure, you read the instructions before attempting assignment and upload solutions before due date.

Assignment Question:

Question# 1 (5)

a) In minting stage of E-cash payment system, what mechanism is used to make the serial number (generated by client’s cyber wallet) blind? (2)

b) Assume that you want to buy a low cost item like shoes, wallet etc, what payment system do you suggest for this transaction and why? (3)

Question# 2 (5)

Suppose you want to buy an apple iphone from an online shopping site through E-cash payment system. What steps would be followed to make this transaction?

Solution:

solution Question 1
a) At this stage the bank knows as to who amongst its different account holders or clients is requesting for the bank’s signatures on the serial no., but it does not know the serial no. it is signing due to the blinding factor “r”.

b) Here in Pakistan, people are not use to of plastic money, specially the small vendors. if i am buying a low cost product than i will pay through cash to avoid long procedure of bank.

This purchase will take the following steps.........

E-Cash & the Web

Merchant Software
Merchant Client Software
Wallet Client
Wallet Web
Browser
Web Server
wallet Starts
1.Select Order
2. Merchant
3. Payment Request (Order)
4. Payment (coins, order)
5. Deposit coins
6. Accepted
7. Receipt
8.Send goods
9.Goods/Acknowledgement

Thursday, May 12, 2011

Today’s paper of CS-507


Objective = 15

Subjective =8

Situation in which Spiral Model should be used? (5 Marks)

A newly created organization will face unstructured problems. Why or why not. Justify? (5 Marks)

Documents of the software developed step by step procedure. (3 Marks)

What are the factors manufacturing information system included in manufacturing? (3 Marks)

What is the logic system of the organization? (2 Marks)

What does mean of this phrase “The investment in IT is costly and inflexible?” (2 Marks)

Saturday, April 30, 2011

CS301 Assignment # 3 Solution

CS301
Assignment # 3
Solution
 
Question

Consider a binary search tree (BST) that is initially empty. Draw the tree that will result if the following numbers are inserted in the order given below:

13, 3,1,2,4,12,10,5,8,7,6,9,11,14,15,18

 
After making a BST perform the following operations on it.

a) Pre order Traversal

b) Inorder Traversal

c) Postorder Traversal

Solution:

a) Pre Order Traversal

13, 3,1,2,4,12,10,5,8,7,6,9,11,14,15,18

b) Inorder Traversal

1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,18

c) Postorder Traversal

2,1,6,7,9,8,5,11,10,12,4,3,18,15,14,13

CS201 Introduction to Programming Solution

#include
#include
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]
{
temp=ary[n];
ary[n]=ary[m];
ary[m]=temp;
}
}

}
//Show arranged array in decending order
cout<<"Sorted Values from Both the Matrices are: "<
for(int n=0;n<18;n++)
{
cout<
}
getch();
}

Wednesday, April 27, 2011

CS610 Assignment No. 2

Q1. Leased line connections are mostly used in our homes and offices. Give a real time example of leased lines and also describe any four benefits of leased line.


Q2. How default routes are important in routing? In which type of network design default routes are more appropriate to implement. Support your answer with routing examples.

Sunday, April 24, 2011

Cs101 Assignment 02 Solution

Answers

Question No.1 (Marks = 10)

a) How many combinations of bits are exist when we make a truth table of 9 inputs?

2n are the total combinations of bits in Truth table, where n is number of variables, so

29=512

512 bits will there

b) Prepare a truth table for the following I = (w + x) Ã… (y . z) where w, x, y and z are four binary inputs in the truth table.

Note :(Ã… symbol represent XOR gate)

Solution:

Remember in XOR, output will high only if only all inputs are mismatch to each others.

Inputs

Output

W

X

Y

Z

w+x

y.z

(w + x) Ã… (y . z)

0

0

0

0

0

0

0

0

0

0

1

0

0

0

0

0

1

0

0

0

0

0

0

1

1

0

1

1

0

1

0

0

1

0

1

0

1

0

1

1

0

1

0

1

1

0

1

0

1

0

1

1

1

1

1

0

1

0

0

0

1

0

1

1

0

0

1

1

0

1

1

0

1

0

1

0

1

1

0

1

1

1

1

0

1

1

0

0

0

0

0

1

1

0

1

1

0

1

1

1

1

0

1

0

1

1

1

1

1

1

1

0

Question No.2 Write any three features and two limitations of each one in the given format

Features: (3 Marks)

Sr.No. Word Processor Spread Sheet

1. Good Formatting Hand with Good Mathematical Hand

Integrate technology

2. Real word 2d drawing Good Drawing, Flow chart

Features of Spell and Grammatical error and charts.

checking

3. Direct mail attachment and Data recovery Options Data recovery, AutoSave and

And much more much more

Limitations:

Sr.No. Word Processor Spread Sheet

1. Calculation of Functions and relationship Limited Format styles w.r.t

MS word

Up gradation is very costly.

2 3D drawing not sported. Animations and special

Effects not present