Skip to content

πŸ›  C++ project about price calculation based on hours watched on a Streaming platform.

Notifications You must be signed in to change notification settings

kendallvargas/StreamingQA

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

34 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🎬 Streaming Platform Payment Calculator (C++)

πŸ‘‹ Hi there! This is my C++ project, along with the testing procedure.

🎯 Project Overview

The C++ code consists of a short system that calculates the total amount to be paid based on hours watched on a streaming platform.

The main menu consists of 3 options:
1️⃣ First, enter the data and information so that the system calculates the amount.
2️⃣ The second, show on a receipt all the required data based on what was entered on menu 1.
3️⃣ The third, close the system.

The user is asked for these details:

  • Client ID
  • Full Name
  • Invoice number
  • Number of hours watched on the platform
  • If it is exempt from taxes

βš™οΈ Conditions to be met in the execution of the code

❖ The menu repeats until a correct option is entered (invalid: incorrect letters or numbers).
❖ Client ID must not allow letters or numbers other than 9.
❖ Invoice number must not allow letters or numbers other than 6.
❖ Total hours viewed must not allow letters or numbers less than 0 or greater than 720.
❖ The tax menu repeats until a correct letter is entered.
❖ The return to the main menu repeats until a correct letter is entered.
❖ Important: You cannot access option 2 without having gone through option 1.

πŸ’° Logic of calculation for the final price

There are already 2 fixed payments each month, which are:

  • fixedFee: 10 USD
  • contentProtection: 5 USD

The streaming hour has a fixed price of 2 USD per hour. For the additional hourly charge, it works as follows:
❖ Category 1: The first 10 hours have no additional charges.
❖ Category 2: After 10 to 50 hours consumed, an additional 10% is applied to the final price + the price of the first 10 hours consumed.
❖ Category 3: From 51 to 100 hours, the price of the first 10 hours consumed + 10% of the previous 40 hours, and 20% is applied to the final price based on the hours consumed in this category.
❖ Category 4: Above 100 hours, the price of the first 10 hours consumed(first category) + 10% of the previous 40 hours (second category) + 20% of the third category + 30% applied to the hours above 100 hours.

The tax price is 13% of the final total payment price. If the client is exempt from taxes, this additional price is not added.

πŸ§ͺ Test Plan

For the correct delivery of this C++ project, I need to test all the code and validate it works correctly based on the project requirements.

πŸ“„ Test Plan Document: Test_Plan

πŸ“šTest Cases

πŸ“„ Test Case Document: Test_Case

The reporting of the bugs is documented using Notion, here is the link to view the reports: backlog
Another way to access the links of the bugs directly from the Test Cases is to download the PDF of the TC from the folder >>> here.

πŸ”§ Reference for setting up C++ on Windows with VS code:

πŸš€ Instructions for running the code locally:

  • Install a git client such as git bash.

Clone the repository: πŸ“₯

git clone https://github.com/kendallvargas/StreamingQA.git
  • Go to the project location and open the 'main' file πŸ“‚

  • Build and Run ▢️

πŸ“Ή Example of a normal end-to-end flow in the system:

e2e.mp4

About

πŸ›  C++ project about price calculation based on hours watched on a Streaming platform.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages