Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 6

Course Code MIS6221

Description Computer Programming 1


College / Department:
Course Project 001
Online Education Department
COURSE PROJECT Page 1 of 3

This activity will assess your knowledge and skills in applying C++
program in VS code that satisfies specific requirements to attain specific output.

Part 1:

 Create a video presentation from the topics listed below. Select one (1) group of topics only.
 The video must include an introduction, discussion of the topic, and sample program creation using Visual
Studio Code for each topic (if possible).
 The video should include yourself presenting the topics. For the visual content, the student may use
different materials and style (e.g. PowerPoint, live discussion, paper discussion). NOTE: Make sure that
your face is clearly seen on the video as well as the display on the screen.

List of Topics:

Group 1
 Problem Solving Through Flowcharts 1 and 2
 Handling Primitive Data Types
 What about ifs

Group 2
 Through the Loops
 Dimensions of Data Types
 Introduction to Functions Procedures

Group 3
 Object-Oriented Programming 1 and 2
 It's All about Pointers and References 1 and 2
Part 2:
 Create a video that shows yourself doing the activity.
 The video should also show the screen of VS code as the program is coded.
 The output window should be seen in the video as data is entered and the corresponding output of the
program is displayed.

Write a C++ program that will ask for the following input from the user:

Customer Name:
Age (should be 18 above):
Number of guests: (should be integer type)
Number of days: (should be double or float data type)

Determine the corresponding number of guests and rate per day as follows:

Number of guests Daily Rate


1 1000
2 1,800
3 2,700
4 3,600
5 (and above) 4,500

Compute the total payment as follows:


Total Payment = rate per day * no. of days
Down payment = 40% of the total payment
Balance = total payment – down payment

NOTE:
 Use your full name as customer’s name.
 User is not allowed to enter the age of 17 and below.
 Display an error message if the user enter an invalid value.

Assume that the user will not enter an invalid value.


Sample Input:
Customer Name: Juan Dela Cruz
Age: 25
Number of guests: 3
Number of days: 5
--------------------------------------------------------------------------------------------

Sample Output:
Hotel Reservation Slip
Customer Name : Juan Dela Cruz
Age : 25
Number of guests :3
Number of days :5
Total Payment : 13500
Down Payment : 5400
Balance : 8100
Instructions to submit the activity:

 Upload your video in YouTube or Vimeo then include the link together with the screenshots of your VS
codes and program output in the space provided below.
 Save the activity file (Filename: LastnameFirstName- CourseProject_ MIS6221.docx)
 Save the PowerPoint presentation (Filename: LastnameFirstName- CourseProject_ MIS6221.ppt)
 Compress these files (.docx and .ppt) in one folder and save it as .rar/.zip file.

(Example: DelaCruzJuan-CourseProject_ MIS6221.rar)

 Upload the .rar/.zip file on the submission page of the Course Project in the LMS.

Paste the Link of the Video recording here


#include <iostream>
#include<string>
Attach the screenshots of the codes here:
using namespace std;

int main ()
{
  string fName, lName, fullname;
  int age, guest, day;
  float balance,totalPayment,rate,downPayment;
  bool valid=true;

  cout<<"Please Emter your first name: ";


  getline(cin,fName);
  cout<<"Please Emter your last name: ";
  getline(cin,lName);

  while(valid){
    cout<<"Please Emter your Age: ";
    cin>>age;

    if(age > 17){


        valid=false;
    }
    else{
      cout<<"Invalid! Not for Minors!You must be 18 years of Age! "<<endl;  

    }
 
  }

cout<<"Number of Guest? : ";


cin>>guest;
cout<<"Number of Days : ";
cin>>day;

if(guest == 1){
  rate = 1000;
}
else if(guest == 2){
  rate = 1800;
}
else if(guest == 3){
  rate = 2700;
}
else if(guest == 4){
  rate = 3600;
}
else{
  rate  = 4500;
}
fullname = fName +" "+ lName;
totalPayment = rate * day;
downPayment = .40 * totalPayment;
balance = totalPayment - downPayment;

cout<<"                  ***HOTEL RESERVATION SLIP *** "<<endl;


cout<<"Customer's Name              :"<<fullname<<endl;
cout<<"Age                          :"<<age<<endl;
cout<<"Number of Guests             :"<<guest<<endl;
cout<<"Number of Days               :"<<day<<endl;
cout<<"Total Payment                :"<<totalPayment<<endl;
cout<<"Down Payment                 :"<<downPayment<<endl;
cout<<"Balance                      :"<<balance<<endl;

 cout<<endl;
 system("pause");
  return 0;
}

Attach the screenshot/s of the program output here:


NOTE: Incomplete submission will not be accepted and will be required for resubmission. The
highest grade for the resubmission is 50.

-----------------------------------------------Good luck!!!! 
-------------------------------------------------

You might also like