Question

COP 2220 Into programming in C(Answer in C, not C++). The question is: Please write the...

COP 2220 Into programming in C(Answer in C, not C++). The question is:

Please write the algorithm for a AppStore programming assignment. The details of the assignment, a sample algorithm, and its outline, are located below. Make the algorithm at least half a page, easy to read, and to understand, how it works. I just want the algorithm, not the programming code, I have that. I only need the ALGORITHM. Thanks for helping me out, I apprieciate it, have a pleasant day.

SAMPLE ALGORITHM:

(FOR A DIFFERENT PROGRAMMING ASSIGNMENT)

Sample Algorithm for Program 1
1. Display instructions
2. Ask user for number of games to play
3. For each game
a. get a letter from file
b. Play one game
i. While still has guesses
ii. Get guess from player
iii. Compare guess to letter from file
iv. If guess is correct, return 1
v. Else increase counter
vi. Return 0 if 5 guesses incorrect
c. check for win or lose

Assignment purpose: User defined functions, pointers, Menu driven program
A Company needs to create software for their new line of phone Applications. Customers will have the
opportunity to purchase the Apps using the following cash amounts: (1) - $20.00, (2) - $10.00, (3) - $5.00
(4) - $2.00, (5) - $1.00
G – Graphing Calculator
M – Music Downloader
C – C programming guide
T – TxtToVoice
A – Astronomy Guide
$14.95
$2.95
$7.95
$4.95
$5.95
You must have at least 7 user defined functions:
// Displays the list of apps available
//prompts for the user’s selection and sets the value of the selection
void AppMenu(char *appChoicePtr);
//sets the cost of the item based on appChoice
void GetCost(char appChoice, double *appCostPtr);
//Displays the menu for the user to input money - gets user input amounts
//compares the int codes and updates the balance amount
void MoneyMenu(double *balancePtr, double appCost);
//compares the amount the user has in their balance to the price of app selected.
//It returns 1 if the amount is enough to cover the cost, 0 if there is not enough.
int Enough(double balance, double appCost);
//uses MoneyMenu function to display and collect dollar amounts from the user
//uses Enough function to keep comparing the balance amount to the appcost.
void GetMoney(double *balancePtr, double appCost);
//calculates the amount of leftover from balance after the purchase is made
void GetChange(double *balancePtr, double appCost);
//Asks the user if they want to buy another app
void Again(char *quitPtr);


SAMPLE OUTPUT:
Welcome to THE APP STORE
**********************************
You have $0.00 in your balance
-------------------------
HERE ARE THE SELECTIONS:
G – Graphing Calculator
M – Music Downloader
C – C programming guide
T – TxtToVoice
A – Astronomy Guide
Please enter a selection: G
------------------------------
You do not have enough in your balance
The item costs $14.95
You have $0.00 available in your balance
Please credit your balance by selection:
--- 1 $20.00
--- 2 $10.00
--- 3 $5.00
--- 4 $2.00
--- 5 $1.00
Deposit Amount: 2
------------------------------
You do not have enough in your balance
The item costs $14.95
You have $10.00 available in your balance
Please credit your balance by selection:
--- 1 $20.00
--- 2 $10.00
--- 3 $5.00
--- 4 $2.00
--- 5 $1.00
Deposit Amount: 5
------------------------------
You do not have enough in your balance
The item costs $14.95
You have $11.00 available in your balance
Please credit your balance by selection:
$14.95
$2.95
$7.95
$4.95
$5.953
--- 1 $20.00
--- 2 $10.00
--- 3 $5.00
--- 4 $2.00
--- 5 $1.00
Deposit Amount: 3
You have purchased item: G
you have $1.05 left in your balance,
would you like to make another purchase? y
**********************************
You have $1.05 in your balance
-------------------------
HERE ARE THE SELECTIONS:
G – Graphing Calculator
M – Music Downloader
C – C programming guide
T – TxtToVoice
A – Astronomy Guide
$14.95
$2.95
$7.95
$4.95
$5.95
Please enter a selection: C
------------------------------
You do not have enough in your balance
The item costs $7.95
You have $1.05 available in your balance
Please credit your balance by selection:
--- 1 $20.00
--- 2 $10.00
--- 3 $5.00
--- 4 $2.00
--- 5 $1.00
Deposit Amount: 1
You have purchased: C
you have $13.10 left in your balance,
would you like to make another purchase? n
you have: $13.10 credit available for next purchase
Thank you, enjoy your purchase(s)
Press any key to continue . . .

PROGRAM OUTLINE:

//Displays the list of apps available
//Prompts for the user’s selection and sets the value of the selection
void AppMenu(char *appChoicePtr);
//Sets the cost of the item based on appChoice
void GetCost(char appChoice, double *appCostPtr);
//Displays the menu for the user to input money - gets user input amounts
//Compares the int codes and updates the balance amount
void MoneyMenu(double *balancePtr, double appCost);
//Compares the amount the user has in their balance to the price of app
selected.
//It returns 1 if the amount is enough to cover the cost, 0 if there is not
enough.
int Enough(double balance, double appCost);
//Uses MoneyMenu function to display and collect dollar amounts from the user
//Uses Enough function to keep comparing the balance amount to the appcost.
void GetMoney(double *balancePtr, double appCost);
//Calculates the amount of leftover from balance after the purchase is made
void GetChange(double *balancePtr, double appCost);
//Asks the user if they want to buy another app
void Again(char *quitPtr);
int main()
{
//Declare and initialize all variables
//Do NOT declare ANY pointers
do{
//Display balance
//Display App Menu
//Get user’s choice
//Repeat until balance meets or exceeds item cost
//Display Money menu
//Get user’s choice
//Compare balance to item cost
//Display remaining balance
//Call function to ask for another transaction
}while(the response to Again is yes);
//Dispense remaining balance
return 0;
}
//Function Definitions// Displays the list of apps available
//Prompts for the user’s selection and sets the value of the selection
void AppMenu(char *appChoicePtr)
{
}
//Sets the cost of the item based on appChoice
void GetCost(char appChoice, double *appCostPtr)
{
}
//Displays the menu for the user to input money - gets user input amounts
//Compares the int codes and updates the balance amount
void MoneyMenu(double *balancePtr, double appCost)
{
}
//Compares the amount the user has in their balance to the price of app
selected.
//It returns 1 if the amount is enough to cover the cost, 0 if there is not
enough.
int Enough(double balance, double appCost)
{
return balance;
}
//Uses MoneyMenu function to display and collect dollar amounts from the user
//Uses Enough function to keep comparing the balance amount to the appcost.
void GetMoney(double *balancePtr, double appCost)
{
}
//Calculates the amount of leftover from balance after the purchase is made
void GetChange(double *balancePtr, double appCost)
{
}
//Asks the user if they want to buy another app
void Again(char *quitPtr)
{
}

0 0
Add a comment Improve this question Transcribed image text
Answer #1
Algorithm: 1) Display Balance 2) Display menu instruction 2) Ask user to enter app choice 3) Get item cost 4) if item cost gr

Note: in question you said that you have the code so i am not giving the code

Add a comment
Know the answer?
Add Answer to:
COP 2220 Into programming in C(Answer in C, not C++). The question is: Please write the...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • THIS IS FOR C++ PROGRAMMING USING VISUAL STUDIO THE PROGRAM NEEDS TO BE IN C++ PROGRAMMING #inclu...

    THIS IS FOR C++ PROGRAMMING USING VISUAL STUDIO THE PROGRAM NEEDS TO BE IN C++ PROGRAMMING #include "pch.h" #include #include using namespace std; // Function prototype void displayMessage(void); void totalFees(void); double calculateFees(int); double calculateFees(int bags) {    return bags * 30.0; } void displayMessage(void) {    cout << "This program calculates the total amount of checked bag fees." << endl; } void totalFees() {    double bags = 0;    cout << "Enter the amount of checked bags you have." << endl;    cout <<...

  • Develop a flowchart and then write a menu-driven C++ program that uses several FUNCTIONS to solve...

    Develop a flowchart and then write a menu-driven C++ program that uses several FUNCTIONS to solve the following program. -Use Microsoft Visual C++ .NET 2010 Professional compiler using default compiler settings. -Use Microsoft Visio 2013 for developing your flowchart. -Adherence to the ANSI C++  required -Do not use <stdio.h> and <conio.h>. -Do not use any #define in your program. -No goto statements allowed. Upon execution of the program, the program displays a menu as shown below and the user is prompted to make a selection from the menu....

  • I am struggling with a program in C++. it involves using a struct and a class...

    I am struggling with a program in C++. it involves using a struct and a class to create meal arrays from a user. I've written my main okay. but the functions in the class are giving me issues with constructors deconstructors. Instructions A restaurant in the Milky way galaxy called “Green Alien” has several meals available on their electronic menu. For each food item in each meal, the menu lists the calories per gram and the number of grams per...

  • Can you help us!! Thank you! C++ Write a program that can be used by a...

    Can you help us!! Thank you! C++ Write a program that can be used by a small theater to sell tickets for performances. The program should display a screen that shows which seats are available and which are taken. Here is a list of tasks this program must perform • The theater's auditorium has 15 rows, with 30 seats in each row. A two dimensional array can be used to represent the seats. The seats array can be initialized with...

  • Write a C++ program that uses a structure to store the following inventory information in a...

    Write a C++ program that uses a structure to store the following inventory information in a file: ⦁   Item description, Quantity on hand, Wholesale cost, Retail cost, and Date added to inventory. ⦁   Use a char array for item description and date. ⦁   The program should have a menu that allows the user to perform the following tasks: i.   Add a new record at the end of the file. ii.   Display any record in the file. iii.   Change any record...

  • C++ Write the code for the following procSale function. Its purpose is to take the array...

    C++ Write the code for the following procSale function. Its purpose is to take the array of Vendltem structures (first argument), the selection (2nd argument, which is also the array item to purchase), and the cash (3rd argument, which is the amount offered to pay for the item) and produce the following results: .If the cash is more than $1.00, output the message "Cash amount too large!" and return. If the cash is less than the price of the item...

  • ‘C’ programming language question Write a MENU DRIVEN program to A) Count the number of vowels...

    ‘C’ programming language question Write a MENU DRIVEN program to A) Count the number of vowels in the string B) Count the number of consonants in the string C) Convert the string to uppercase D) Convert the string to lowercase E) Display the current string X) Exit the program The program should start with a user prompt to enter a string, and let them type it in. Then the menu would be displayed. User may enter option in small case...

  • C++ programming For this assignment, write a program that will act as a geometry calculator. The...

    C++ programming For this assignment, write a program that will act as a geometry calculator. The program will be menu-driven and should continue to execute as long as the user wants to continue. Basic Program Logic The program should start by displaying a menu similar to the following: Geometry Calculator 1. Calculate the area of a circle 2. Calculate the area of a triangle 3. Quit Enter your choice(1-3): and get the user's choice as an integer. After the choice...

  • Needs to be coded in c, main needs to take command line arguments, thus: int main(int...

    Needs to be coded in c, main needs to take command line arguments, thus: int main(int argc, char*argv[]) it will take three files, htls.dat, roms.dat, cst.dat htls.dat 4 Hilton BstWestern HolmesEstates MoriarityInn roms.dat 5 Standard Queen King Suite Presidential cst.dat 50 75 120 145 200 75 125 155 200 355 145 175 250 350 400 300 400 500 600 900 needs to have following functions: const char *const GetHotelName(int hotel) - returns string from hotelnames global variable const char*const GetRoomName(int...

  • C programming language Purpose The purpose of this assignment is to help you to practice working...

    C programming language Purpose The purpose of this assignment is to help you to practice working with functions, arrays, and design simple algorithms Learning Outcomes ● Develop skills with multidimensional arrays ● Learn how to traverse multidimensional arrays ● Passing arrays to functions ● Develop algorithm design skills (e.g. recursion) Problem Overview Problem Overview Tic-Tac-Toe (also known as noughts and crosses or Xs and Os) is a paper-and-pencil game for two players, X and O, who take turns marking the...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT