Question

In: Computer Science

Please submit a topic and your project plan. There are no limits on project plan, the...

Please submit a topic and your project plan.

There are no limits on project plan, the intent is to get you started.

The details you should include are - what your project will look like, what features it will include (and/ or exclude), how will the user I/O be etc. If you are very ahead of schedule, you can also add an algorithm.

Could you make project topic and plan from c+ program

Solutions

Expert Solution

Project topic using C++ is: The Casino guessing Game

Project Idea:

In this game, The player has to enter money to bet in a casino guessing game. The player has to guess a number between 1 to 10 and in the back-end their is a computer generated number which is generated with the help of rand() function. If the player guesses the right answer then he will be rewarded with 10 times of money which he bets. And, If he loses then he will lose his betting amount.

Here the C++ Code and Url link of the code , you can just copy and paste the url in your browser if you want the code or else you can see the code in the code snippet below , the output screen is also attached below the code:

Url link of C++ code: https://repl.it/repls/HeavenlyPunctualAstrophysics#main.cpp

C++ code snippet:

//This header file includes every header file in C++
#include<bits/stdc++.h>

using namespace std;
 
void rules_game();
void draw_partition(int n, char symbol);

 
int main()
{
    string player_Name;
    int amount; // hold's the player's amount
    int dice; // hold the number which is generated by computer
    int bet_Amount, guess; 
    char choice;
 
    srand(time(0)); // seeds the random number generator

    draw_partition(50,'$');
    cout << "\n\n\t\tCASINO GAME\n\n\n";
    draw_partition(50,'$');
 
    cout << "\n\nEnter Your Name : ";
    getline(cin, player_Name);
 
    cout << "\n\nEnter Deposit amount to play game : $";
    cin >> amount;
    
    do
    {
        system("cls");
        rules_game();
        cout << "\n\nYour current balance is $ " << amount << "\n";
                
                // Getting the player's betting amount
        do
        {
            cout <<player_Name<<", enter money to bet : $ ";
            cin >> bet_Amount;
            if(bet_Amount > amount)
                cout << "Your betting amount is more than your current balance\n"
                       <<"\nRe-enter data\n ";
        }
        while(bet_Amount > amount);
 
                // Getting player's numbers
        do
        {
            cout << "Guess your number between 1 to 10 to bet:";
            cin >> guess;
            if(guess <= 0 || guess > 10)
                cout << "Please check the number!! should be between 1 to 10\n"
                    <<"\nRe-enter data\n ";
        }while(guess <= 0 || guess > 10);
 
        dice = ((rand()%10) + 1); // Will hold the randomly generated integer between 1 and 10
    
        if(dice == guess)
        {
            cout << "\n\nGood Luck!!!!, You won Rs." << bet_Amount * 10;
            amount = amount + bet_Amount * 10;
        }
        else
        {
            cout << "Bad Luck this time !! You lost $ "<< bet_Amount <<"\n";
            amount = amount - bet_Amount;
        }
 
        cout << "\nThe winning number was : " << dice <<"\n";
        cout << "\n"<<player_Name<<", You have $ " << amount << "\n";
        if(amount == 0)
        {
            cout << "You don't have enough money to play";
            break;
        }
        cout << "\n\n-->Do you want to play again (y/n)? ";            
        cin >> choice;
    }
    while(choice =='Y'|| choice=='y');
    
    cout << "\n\n";
    draw_partition(50,'=');
    cout << "\n\nThank you for playing. Your current balance is $ " << amount << "\n\n";
    draw_partition(50,'=');
 
    return 0;
}
 
 //function definition
void draw_partition(int n, char symbol)
{
    for(int i=0; i<n; i++)
        cout << symbol;
    cout << "\n" ;
}
 
void rules_game()
{
    system("cls");
    cout << "\n\n";
    draw_partition(50,'$');
    cout << "\t\tRULES OF THE GAME\n";
    draw_partition(50,'$');
    cout << "\t 1. You have to guess any number between 1 to 10\n";
    cout << "\t 2. If you bet on right number you will receive 10 times of money you bet\n";
    cout << "\t 3. If you bet on wrong number you will lose your betting money\n\n";
    draw_partition(50,'$');
}

Output screen:

Thank you!!!


Related Solutions

Prepare a response to the following: Share the topic of your project management plan with the...
Prepare a response to the following: Share the topic of your project management plan with the rest of the class. Discuss what resources/personnel you think you would need to complete the project. Please provide a rationale.
Please submit a draft Opportunity Analysis Plan for a scented candle business.
Please submit a draft Opportunity Analysis Plan for a scented candle business.
By the end of the week, submit a topic proposal for your Negotiation Analysis Paper. The...
By the end of the week, submit a topic proposal for your Negotiation Analysis Paper. The proposal (one page) should describe the focus of the paper and your method. The negotiation can be one in which you were a participant or one in which you have been an active observer. Some examples of applicable negotiations are: workplace negotiation, such as a complex contract, new position, or new salary (preferred); a complex business transaction, such as a merger or acquisition; a...
Marketing plan is for New vegan restaurant Marketing (Topic 5) Consider if your strategic plan is...
Marketing plan is for New vegan restaurant Marketing (Topic 5) Consider if your strategic plan is a market entry plan (entrepreneurial), a market expansion plan for an existing organization, or a mergers and acquisitions plan. Deciding who the target market is and determining their demographics, behaviors, motivation, needs, and goals is essential because the target market drives the marketing plan. This is typically done through studying research and data related to how potential customers are willing to invest their time...
For your task, provide responses to the following in a Word document and submit them: project...
For your task, provide responses to the following in a Word document and submit them: project name - Build an IT infrastructure for a medium size company that does accounting Explain why you selected this project Based on your project selection, explain what requirements and restrictions would be encountered Explain how you would go about constructing this project using an engineering approach
Project Topic Overview: Creation of a New Venture Create a strategic plan for a new venture:...
Project Topic Overview: Creation of a New Venture Create a strategic plan for a new venture: You may choose any idea but do not use something that has already been created. IIT IS A NEW VENTURE! You must organize the plan to focus on the following subjects: Summary of New Venture Overall description of the new venture How the venture exploits market voids and is a creation or opportunity Business level strategies Internal analysis of the new venture External analysis...
Project Topic Overview: Creation of a New Venture Create a strategic plan for a new venture:...
Project Topic Overview: Creation of a New Venture Create a strategic plan for a new venture: You may choose any idea. You must organize the plan to focus on the following subjects: Summary of New Venture Overall description of the new venture How the venture exploits market voids and is a creation or opportunity Business level strategies Internal analysis of the new venture External analysis of the new venture Governance structure of the venture including description and analysis of CEO,...
Let’s assume that you plan an SMS marketing campaign for your term project client. Please describe...
Let’s assume that you plan an SMS marketing campaign for your term project client. Please describe your SMS marketing campaignas specifically as possible. You should consider the client’s target customers and the objective of the social media marketing.
Please prepare a research project for the Ecosystem accounting. The research of the topic must be...
Please prepare a research project for the Ecosystem accounting. The research of the topic must be minimum three pages (excluding figures and graphs).
Please prepare a research project for the topic The Influence of the Principal Dimensions of Accounting...
Please prepare a research project for the topic The Influence of the Principal Dimensions of Accounting Information on the Capital Gains Yield. The research of the topic must be minimum three pages (excluding figures and graphs). Please prepare a research project for the topic The Influence of the Principal Dimensions of Accounting Information on the Capital Gains Yield. The research of the topic must be minimum three pages (excluding figures and graphs).
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT