Pages

Sunday, April 17, 2011

CS402 Assignment No. 1 Announced

Theory of Automata (CS402)
Assignment No.1

Deadline
Your assignment must be uploaded before or on 18th April, 2011

Rules for Marking
It should be clear that your assignment will not get any credit if:
The assignment is submitted after due date
The assignment is copied

Objectives
Objective of this assignment is to make students able to understand the following concepts,
Recursive Definition of a language
Regular Expression
Finite Automata

Question No.1

RECURSIVE DEFINITION
a. Give recursive definition of language defined over alphabet Σ = {a, b}, having all strings STARTING WITH aa OR ENDING WITH bb
b. Give recursive definition of language defined over alphabet Σ = {a, b}, having all strings MULTIPLE OF2
c. Give recursive definition of language defined over alphabet Σ = {a, b}, having all strings NOT ENDINGwith aa or bb
d. Give recursive definition of language defined over alphabet Σ = {a, b}, NOT HAVING ab at any place.
e. Give recursive definition of ODD PALINDROME(PALINDROME WITH
ODD STRINGS ONLY) defined over alphabet Σ = {a, b}

Question No.2
REGAULAR EXPRESSIONS
Give Regular Expression for each of the following language defined over alphabet Σ = {a, b}
a. Language having all strings STARTING AND ENDING WITH ab
b. Language of strings NOT having bb OR aa at any place
c. Language of all strings NOT HAVING aab in start
d. Language of all strings NOT HAVING aab in end
e. Language of all strings HAVING count of b’s multiple of 2 [No restriction on count of a]

Question No.3
FINITE AUTOMATA
Give Finite Automata for each of the following language defined over alphabet Σ = {a, b}
a. Language having all strings with alternating a’s and b’s , some example strings are ababab… or bababa…
b. Language having all strings NOT containing aa at any place
c. Language of all strings NOT STARTING with bb
d. Language of all strings STARTING WITH bba
e. Language having all strings NOT having even no of a’s and b’s

You can view the video tutorial in file,
http://vulms.vu.edu.pk/Courses/CS402/Downloads/Assignment1.
00.zip to see how to make FA in MS Word.

Important Note:
While attempting any question always remember the following points:
Where OR is used in the description of a language it means that expressions on both sides of ‘OR’ are parts of the language.
Where NOT is used in the description of the language it means that language includes all strings except described in the ‘NOT’ condition, for example language NOT starting with a, means all strings not having in the start (you have to evaluate yourself what kinds of strings are these).

Assignment Uploading Instructions:
Upload single word file having solutions for all parts as well as chart images.
You can crop and compress images in the word file by double clicking on an image and selecting compress all images option to decrease file size before uploading it.

Mgt510 Assignment No. 1 Solution


Total Quality Management

The quality of products and services can be measured by their dimensions. Measuring the quality of services and products helps us to understand the concepts of product and service dimensions. Quality is multidimensional so, Product and service quality have a number of dimensions which determine how customer requirements are achieved.

Therefore as being TQM student it is essential for me that I consider the entire dimension that may be important to satisfy my requirements. These are as follows:

Product quality has two dimensions.
 Physical dimension measures the tangible product itself and includes such things like length, weight, and temperature etc.
 Performance dimension measures how well a product works and includes such things like speed and capacity.

Performance dimensions are more difficult to measure and obtain when compared it to physical dimensions. Like product quality, service quality also has several dimensions.

 Responsiveness refers to the reaction time of the service.
 Assurance refers to the level of certainty that a customer has concerning the quality of the service provided.
 Tangibles refer to a service's look or feel.
 Empathy being able to understand the needs of the customer as an individual and meet the special requirements of the customer
 Reliability refers to the dependability of the service providers and their ability to keep their promises.

Case no. 01
Solution:
I will recommend him/her for considering the following criteria about the quality of cell phone of two different brands available in the market:

 Support of all GSM frequencies by Cell phone providers in operation locally in the entire country
 Steady reception and signal coverage
 Enough Betray capacity, good standby timing and long talk time
 Compatibility of GSM-SIM provided by different cellular companies in the area
 Storage capacity to store call history and text data
 Attractive caller tunes and good multimedia support
 Enough extended memory that should be fixed for audio files or other type of media like pictures, video clips, games etc.
 Good camera and good picture quality if available in the phone package.
 Easy to use.
 Soft keypad.
 Support after sale service.

