php hit counter

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
cs201 assignment no 1 April 12 Spring 2011
VU Help • House Banner VU Help Virtual University Students - Assignments, Solved Papers, GDB & Exam Help Student Help Forum • Collaborative • Free Support
#1
[FONT=&quot] [/FONT]
[FONT=&quot]Problem Statement: Rent A CAR [/FONT]
[FONT=&quot] [/FONT]
[FONT=&quot]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”. For Model 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. [/FONT]
[FONT=&quot] [/FONT]
[FONT=&quot] [/FONT]
[FONT=&quot] [/FONT]
[FONT=&quot] [/FONT]
[FONT=&quot]Detailed Description:[/FONT]
[FONT=&quot] [/FONT]
[FONT=&quot]1. [/FONT][FONT=&quot]The program should display[/FONT]
[FONT=&quot] [/FONT]
[FONT=&quot]Please provide customer Name:[/FONT]
[FONT=&quot]Please provide Car Model.[/FONT]
[FONT=&quot] Enter ‘A’ for Model 2009.[/FONT]
[FONT=&quot] Enter ‘B’ for Model 2010.[/FONT]
[FONT=&quot] Enter ‘C’ for Model 2011.[/FONT]
[FONT=&quot] [/FONT]
[FONT=&quot] [/FONT]
[FONT=&quot]Then your program should take these inputs, [/FONT]
[FONT=&quot] [/FONT]
[FONT=&quot]2. [/FONT][FONT=&quot]Depending upon the choices that user has entered, your program will further display the prompt [/FONT]
[FONT=&quot] [/FONT]
[FONT=&quot]3. [/FONT][FONT=&quot]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. [/FONT]
[FONT=&quot] [/FONT]
[FONT=&quot] -----------------------------------------------------------------[/FONT]
[FONT=&quot] Model Name : [/FONT]
[FONT=&quot] Number of Days:[/FONT]
[FONT=&quot] -----------------------------------------------------------------[/FONT]
[FONT=&quot] [/FONT]
[FONT=&quot]4. [/FONT][FONT=&quot]After getting all this information, now write a function which will calculate rental/charged amount on the basis of this information. [/FONT]
[FONT=&quot] [/FONT]
[FONT=&quot] [/FONT]
[FONT=&quot] To calculate rental/charged amount we will use this formula: [/FONT]
[FONT=&quot] Rental Amount = charged amount * number of days [/FONT]
[FONT=&quot] [/FONT]
[FONT=&quot]Charged amount will be different for different Car Models as described above.[/FONT]
[FONT=&quot] [/FONT]
[FONT=&quot] [/FONT]
[FONT=&quot] [/FONT]
[FONT=&quot]After calculating Rent Amount for Car display it on the screen.[/FONT]
[FONT=&quot] [/FONT]
[FONT=&quot] [/FONT]
[FONT=&quot] [/FONT]
[FONT=&quot] [/FONT]
[FONT=&quot]Sample Output[/FONT]
[FONT=&quot] [/FONT]
[FONT=&quot] [/FONT]
[FONT=&quot] [/FONT]
[FONT=&quot]Please provide customer Name: Ahsan[/FONT]
[FONT=&quot] [/FONT]
[FONT=&quot]Please provide Car Model Description.[/FONT]
[FONT=&quot] [/FONT]
[FONT=&quot] Enter ‘A’ for Model 2009.[/FONT]
[FONT=&quot] Enter ‘B’ for Model 2010.[/FONT]
[FONT=&quot] Enter ‘C’ for Model 2011[/FONT]
[FONT=&quot] [/FONT]
[FONT=&quot] [/FONT]
[FONT=&quot] [/FONT]
[FONT=&quot] Please provide following information:[/FONT]
[FONT=&quot] [/FONT]
[FONT=&quot]Car No. : LWQ234 [/FONT]
[FONT=&quot]Number of day’s: 3[/FONT]
[FONT=&quot] [/FONT]
[FONT=&quot] [/FONT]
[FONT=&quot]Final output should be like this[/FONT][FONT=&quot]:[/FONT]
[FONT=&quot] [/FONT]
[FONT=&quot] -----------------------------------------------------------------[/FONT]
[FONT=&quot] Customer Name: Ahsan[/FONT]
[FONT=&quot] Car Model : 2009 [/FONT]
[FONT=&quot] Car No. : LWQ234[/FONT]
[FONT=&quot] Number of days: 03[/FONT]
[FONT=&quot] Your Rental Amount is: 15000 [/FONT]
[FONT=&quot] -----------------------------------------------------------------[/FONT]
[FONT=&quot] [/FONT]
[FONT=&quot] [/FONT]
[FONT=&quot]Note:[/FONT]
[FONT=&quot]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.[/FONT]
[FONT=&quot] [/FONT]