Case no. 02
Solution:
I will consider the following quality determinates between two bus services;
 Availability of bus stop near home.
 Number of bus stops and distance between these bus stops.
 Service frequency.
 Reliability of bus services that come regularly on schedule
 Availability of shelter and benches at the bus stops.
 Clean less of bus seats, interior and windows
 Cost affordability
 Overcrowding in buses.
 The ease of use of schedule at bus stop
 Assuring that bus service information by phone, mail, internet etc are available.
 Vehicle reliability and capability of drivers.
 Security against crimes on buses
 Cooperation of personal.
 Management of complaint
 Use of ecological vehicle.

CS615 Assignment No. 1

Software Project Management
Assignment # 01
Spring 2011
Marks: 20
Due Date Your assignment must be uploaded before or on 18th April 2011.

Uploading instructions: Please view the Assignment Submission Process document provided to you by the Virtual University for uploading assignments.
Assignment should be in .doc format.
Save your assignment with your ID (e.g. bx020200786.doc).
Assignment submission through email is highly discouraged.

Rules for Marking: It should be clear that your assignment will not get any credit if: · The assignment is submitted after due date. · The submitted assignment file is corrupted. · The assignment is copied. Note: Your answer must follow the below given specifications. You will be assigned zero marks if you do not follow these instructions. · Font style: “Times New Roman” · Font color: “Black” · Font size: “12” · Bold for heading only. ·Font in Italic is not allowed at all. · No formatting or bullets are allowed to use.

Assignment: Q.NO.1
Read the given scenario you have to analyze the situation and suggest a suitable process model. Justify your answer with suitable reasons.

Mughal brothers Pvt. Ltd. is the distributor of the Qarshi products in Pakistan. The company wants to automate different process like sale purchase and inventory systems. Previously the company has no experience of information technology. They have no idea of what will be the size, cost and duration of the project.

CyberSoft is the company which will develop this product. As the client has no idea of the product, company should get the requirements from the client then develop the product accordingly. The client also wants to involve in the system development to make sure that product should be according to his needs.

Q.NO.2
Differentiate between Software Process Vs Software Engineering.

CS201 Assignment No. 1 solution


Instructions please read the following instructions carefully before submitting assignment:

It should be clear that your assignment will not get any credit if:
§ The assignment is submitted after due date.
§ The submitted assignment does not open or file is corrupt.
§ All types of plagiarism are strictly prohibited.

Note:You have to upload only .cpp file. Assignment in any other format (extension) will not be accepted. If you will submit code in .doc (Word document) you will get zero marks.

Objective
The objective of this assignment is to provide hands on experience of using
§Basic concepts of C++ language and Programming
§Conditional statements of C language §Dealing with Data types §Function in c language
§Writing and editing a C program
§Saving a C program
§Compiling a C program
§Executing the program

Guidelines
§Code should be properly aligned and well commented.
§Follow c/c++ rules while writing variables names, function names etc
§Use only dev-C++ for this assignment.
§Use appropriate c/c++ structure i.e. if-else, switch statement etc to get inputs from user.(Marks will be deducted if inappropriate structure will be used).
Assi
Problem Statement: Rent A CAR
You are required to write a program for RENT A CAR SYSTEM. The basic idea is that user will provide customer information, Car Model, and number of days. Upon this information your program will calculate the Amount for the Car. Rent Amount will be calculated on the Basis of Type of Model he / she is going to take on Rent and of Days on Rent. There are Types of Models available “2009”, “2010” and “2011”. ForModel 2009 Minimum Rent per day is Rs. 5000/- for Model “2010” Amount is Rs. 8000/- and for “2011” Amount is Rs. 10,000/- Per Day. 

Detailed Description:
1.The program should display Please provide customer Name: Please provide Car Model.Enter ‘A’ for Model 2009. Enter ‘B’ for Model 2010. Enter ‘C’ for Model 2011. Then your program should take these inputs, 2.Depending upon the choices that user has entered, your program will further display the prompt 3.If user has entered Car Model, then your program should prompt the user to enter the Car Number and No. of Days for which car is required. 
-----------------------------------------------------------------
Model Name :
Number of Days:
-----------------------------------------------------------------
4.After getting all this information, now write a function which will calculate rental/charged amount on the basis of this information. 
To calculate rental/charged amount we will use this formula: Rental Amount = charged amount * number of days Charged amount will be different for different Car Models as described above. 
After calculating Rent Amount for Car display it on the screen.
Sample Output
Please provide customer Name: Ahsan Please provide Car Model Description. Enter ‘A’ for Model 2009. Enter ‘B’ for Model 2010. Enter ‘C’ for Model 2011 
Please provide following information:
Car No. : LWQ234
Number of day’s: 3
Final output should be like this:
-----------------------------------------------------------------
Customer Name: Ahsan
Car Model : 2009
Car No. : LWQ234
Number of days: 03
Your Rental Amount is: 15000
-----------------------------------------------------------------
Note:
Your assignment must be uploaded/submitted on or before April 18, 2011. Make it sure to submit only Cpp file of your Assignment. Assignment in notepad format or MS Word format will not be accepted.

SOLUTION:

#include
#include

double TotalPayAbleRent(int,int);
main()
{
char name[20], choice,vehicle_number[20];
int total_days,amount_of_day1,amount_of_day2,amount_of_day3,model1,model2,model3;
model1 = 2009;
model2 = 2010;
model3 = 2011;
amount_of_day1 = 5000;
amount_of_day2 = 8000;
amount_of_day3 = 10000;
cout<<"=======CODDED BY: ALIMS(for those who are not much familiar with C++)=======";
cout<<"\n"<<"provide customer name :";
cin>>name;
cout<<"Please provide Car Description";
cout<<"\n"<<"Enter 'A' for model 2009";
cout<<"\n"<<"Enter 'B' for model 2010";
cout<<"\n"<<"Enter 'C' for model 2011";
cin>>choice;
cout<<"Please enter car number :";
cin>>vehicle_number;
cout<<"Please enter number of days :" ;
cin>>total_days;


if(choice=='a')
{

cout<<"~*.~*.~*.~*.~*.~*.~*.~*.~*.~*.~*.~*.~*.~*.~*." <cout<<"Customer Name :" <cout<<"\n"<<"Car Model :" <cout<<"\n"<<"Number of days :" <cout<<"\n"<<"Your Rental Amount is :" <cout<<"\n"<<"~*.~*.~*.~*.~*.~*.~*.~*.~*.~*.~*.~*.~*.~*.~*." <}
else if(choice=='A')
{

cout<<"~*.~*.~*.~*.~*.~*.~*.~*.~*.~*.~*.~*.~*.~*.~*." <cout<<"Customer Name :" <cout<<"\n"<<"Car Model :" <cout<<"\n"<<"Number of days :" <cout<<"\n"<<"Your Rental Amount is :" <cout<<"\n"<<"~*.~*.~*.~*.~*.~*.~*.~*.~*.~*.~*.~*.~*.~*.~*." <}
else if(choice=='B')
{

cout<<"~*.~*.~*.~*.~*.~*.~*.~*.~*.~*.~*.~*.~*.~*.~*." <cout<<"Customer Name :" <cout<<"\n"<<"Car Model :" <cout<<"\n"<<"Number of days :" <cout<<"\n"<<"Your Rental Amount is :" <cout<<"\n"<<"~*.~*.~*.~*.~*.~*.~*.~*.~*.~*.~*.~*.~*.~*.~*." <}
else if(choice=='b')
{

cout<<"~*.~*.~*.~*.~*.~*.~*.~*.~*.~*.~*.~*.~*.~*.~*." <cout<<"Customer Name :" <cout<<"\n"<<"Car Model :" <cout<<"\n"<<"Number of days :" <cout<<"\n"<<"Your Rental Amount is :" <cout<<"\n"<<"~*.~*.~*.~*.~*.~*.~*.~*.~*.~*.~*.~*.~*.~*.~*." <}
else if(choice=='C')
{

cout<<"~*.~*.~*.~*.~*.~*.~*.~*.~*.~*.~*.~*.~*.~*.~*." <cout<<"Customer Name :" <cout<<"\n"<<"Car Model :" <cout<<"\n"<<"Number of days :" <cout<<"\n"<<"Your Rental Amount is :" <cout<<"\n"<<"~*.~*.~*.~*.~*.~*.~*.~*.~*.~*.~*.~*.~*.~*.~*." <}
else if(choice=='c')
{

cout<<"~*.~*.~*.~*.~*.~*.~*.~*.~*.~*.~*.~*.~*.~*.~*." <cout<<"Customer Name :" <cout<<"\n"<<"Car Model :" <cout<<"\n"<<"Number of days :" <cout<<"\n"<<"Your Rental Amount is :" <cout<<"\n"<<"~*.~*.~*.~*.~*.~*.~*.~*.~*.~*.~*.~*.~*.~*.~*." <}
else
{
cout<<"insaan ban kar sahi input do";
}

getch();
}
double TotalPayAbleRent(int rentofday,int tdays)
{
return rentofday*tdays;
}

ANOTHER SOLUTION:

#include
#include
int Rent(int d, int m);
int main()

{
int days;
char cName[15],mName[7];
char cModel;
cout<<"Please provide customer Name: ";
cin>>cName;
cout<<"\n Please provide Car Model."<cout<<"|..........................................|"<cout<<"| Enter 'A' for Model 2009. |"<cout<<"| Enter 'B' for Model 2010. |"<cout<<"| Enter 'C' for Model 2011. |"<cout<<"|..........................................|"<cin>>cModel;

cout<<"\n please provide the car Number that you want to take on Rent: ";
cin>>mName;
cout<<"\n For how many days you want take car on rent? : ";
cin>>days;
cout<<" customer information and total rent"<switch (cModel)
{
case 'A':
{
cout<<"|---------------------------------"<cout<<"| customer Name: "<cout<<"|Car Model :2009"<cout<<"|car Number :"<cout<<"|days :"<cout<<"|total Rent :"<cout<<"|---------------------------------"<}
break;
case 'B':
{
cout<<"|---------------------------------"<cout<<"| customer Name: "<cout<<"|Car Model :2010"<cout<<"|car Number :"<cout<<"|days :"<cout<<"|total Rent :"<cout<<"|---------------------------------"<}
break;
case 'C':
{
cout<<"|---------------------------------"<cout<<"| customer Name: "<cout<<"|Car Model :2011"<cout<<"|car Number :"<cout<<"|days :"<cout<<"|total Rent :"<cout<<"|---------------------------------"<}
break;
default:
{
cout<<"sorry you entered ivalid car model";
}
}

getch();

}
int Rent(int d, int m)
{
int total_rent;
total_rent=d*m;
return total_rent;
}

Another Idea Solution:

#include
#include
#include
using namespace std;
int main()
...{
char Model;

string Name;

string CarNo;

int Day, Amount, flag=0, CarMod;

cout <<"Please provide customer name: ";

cin >>Name;

cout <<"\n\nPlease provide car model description:"<
cout <<" Enter 'A' for Model 2009" <
cout <<" Enter 'B' for Model 2010" <
cout <<" Enter 'C' for Model 2011" <
cout <<"\nCar Model: ";

cin >>Model;

while (flag!=1)
{
if (Model=='A' || Model=='a')
{
Amount=5000;
CarMod=2009;
flag=1;
}
else if (Model=='B' || Model=='b')
{
Amount=8000;
CarMod=2010;
flag=1;
}
else if (Model=='C' || Model=='c')
{
Amount=10000;
CarMod=2011;
flag=1;
}
else
{
cout <<"\nPlease Enter 'A', 'B' or 'C' only" <cout <<"\nCar Model: ";
cin >>Model;
}
}
cout <<"Please provide following information:"<
cout <<"\nCar No. : ";

cin >>CarNo;

cout <<"Number of days: ";

cin >>Day;

cout <<"\n-------------------------------------------"<
cout <<"Customer Name : " <
cout <<"Car Model : " <
cout <<"Car No. : " <
cout <<"Number of days : "<
cout <<"Your rental amount is : "<
cout <<"\n-------------------------------------------";
getche();
}

Is this blog is useful for you?

Powered by Blogger.