Attached Files
.doc   Spring 2011_CS201_1.doc (Size: 172 KB / Downloads: 757)
Reply
#2
plz find the code and make changes

Code:
#include <iostream.h> #include <conio.h> 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<<"~*.~*.~*.~*.~*.~*.~*.~*.~*.~*.~*.~*.~*.~*.~*." <<endl; cout<<"Customer Name :" <<name; cout<<"\n"<<"Car Model :" <<model1 ; cout<<"\n"<<"Number of days :" <<total_days; cout<<"\n"<<"Your Rental Amount is :" <<TotalPayAbleRent(amount_of_day1,total_days); cout<<"\n"<<"~*.~*.~*.~*.~*.~*.~*.~*.~*.~*.~*.~*.~*.~*.~*." <<endl; } else if(choice=='A') { cout<<"~*.~*.~*.~*.~*.~*.~*.~*.~*.~*.~*.~*.~*.~*.~*." <<endl; cout<<"Customer Name :" <<name; cout<<"\n"<<"Car Model :" <<model1 ; cout<<"\n"<<"Number of days :" <<total_days; cout<<"\n"<<"Your Rental Amount is :" <<TotalPayAbleRent(amount_of_day1,total_days); cout<<"\n"<<"~*.~*.~*.~*.~*.~*.~*.~*.~*.~*.~*.~*.~*.~*.~*." <<endl; } else if(choice=='B') { cout<<"~*.~*.~*.~*.~*.~*.~*.~*.~*.~*.~*.~*.~*.~*.~*." <<endl; cout<<"Customer Name :" <<name; cout<<"\n"<<"Car Model :" <<model2 ; cout<<"\n"<<"Number of days :" <<total_days; cout<<"\n"<<"Your Rental Amount is :" <<TotalPayAbleRent(amount_of_day2,total_days); cout<<"\n"<<"~*.~*.~*.~*.~*.~*.~*.~*.~*.~*.~*.~*.~*.~*.~*." <<endl; } else if(choice=='b') { cout<<"~*.~*.~*.~*.~*.~*.~*.~*.~*.~*.~*.~*.~*.~*.~*." <<endl; cout<<"Customer Name :" <<name; cout<<"\n"<<"Car Model :" <<model2 ; cout<<"\n"<<"Number of days :" <<total_days; cout<<"\n"<<"Your Rental Amount is :" <<TotalPayAbleRent(amount_of_day2,total_days); cout<<"\n"<<"~*.~*.~*.~*.~*.~*.~*.~*.~*.~*.~*.~*.~*.~*.~*." <<endl; } else if(choice=='C') { cout<<"~*.~*.~*.~*.~*.~*.~*.~*.~*.~*.~*.~*.~*.~*.~*." <<endl; cout<<"Customer Name :" <<name; cout<<"\n"<<"Car Model :" <<model3 ; cout<<"\n"<<"Number of days :" <<total_days; cout<<"\n"<<"Your Rental Amount is :" <<TotalPayAbleRent(amount_of_day3,total_days); cout<<"\n"<<"~*.~*.~*.~*.~*.~*.~*.~*.~*.~*.~*.~*.~*.~*.~*." <<endl; } else if(choice=='c') { cout<<"~*.~*.~*.~*.~*.~*.~*.~*.~*.~*.~*.~*.~*.~*.~*." <<endl; cout<<"Customer Name :" <<name; cout<<"\n"<<"Car Model :" <<model3 ; cout<<"\n"<<"Number of days :" <<total_days; cout<<"\n"<<"Your Rental Amount is :" <<TotalPayAbleRent(amount_of_day3,total_days); cout<<"\n"<<"~*.~*.~*.~*.~*.~*.~*.~*.~*.~*.~*.~*.~*.~*.~*." <<endl; } else { cout<<"insaan ban kar sahi input do"; } getch(); } double TotalPayAbleRent(int rentofday,int tdays) { return rentofday*tdays; }


Attached Files
.zip   solution of CS201 by .zip (Size: 757 bytes / Downloads: 424)
Reply
#3
i am using these cods but output is not display.

Code:
#include <iostream.h> main() { int days; int rent; char model; char name; char carNo; cout <<"Please provide customer name : \t"; cin >>name; cout <<"Please Provide the model discription:\n"; cout <<"\t Enter 'A' for Model 2009 :\n"; cout <<"\t Enter 'B' for Model 2010 :\n"; cout <<"\t Enter 'C' for Model 2011 :\n"; cin >>model; cout <<"Please Provide the following discription:"; cout <<"\nCarNo.\t\t"; cin >>carNo; cout << "Enter days."; cin >>days; cout <<"\nRent per day for 2009 is Rs. 5000. \n"; cout <<"Rent per day for 2010 is Rs. 8000. \n"; cout <<"Rent per day for 2009 is Rs. 10000. \n"; switch(model) { case 'A': case 'a': cout << "Customer Name \t" <<name; cout << "Car Model \t2009\n"; cout << "Car No.\t" <<carNo; cout << "No of days\n" << days; rent= amount(model*days); cout <<"Your rental amount is :\t" << rent; break; case 'B': case 'b': cout << "Customer Name \t" <<name; cout << "Car Model \t2010\n"; cout << "Car No.\t" <<carNo; cout << "No of days\n" << days; rent= (days*8000); cout <<"Your rental amount is :\t" << rent; break; case 'C': case 'c': cout << "Customer Name \t" <<name; cout << "Car Model \t2011\n"; cout << "Car No.\t" <<carNo ; cout << "No of days\n" << days; rent= (days*10000); cout <<"Your rental amount is :\t" << rent; break; defualt: cout <<"Please select only 2009,2010,2011. car models."; } system("pause"); } int amount(char m, int d){ if( m== 'A' || m== 'a') return (5000*d); else if( m== 'B' || m== 'b') return (8000*d); else if( m== 'C' || m== 'c') return (10000*d); }
error code bhi tu batao also attach .cpp file please
Reply
#4
VUHELPER.....

dear jis banday ki bani assignment aap ne upload ki hai wo mein hi hoon.. me Alims...
and by the way.. yeh tou mene virtualinspire per upload ki thi... aap ne yahan per apnay name se kar di...????
not fare....
Reply
#5
int amount(char m, int d){
if( m== 'A' || m== 'a')
return (5000*d);

else if( m== 'B' || m== 'b')
return (8000*d);

else if( m== 'C' || m== 'c')
return (10000*d);
}


cod mein mistakes hain aap ke...
yeh code apply karo
int amount(char m, int d){
if(( m== 'A') || (m== 'a'))
{
return 5000*d;
}

else if(( m== 'B') || (m== 'b'))
{
return 8000*d;
}

else if(( m== 'C') || (m== 'c'))
{
return 10000*d;
}


ohhoooo
apka tou swtich statement mein bi mistakes hainSad aap ko tou coding bilkul nahin aati
Reply
#6
This attached file is corrupted..Sad(
Reply
#7
it is not you should learn how to run a .cpp file
Reply
#8
cs201 ki assigment #3 ka solution upload kro plzzzzzzzzz
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  CS301 Assignment # 4 Due Date: 02-Feb-2016 Vuhelper 0 2,370 02-03-2016, 05:38 PM
Last Post: Vuhelper
  CS703 – Advanced Operating Systems Assignment No.3 solution January 2016 Vuhelper 0 5,958 01-23-2016, 09:58 PM
Last Post: Vuhelper
  CS601 Data Communication Assignment No. 03 Solution 23rd January 2016 Vuhelper 1 1,990 01-23-2016, 06:09 PM
Last Post: Vuhelper
  CS403 Assignment No. 03 Solution 23rd January 2016 Vuhelper 2 1,229 01-23-2016, 03:18 PM
Last Post: Vuhelper
  CS506 Web Design and Development Assignment no 3 Solution 3rd January 2016 Vuhelper 0 2,294 01-23-2016, 03:16 PM
Last Post: Vuhelper
  CS724 Software Process Improvement Assignment No 01 Solution 20th January 2016 Vuhelper 0 2,024 01-20-2016, 06:26 PM
Last Post: Vuhelper
  CS711 Software Design Assignment No 01 Solution Due Date Feb 12, 2016 Vuhelper 0 1,716 01-20-2016, 06:24 PM
Last Post: Vuhelper
  CS709 Formal Methods for Software Engineering Assignment No 01 Solution January 2016 Vuhelper 0 1,854 01-20-2016, 06:22 PM
Last Post: Vuhelper
  cs703 assignment no 3 Solution 20th January 2016 Vuhelper 0 1,753 01-20-2016, 06:20 PM
Last Post: Vuhelper
  CS704 Assignment No. 01 Solution January 2016 Vuhelper 0 4,854 01-20-2016, 06:19 PM
Last Post: Vuhelper

Forum Jump:


Users browsing this thread: 1 Guest(s)
VU Help • House Banner VU Help Virtual University Students - Assignments, Solved Papers, GDB & Exam Help Student Help Forum • Collaborative • Free Support