Archive

Posts Tagged ‘stand’

Stand Alone Program Needed For Sample Follow Up

September 13th, 2011 Comments off

Please see attached an Excel sheet which we currently use.
I would like to get a stand alone program that can handle, sort and print this information.

We would need to be able to save the information in a file that we can save on our server, so all our offices have access to this database.

The program itself should be a stand alone program (preferably no installation) which can be used on multiple computers. If one person is in the database, the user who wants to open the file should get a notice then, that someone is already using it.

When entering the information, the User should first decide for whom it should be entered. In the attached example, there are four people, but it could be more or less.

The date should be entered manually.

The customer should be entered manually, but if it was used before the program should show the name which was entered or close.

Attn should be entered manually, but if it was used before the program should show the name which was entered or close.

State should be entered manually, but if it was used before the program should show the name which was entered or close.

Part should be entered manually, but if it was used before the program should show the name which was entered or close.

Jauch P/N should be entered manually, but if it was used before the program should show the name which was entered or close.

Qty should be entered manually.

End customer should be entered manually, but if it was used before the program should show the name which was entered or close.

Project should be entered manually, but if it was used before the program should show the name which was entered or close.

EAU should be entered manually.

Comments should be entered manually.

Status should be entered manually.

There should be an easy search option and then the selected entry should be shown nicely on the screen and also be able to print.

Please let me know if you have questions as this program is complex and I know what I want to questions will make this work easier for you.

After completion all code should be given to me as well so future programmers can use it.

Script To Manage Hotspots/image Map By Xml

July 23rd, 2011 Comments off

.
Hotspots – Image Map – Interactivity

I have an image of a trade fair floor plan and the booths/stands that will be uploaded to the website (Joomla/LAMP)

1) Each stand needs to be a hotspot
********************************************************************
a) When hovering over the hot spot a modal text box should be shown with details of the stand (stand no., size etc.)
The info to be shown should be generated from XML linked by the stand number

b) When clicking on the hotspot a link to an URL should be used based on XML linked by the stand number (_blank)

c) When leaving the hotspot the text box should vanish automatically

2) Background Colors of each Hotspot
********************************************************************
Ability to change the background color of each stand/booth individually (original, light orange, darker orange)

3) Modal Text Box Content Text Based on Background Colors of each Hotspot
********************************************************************
The modal text boxes’ content text for each hotspot will vary according to the color selected.
Possible content text variations depending on the background color selected are
a) Stand/booth details
b) Name of a company that booked that specific booth
c) Reserved
d) Booked

4) XML + Admin Backend
********************************************************************
I want to upload an Excel table with columns that represent the various data for each stand/booth/hotspot
Update is possible by

a) Uploading a new Excel table

b) Admin function
In the admin backend from the XML data a table is presented with which one can edit the data that is used to present the image map

Text Box Content
- Radio Button-1: Stand/booth details: Can only be changed by uploading a new Excel table
- Radio Button-2: Name of a company that booked that specific booth: Editable by Text Field
- Radio Button-3: Reserved
- Radio Button-4: Booked

Hotspot Background Color
If Radio Button-01 is selected use background color “original”
If Radio Button-02 is selected use background color “darker orange”
If Radio Button-03 is selected use background color “lighter orange”
If Radio Button-04 is selected use background color “darker orange”

We need to see some of your previous work before we can make a decision.

Please bid for the programming of this script!

If you have the right tools to create an image map from a floor plan image (=attached) too, then mention your quote for this part in the PMB.

Important is the script!

Thank you for your bid

Stand Alone Database

April 14th, 2011 Comments off

Hello,

I need database for register incoming and outgoning devices
i must be able to make reports and print them
i need search option
and and easy gui

Iphone App Stand Alone Audiobook App

April 6th, 2011 Comments off

Stand alone iphone/ipod app that downloads an 1 single audiobook to a users phone and has a playback engine to listen to the audiobook.

there will be 9 files for a total of about 500mb of .mp3 files that have to be downloaded to phone.

simple audio player to listen to the files chapter by chapter when app is opened; play, pause.

bookmark function- files should resume from place when app was last used.

files cannot be transfered to another medium. they can only be listened to on the phone itself. must be able to listen to files without data connection.

files can be downloaded from web or from itunes store/app itself.

Pull Up Banner Stand Design

November 20th, 2009 Comments off

Need design/arrangement for 2000mm x 800mm banner,
require full PSD and 300 DPI jpg required. Already
have logo and colour scheme, need someone to take
text/wordings and make creative design for the
large rectangular shape of the banner.

Theme is for Business Strategy Consulting, current
PSD logo and images will be provided.

Need turnaround in a day, should be no problem for
someone with the right skills.

Banner Stand Design

November 19th, 2009 Comments off

Need design/arrangement for 2000mm x 800mm banner,
require full PSD and 300 DPI jpg required. Already
have logo and colour scheme, need someone to take
text/wordings and make creative design for the
shape of the banner.

Theme is for Business Strategy Consulting, current
PSD and images will be provided.

Need turnaround in a day, should be no problem for
someone with the right skills.

Seo Build Links Stand Out

November 19th, 2009 Comments off

DO SEO and other means of popularizing internet marketing website I have text for the ad and banners and landing page. Project may include one page landig page depending on bids. Communication and results are very important, one guy that won the bid 2 weeks ago was could not perform!. Work should be verifiable; you give me a spreadsheet or documetn of activity. Depending on the initial success, I may expand to once a month to or more websites.

Stand Alone Donation Module

November 18th, 2009 Comments off

Hi,

I have a donation module on my zen-cart site. It is based on the discount coupon module. What it does is add the inputted amount to the total price before checkout. I need someone to use the module and make it stand alone.

I need a link in “Categories” which when clicked opens the donation module. You can enter the amount you wish. This is without having to add a product to the cart.

Forex Pamm / Lamm Stand Alone

October 3rd, 2009 Comments off

I am looking for a PAMM (Percent and lot Allocation Money Manager) and LAMM (Lot Allocation Management Module) Software that is stand alone and not broker specific, So that I can trade Forex Managed Accounts from one master account using Meta Trader….The broker I use does not have the software that meets my needs.

PAMM (Percent Allocation Management Module) distributes gains, losses and fees on an equal percentage basis. All accounts regardless of size obtain the same percentage returns. The LAMM (Lot Allocation Management Module) allows the trader to allocate different trade lots to each account. This allows the money manager the flexibility to use different leverage to suit the needs of each client.

If you have developed or know where I can find this type of software please let me know.

PLEASE PM your experience on this type of project BEFORE you bid.
In your PM please include the words “KEYWORD MT4″ so that I can be sure that you have read these details and not just sending an automated response.

Stand Alone Autobid Penny

September 19th, 2009 Comments off

Hey,

I’ve started a penny auction site, I need a standalone script that will use a couple of members from a list of about 200 members, that will autobid specific items upto a specific price after a member has placed a bid, within the last 1-5 seconds of the auction.

If you can do this please let me know the price. Also I need a script and coding for my template into this theme

Thanks

Stand Alone Ingredient

July 22nd, 2009 Comments off

Stand alone ingredient substotution search

Stand Alone Store Locator

May 4th, 2009 Comments off

I need either a standalone store/vendor locator or one that would integrate with oscommerce.

I need the ability to have it in a directory within an oscommerce application and have an include that links to it.

It should have the ability to calculate shortest distance based on zip code(latitude and longitude) doesnt need to be a custom script but needs to work properly. Ideally i would like to feed it a database of stores (name, address, zip code, phone)
and have it return a list of the closest stores as well as links to googlemaps for directions.

customers should be able to search using either zip code, or address.

app should use php/mysql

This is an urgent need. Thanks in advance!

C Lemonade Stand

April 5th, 2009 Comments off

Here is what needs to be done. I have the skeleton code too which i have included right after the instructions. This program must compile in Dev C++ and it needs to be in the format in the instructions.

Objectives
1. Review use of if statements and loops.
2. Learn how to write functions given specifications.
3. Learn how to use pass by reference variables.
4. Learn how to put together a useful program given a skeleton of that program and the
functions and their specifications necessary in the implementation.

Problem: Lemonade Stand
Last summer your friend has a lemonade stand and made lots of money. You want to do the same! You have plenty of time to plan, so you thought you would be pre
pared when summer came around by writing a program to simulate your lemonade stand. The basic idea behind the simulation is as follows:

1) You will simulate 10 days of running the lemonade stand.
2) In the beginning the user gets a $20.00 loan to run the lemonade stand.
3) Before each day, the user gets an opportunity to buy bags of lemons and sugar.
4) At the beginning of each day the user receive a weather report.
5) Based on that, the user is asked to price a cup of lemonade for that day.
6) Then, the days sales are simulated. (Part of this is written for you.)
7) Afterwards, the user is prompted with a status report of how much money they have left and how many bags of lemons and sugar they have left.

What you have to do
A skeleton of the solution for this assignment is posted on WebCourses and the course web page. Please use this skeleton. You must fill in the seven functions that are left for you to fill in, as well as write the remainder of main so the program works as described above. After you write each function, you should test it before moving on. How to do this will be covered in class. Then, write your main, calling the necessary functions from it to achieve the desired functionality. main can work without declaring any new variables than the ones already declared. But, you may declare new ones if you wish.

Perhaps the biggest problem you will have will be not knowing when to make function calls. The goal of having these functions is to make the coding process more manageable. In particular, it is possible that a function might “do” something complicated, but that just really means that function makes calls to other functions that carry out a majority of that work already. In essence, if you write a function A to do a task, then don’t write out the code that also does that task in another function B. Instead call the function A from the body of function B.

References
Textbook: Chapters 9, 10, 11 Notes: Lectures 13, 14, 15, 17

Output Sample
Two full output samples of the program running will be provided on Webcourses and the course web page in the files lemonade.out and lemonade2.out.

Deliverables
You must submit your solution to the problem, lemonade.c, over WebCourses.

Restrictions
Although you may use other compilers, your program must compile and run using DevC++. Please use DevC++ to develop your program. Your program should include a header comment with the following information: your name, course number, section number, assignment title, and date. Also, make sure you include ample comments throughout your code describing the major steps in solving the problem.

Grading Details
Your program will be graded upon the following criteria:

1) Your correctness
2) Your programming style and use of white space. (Even if you have a plan and your program works perfectly, if your programming style is poor or your use of white space is poor you could get 10% or 15% deducted from your grade.)
3) Compatibility to DevC++. (If your program does not compile in this environment, you will get a sizable deduction from your grade, likely to be over 50%)

The code Skeleton:

#include <stdio.h>
#include <stdlib.h>
#include <time.h>

// Symbolic constants to be used.

// Prices of bags of sugar and lemon, respectively.
#define PRICE_LEMON 3.50
#define PRICE_SUGAR 2.00

// Fraction of a bag of lemons and sugar used on a single cup of lemonade.
#define LEMON_PER_CUP 0.03
#define SUGAR_PER_CUP 0.04

// The initial loan the user is given to start their lemonade stand.
#define START_MONEY 20.00

// Using symbolic constants for true and false.
#define FALSE 0
#define TRUE 1

void buy_lemons(double *pLemons, double *pMoney);
void buy_sugar(double *pSugar, double *pMoney);
int weather();
int num_cups_sold(int weather, int cost);
void status_report(double cash, double num_lemons, double num_sugar, int day);
int max_sell(double num_lemons, double num_sugar);
int get_cost();
void sell_cups(double *pMoney, double *pLemons, double *pSugar);
void end_message(double money);

int main() {

int num_day, ans;
double money = START_MONEY, num_lemons = 0, num_sugar = 0;

srand(time(0));

printf(“Welcome to the Game of Lemonade!nn”);
printf(“You start the game with $%.2lf and no supplies!n”, START_MONEY);

// Loop through each day. Ask the user if they want to buy lemons. If so,
// carry out the transaction. Then ask them if they want to buy sugar.
// If so, do this transaction as well. Then, let them sell lemonade for
// the day. Finally, print a status report after they’ve sold lemonade
// at the end of the day.
for (num_day = 1; num_day <= 10; num_day++) {

}

// Print out whether or not they have lost money, broke even or gained
// money.

return 0;
}

// Pre-conditions: pLemons and pMoney are pointers to variables that store
// the user’s number of bags of lemons left and amount of
// money left.
// Post-condition: The user is given the opportunity to buy lemons. If
// successful, the number of bags of lemons and the amount
// of money the user has are adjusted accordingly.
//
// What to do in this function: If the user doesn’t have enough money to
// even buy one bag of lemons, tell them so and return. Otherwise, ask
// the user how many bags of lemons they want to buy. If they answer less
// than one, tell them they must get more and reprompt them. If they
// answer more than they can buy, tell them they don’t have that much
// money and reprompt them. Continue prompting them until they answer with
// a valid value. Then process the transaction.

void buy_lemons(double *pLemons, double *pMoney) {

}

// Pre-conditions: pSugar and pMoney are pointers to variables that store
// the user’s number of bags of lemons left and amount of
// money left.
// Post-condition: The user is given the opportunity to buy sugar. If
// successful, the number of bags of sugar and the amount
// of money the user has are adjusted accordingly.
//
// What to do in this function: If the user doesn’t have enough money to
// even buy one bag of sugar, tell them so and return. Otherwise, ask
// the user how many bags of sugar they want to buy. If they answer less
// than one, tell them they must get more and reprompt them. If they
// answer more than they can buy, tell them they don’t have that much
// money and reprompt them. Continue prompting them until they answer with
// a valid value. Then process the transaction.

void buy_sugar(double *pSugar, double *pMoney) {

}

// Pre-condition: None
// Post-condition: The weather report for the day is printed and the
// corresponding weather status in between 1 and 5,
// inclusive, is returned.
int weather() {

// Get the weather status value.
int retval = rand()%5 + 1;

printf(“nHere is today’s weather forecast:n”);

// Print out the appropriate forecast for that status.n”);
if (retval == 1)
printf(“It is cloudy with a high chance of rain.n”);
else if (retval == 2)
printf(“It is partly cloudy and windy.n”);
else if (retval == 3)
printf(“It is partly sunny with low humidity.n”);
else if (retval == 4)
printf(“It is warm and sunny with medium winds.n”);
else
printf(“It’s a perfect beach day. Sunny and hot!n”);

return retval; // Return this status value.
}

// Pre-condition: weather is an integer in between 1 and 5, inclusive,
// standing for the weather status for the day. cost is
// the cost of a cup of lemonade in cents for that day.
// Post-condition: The number of cups of lemonade for that day is returned.
int num_cups_sold(int weather, int cost) {

int optimal_price, max_cups;
double max_income;

// Calculate a maximum revenue for the day.
max_income = 5 + 3*weather;
optimal_price = 15 + 5*weather;
max_income = max_income – fabs(optimal_price – cost)/1.5;

// If it’s lower than 5 dollars, reset it to 5 dollars.
if (max_income < 5)
max_income = 5;

// From this, determine the maximum number of cups that could be sold.
max_cups = (int)(max_income/((double)cost/100));

// Return a random number from 0 to this maximum.
return rand()%(max_cups+1);

}

// Pre-condition: cash is the amount of cash the user has, num_lemons is
// the number of bags of lemons the user has left, num_sugar
// is the number of bags of sugar the user has left, and day
// is which day of the game just finished.
// Post-condition: A status report with the four values passed in is nicely
// displayed for the user.
//
// What to do with this function: This is fairly self-explanatory from the
// pre and post conditions. Look to the sample given in the assignment for
// the format.
void status_report(double cash, double num_lemons, double num_sugar, int day) {

}

// Pre-condition: pMoney, pLemons and pSugar are pointers to the variables
// storing the user’s amount of cash, number of bags of
// lemons and number of bags of sugar.
// Post-condition: A day’s transactions will take place and the amount of
// money, the number of bags of lemons and sugar will be
// adjusted accordingly.
//
// What to do with this function: First prompt the user with the weather
// report. Then, ask the user for how much they want to sell a cup of
// lemonade. Determine the number of cups that actually get sold for the
// day by determining how many cups the user COULD sell based on the
// availability of supplies and how many cups they COULD sell based on the
// weather. Print out how many cups of lemonade they ended up selling.
// Then adjust the amount of money they have, as well as the number of bags
// of lemons and sugar.

void sell_cups(double *pMoney, double *pLemons, double *pSugar) {

}

// Pre-condition: num_lemons is the number of bags of lemons the user has,
// and num_sugar is the number of bags of sugar they have.
// Post-condition: The function returns the maximum number of cups of
// lemonade the user can sell based on available supplies.
//
// What to do with this function: Calculate how many full cups of lemonade
// you can supply with sugar. Do the same calculation for lemons. Then,
// return the smaller of these two values.

int max_sell(double num_lemons, double num_sugar) {

}

// Pre-condition: None.
// Post-condition: Returns the number of cents the user will sell a cup of
// lemonade for, for that day.
//
// What to do with this function: Prompt the user to enter how much they
// want to charge for a cup of lemonade. If they don’t enter a positive
// integer, reprompt them until they do. Then return this value.

int get_cost() {

}

// Pre-condition: money is the amount of money the user has left at the end
// of the 10 days of running their Lemonade Stand.
// Post-condition: The user’s overall loss or profit is printed out.

// What to do with this function: See if what they have left is less than
// what they started with. If so, print out how much the lost. If it’s equal
// just print out a message saying that they broke even. Otherwise, print
// out how much profit they made!

void end_message(double money) {

}

Categories: C/C++ Tags: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

Lemonade Stand

April 3rd, 2009 Comments off

Here is what needs to be done. I have the skeleton code too which i have included right after the instructions. This program must compile in Dev C++ and it needs to be in the format in the instructions.

Objectives
1. Review use of if statements and loops.
2. Learn how to write functions given specifications.
3. Learn how to use pass by reference variables.
4. Learn how to put together a useful program given a skeleton of that program and the
functions and their specifications necessary in the implementation.

Problem: Lemonade Stand
Last summer your friend has a lemonade stand and made lots of money. You want to do the same! You have plenty of time to plan, so you thought you would be pre
pared when summer came around by writing a program to simulate your lemonade stand. The basic idea behind the simulation is as follows:

1) You will simulate 10 days of running the lemonade stand.
2) In the beginning the user gets a $20.00 loan to run the lemonade stand.
3) Before each day, the user gets an opportunity to buy bags of lemons and sugar.
4) At the beginning of each day the user receive a weather report.
5) Based on that, the user is asked to price a cup of lemonade for that day.
6) Then, the days sales are simulated. (Part of this is written for you.)
7) Afterwards, the user is prompted with a status report of how much money they have left and how many bags of lemons and sugar they have left.

What you have to do
A skeleton of the solution for this assignment is posted on WebCourses and the course web page. Please use this skeleton. You must fill in the seven functions that are left for you to fill in, as well as write the remainder of main so the program works as described above. After you write each function, you should test it before moving on. How to do this will be covered in class. Then, write your main, calling the necessary functions from it to achieve the desired functionality. main can work without declaring any new variables than the ones already declared. But, you may declare new ones if you wish.

Perhaps the biggest problem you will have will be not knowing when to make function calls. The goal of having these functions is to make the coding process more manageable. In particular, it is possible that a function might “do” something complicated, but that just really means that function makes calls to other functions that carry out a majority of that work already. In essence, if you write a function A to do a task, then don’t write out the code that also does that task in another function B. Instead call the function A from the body of function B.

References
Textbook: Chapters 9, 10, 11 Notes: Lectures 13, 14, 15, 17

Output Sample
Two full output samples of the program running will be provided on Webcourses and the course web page in the files lemonade.out and lemonade2.out.

Deliverables
You must submit your solution to the problem, lemonade.c, over WebCourses.

Restrictions
Although you may use other compilers, your program must compile and run using DevC++. Please use DevC++ to develop your program. Your program should include a header comment with the following information: your name, course number, section number, assignment title, and date. Also, make sure you include ample comments throughout your code describing the major steps in solving the problem.

Grading Details
Your program will be graded upon the following criteria:

1) Your correctness
2) Your programming style and use of white space. (Even if you have a plan and your program works perfectly, if your programming style is poor or your use of white space is poor you could get 10% or 15% deducted from your grade.)
3) Compatibility to DevC++. (If your program does not compile in this environment, you will get a sizable deduction from your grade, likely to be over 50%)

The code Skeleton:

#include <stdio.h>
#include <stdlib.h>
#include <time.h>

// Symbolic constants to be used.

// Prices of bags of sugar and lemon, respectively.
#define PRICE_LEMON 3.50
#define PRICE_SUGAR 2.00

// Fraction of a bag of lemons and sugar used on a single cup of lemonade.
#define LEMON_PER_CUP 0.03
#define SUGAR_PER_CUP 0.04

// The initial loan the user is given to start their lemonade stand.
#define START_MONEY 20.00

// Using symbolic constants for true and false.
#define FALSE 0
#define TRUE 1

void buy_lemons(double *pLemons, double *pMoney);
void buy_sugar(double *pSugar, double *pMoney);
int weather();
int num_cups_sold(int weather, int cost);
void status_report(double cash, double num_lemons, double num_sugar, int day);
int max_sell(double num_lemons, double num_sugar);
int get_cost();
void sell_cups(double *pMoney, double *pLemons, double *pSugar);
void end_message(double money);

int main() {

int num_day, ans;
double money = START_MONEY, num_lemons = 0, num_sugar = 0;

srand(time(0));

printf(“Welcome to the Game of Lemonade!nn”);
printf(“You start the game with $%.2lf and no supplies!n”, START_MONEY);

// Loop through each day. Ask the user if they want to buy lemons. If so,
// carry out the transaction. Then ask them if they want to buy sugar.
// If so, do this transaction as well. Then, let them sell lemonade for
// the day. Finally, print a status report after they’ve sold lemonade
// at the end of the day.
for (num_day = 1; num_day <= 10; num_day++) {

}

// Print out whether or not they have lost money, broke even or gained
// money.

return 0;
}

// Pre-conditions: pLemons and pMoney are pointers to variables that store
// the user’s number of bags of lemons left and amount of
// money left.
// Post-condition: The user is given the opportunity to buy lemons. If
// successful, the number of bags of lemons and the amount
// of money the user has are adjusted accordingly.
//
// What to do in this function: If the user doesn’t have enough money to
// even buy one bag of lemons, tell them so and return. Otherwise, ask
// the user how many bags of lemons they want to buy. If they answer less
// than one, tell them they must get more and reprompt them. If they
// answer more than they can buy, tell them they don’t have that much
// money and reprompt them. Continue prompting them until they answer with
// a valid value. Then process the transaction.

void buy_lemons(double *pLemons, double *pMoney) {

}

// Pre-conditions: pSugar and pMoney are pointers to variables that store
// the user’s number of bags of lemons left and amount of
// money left.
// Post-condition: The user is given the opportunity to buy sugar. If
// successful, the number of bags of sugar and the amount
// of money the user has are adjusted accordingly.
//
// What to do in this function: If the user doesn’t have enough money to
// even buy one bag of sugar, tell them so and return. Otherwise, ask
// the user how many bags of sugar they want to buy. If they answer less
// than one, tell them they must get more and reprompt them. If they
// answer more than they can buy, tell them they don’t have that much
// money and reprompt them. Continue prompting them until they answer with
// a valid value. Then process the transaction.

void buy_sugar(double *pSugar, double *pMoney) {

}

// Pre-condition: None
// Post-condition: The weather report for the day is printed and the
// corresponding weather status in between 1 and 5,
// inclusive, is returned.
int weather() {

// Get the weather status value.
int retval = rand()%5 + 1;

printf(“nHere is today’s weather forecast:n”);

// Print out the appropriate forecast for that status.n”);
if (retval == 1)
printf(“It is cloudy with a high chance of rain.n”);
else if (retval == 2)
printf(“It is partly cloudy and windy.n”);
else if (retval == 3)
printf(“It is partly sunny with low humidity.n”);
else if (retval == 4)
printf(“It is warm and sunny with medium winds.n”);
else
printf(“It’s a perfect beach day. Sunny and hot!n”);

return retval; // Return this status value.
}

// Pre-condition: weather is an integer in between 1 and 5, inclusive,
// standing for the weather status for the day. cost is
// the cost of a cup of lemonade in cents for that day.
// Post-condition: The number of cups of lemonade for that day is returned.
int num_cups_sold(int weather, int cost) {

int optimal_price, max_cups;
double max_income;

// Calculate a maximum revenue for the day.
max_income = 5 + 3*weather;
optimal_price = 15 + 5*weather;
max_income = max_income – fabs(optimal_price – cost)/1.5;

// If it’s lower than 5 dollars, reset it to 5 dollars.
if (max_income < 5)
max_income = 5;

// From this, determine the maximum number of cups that could be sold.
max_cups = (int)(max_income/((double)cost/100));

// Return a random number from 0 to this maximum.
return rand()%(max_cups+1);

}

// Pre-condition: cash is the amount of cash the user has, num_lemons is
// the number of bags of lemons the user has left, num_sugar
// is the number of bags of sugar the user has left, and day
// is which day of the game just finished.
// Post-condition: A status report with the four values passed in is nicely
// displayed for the user.
//
// What to do with this function: This is fairly self-explanatory from the
// pre and post conditions. Look to the sample given in the assignment for
// the format.
void status_report(double cash, double num_lemons, double num_sugar, int day) {

}

// Pre-condition: pMoney, pLemons and pSugar are pointers to the variables
// storing the user’s amount of cash, number of bags of
// lemons and number of bags of sugar.
// Post-condition: A day’s transactions will take place and the amount of
// money, the number of bags of lemons and sugar will be
// adjusted accordingly.
//
// What to do with this function: First prompt the user with the weather
// report. Then, ask the user for how much they want to sell a cup of
// lemonade. Determine the number of cups that actually get sold for the
// day by determining how many cups the user COULD sell based on the
// availability of supplies and how many cups they COULD sell based on the
// weather. Print out how many cups of lemonade they ended up selling.
// Then adjust the amount of money they have, as well as the number of bags
// of lemons and sugar.

void sell_cups(double *pMoney, double *pLemons, double *pSugar) {

}

// Pre-condition: num_lemons is the number of bags of lemons the user has,
// and num_sugar is the number of bags of sugar they have.
// Post-condition: The function returns the maximum number of cups of
// lemonade the user can sell based on available supplies.
//
// What to do with this function: Calculate how many full cups of lemonade
// you can supply with sugar. Do the same calculation for lemons. Then,
// return the smaller of these two values.

int max_sell(double num_lemons, double num_sugar) {

}

// Pre-condition: None.
// Post-condition: Returns the number of cents the user will sell a cup of
// lemonade for, for that day.
//
// What to do with this function: Prompt the user to enter how much they
// want to charge for a cup of lemonade. If they don’t enter a positive
// integer, reprompt them until they do. Then return this value.

int get_cost() {

}

// Pre-condition: money is the amount of money the user has left at the end
// of the 10 days of running their Lemonade Stand.
// Post-condition: The user’s overall loss or profit is printed out.

// What to do with this function: See if what they have left is less than
// what they started with. If so, print out how much the lost. If it’s equal
// just print out a message saying that they broke even. Otherwise, print
// out how much profit they made!

void end_message(double money) {

}

Categories: C/C++ Tags: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

Lemonade

March 31st, 2009 Comments off

Objectives
1. Review use of if statements and loops.
2. Learn how to write functions given specifications.
3. Learn how to use pass by reference variables.
4. Learn how to put together a useful program given a skeleton of that program and the
functions and their specifications necessary in the implementation.

Problem: Lemonade Stand
Last summer your friend has a lemonade stand and made lots of money. You want to do the same! You have plenty of time to plan, so you thought you would be pre
pared when summer came around by writing a program to simulate your lemonade stand. The basic idea behind the simulation is as follows:

1) You will simulate 10 days of running the lemonade stand.
2) In the beginning the user gets a $20.00 loan to run the lemonade stand.
3) Before each day, the user gets an opportunity to buy bags of lemons and sugar.
4) At the beginning of each day the user receive a weather report.
5) Based on that, the user is asked to price a cup of lemonade for that day.
6) Then, the days sales are simulated. (Part of this is written for you.)
7) Afterwards, the user is prompted with a status report of how much money they have left and how many bags of lemons and sugar they have left.

What you have to do
A skeleton of the solution for this assignment is posted on WebCourses and the course web page. Please use this skeleton. You must fill in the seven functions that are left for you to fill in, as well as write the remainder of main so the program works as described above. After you write each function, you should test it before moving on. How to do this will be covered in class. Then, write your main, calling the necessary functions from it to achieve the desired functionality. main can work without declaring any new variables than the ones already declared. But, you may declare new ones if you wish.

Perhaps the biggest problem you will have will be not knowing when to make function calls. The goal of having these functions is to make the coding process more manageable. In particular, it is possible that a function might “do” something complicated, but that just really means that function makes calls to other functions that carry out a majority of that work already. In essence, if you write a function A to do a task, then don’t write out the code that also does that task in another function B. Instead call the function A from the body of function B.

References
Textbook: Chapters 9, 10, 11 Notes: Lectures 13, 14, 15, 17

Output Sample
Two full output samples of the program running will be provided on Webcourses and the course web page in the files lemonade.out and lemonade2.out.

Deliverables
You must submit your solution to the problem, lemonade.c, over WebCourses.

Restrictions
Although you may use other compilers, your program must compile and run using DevC++. Please use DevC++ to develop your program. Your program should include a header comment with the following information: your name, course number, section number, assignment title, and date. Also, make sure you include ample comments throughout your code describing the major steps in solving the problem.

Grading Details
Your program will be graded upon the following criteria:

1) Your correctness
2) Your programming style and use of white space. (Even if you have a plan and your program works perfectly, if your programming style is poor or your use of white space is poor you could get 10% or 15% deducted from your grade.)
3) Compatibility to DevC++. (If your program does not compile in this environment, you will get a sizable deduction from your grade, likely to be over 50%)

it has to be in pure c and i have a sample run of how the program should look when it runs and i have also included the skeleton of the program. thanks

Welcome to the Game of Lemonade!

You start the game with $20.00 and no supplies!

This is Day #1 for your Lemonade Stand.
Would you like to buy lemons?(Yes=1,No=0)
1
How many bags of lemons do you want to buy?
1
Would you like to buy sugar?(Yes=1,No=0)
1
How many bags of sugar do you want to buy?
1

Here is today’s weather forecast:
It is partly cloudy and windy.

How many cents will you sell a cup of lemonade for today?
30
You sold 15 cups of lemonade today.

Status report for day 1:
————————-
Cash Left: $19.00
Bags of Lemons Left: 0.55
Bags of Sugar Left: 0.40

This is Day #2 for your Lemonade Stand.
Would you like to buy lemons?(Yes=1,No=0)
1
How many bags of lemons do you want to buy?
1
Would you like to buy sugar?(Yes=1,No=0)
1
How many bags of sugar do you want to buy?
1

Here is today’s weather forecast:
It is cloudy with a high chance of rain.

How many cents will you sell a cup of lemonade for today?
25
You sold 8 cups of lemonade today.

Status report for day 2:
————————-
Cash Left: $15.50
Bags of Lemons Left: 1.31
Bags of Sugar Left: 1.08

This is Day #3 for your Lemonade Stand.
Would you like to buy lemons?(Yes=1,No=0)
0
Would you like to buy sugar?(Yes=1,No=0)
0

Here is today’s weather forecast:
It is cloudy with a high chance of rain.

How many cents will you sell a cup of lemonade for today?
40
You sold 9 cups of lemonade today.

Status report for day 3:
————————-
Cash Left: $19.10
Bags of Lemons Left: 1.04
Bags of Sugar Left: 0.72

This is Day #4 for your Lemonade Stand.
Would you like to buy lemons?(Yes=1,No=0)
1
How many bags of lemons do you want to buy?
1
Would you like to buy sugar?(Yes=1,No=0)
1
How many bags of sugar do you want to buy?
1

Here is today’s weather forecast:
It is partly cloudy and windy.

How many cents will you sell a cup of lemonade for today?
30
You sold 2 cups of lemonade today.

Status report for day 4:
————————-
Cash Left: $14.20
Bags of Lemons Left: 1.98
Bags of Sugar Left: 1.64

This is Day #5 for your Lemonade Stand.
Would you like to buy lemons?(Yes=1,No=0)
0
Would you like to buy sugar?(Yes=1,No=0)
1
How many bags of sugar do you want to buy?
1

Here is today’s weather forecast:
It is warm and sunny with medium winds.

How many cents will you sell a cup of lemonade for today?
40
You sold 2 cups of lemonade today.

Status report for day 5:
————————-
Cash Left: $13.00
Bags of Lemons Left: 1.92
Bags of Sugar Left: 2.56

This is Day #6 for your Lemonade Stand.
Would you like to buy lemons?(Yes=1,No=0)
1
How many bags of lemons do you want to buy?
1
Would you like to buy sugar?(Yes=1,No=0)
0

Here is today’s weather forecast:
It is cloudy with a high chance of rain.

How many cents will you sell a cup of lemonade for today?
35
You sold 10 cups of lemonade today.

Status report for day 6:
————————-
Cash Left: $13.00
Bags of Lemons Left: 2.62
Bags of Sugar Left: 2.16

This is Day #7 for your Lemonade Stand.
Would you like to buy lemons?(Yes=1,No=0)
0
Would you like to buy sugar?(Yes=1,No=0)
0

Here is today’s weather forecast:
It’s a perfect beach day. Sunny and hot!

How many cents will you sell a cup of lemonade for today?
40
You sold 44 cups of lemonade today.

Status report for day 7:
————————-
Cash Left: $30.60
Bags of Lemons Left: 1.30
Bags of Sugar Left: 0.40

This is Day #8 for your Lemonade Stand.
Would you like to buy lemons?(Yes=1,No=0)
0
Would you like to buy sugar?(Yes=1,No=0)
0

Here is today’s weather forecast:
It is partly sunny with low humidity.

How many cents will you sell a cup of lemonade for today?
20
You sold 9 cups of lemonade today.

Status report for day 8:
————————-
Cash Left: $32.40
Bags of Lemons Left: 1.03
Bags of Sugar Left: 0.04

This is Day #9 for your Lemonade Stand.
Would you like to buy lemons?(Yes=1,No=0)
1
How many bags of lemons do you want to buy?
1
Would you like to buy sugar?(Yes=1,No=0)
1
How many bags of sugar do you want to buy?
1

Here is today’s weather forecast:
It is warm and sunny with medium winds.

How many cents will you sell a cup of lemonade for today?
25
You sold 25 cups of lemonade today.

Status report for day 9:
————————-
Cash Left: $33.15
Bags of Lemons Left: 1.28
Bags of Sugar Left: 0.04

This is Day #10 for your Lemonade Stand.
Would you like to buy lemons?(Yes=1,No=0)
0
Would you like to buy sugar?(Yes=1,No=0)
0

Here is today’s weather forecast:
It is partly cloudy and windy.

How many cents will you sell a cup of lemonade for today?
35
You sold 0 cups of lemonade today.

Status report for day 10:
————————-
Cash Left: $33.15
Bags of Lemons Left: 1.28
Bags of Sugar Left: 0.04

You made a profit of $13.15 on your Lemonade Stand!

Programming Project 1237582927

March 20th, 2009 No comments

Objectives
1. Review use of if statements and loops.
2. Learn how to write functions given specifications.
3. Learn how to use pass by reference variables.
4. Learn how to put together a useful program given a skeleton of that program and the
functions and their specifications necessary in the implementation.

Problem: Lemonade Stand
Last summer your friend has a lemonade stand and made lots of money. You want to do the same! You have plenty of time to plan, so you thought you would be pre
pared when summer came around by writing a program to simulate your lemonade stand. The basic idea behind the simulation is as follows:

1) You will simulate 10 days of running the lemonade stand.
2) In the beginning the user gets a $20.00 loan to run the lemonade stand.
3) Before each day, the user gets an opportunity to buy bags of lemons and sugar.
4) At the beginning of each day the user receive a weather report.
5) Based on that, the user is asked to price a cup of lemonade for that day.
6) Then, the days sales are simulated. (Part of this is written for you.)
7) Afterwards, the user is prompted with a status report of how much money they have left and how many bags of lemons and sugar they have left.

What you have to do
A skeleton of the solution for this assignment is posted on WebCourses and the course web page. Please use this skeleton. You must fill in the seven functions that are left for you to fill in, as well as write the remainder of main so the program works as described above. After you write each function, you should test it before moving on. How to do this will be covered in class. Then, write your main, calling the necessary functions from it to achieve the desired functionality. main can work without declaring any new variables than the ones already declared. But, you may declare new ones if you wish.

Perhaps the biggest problem you will have will be not knowing when to make function calls. The goal of having these functions is to make the coding process more manageable. In particular, it is possible that a function might “do” something complicated, but that just really means that function makes calls to other functions that carry out a majority of that work already. In essence, if you write a function A to do a task, then don’t write out the code that also does that task in another function B. Instead call the function A from the body of function B.

References
Textbook: Chapters 9, 10, 11 Notes: Lectures 13, 14, 15, 17

Output Sample
Two full output samples of the program running will be provided on Webcourses and the course web page in the files lemonade.out and lemonade2.out.

Deliverables
You must submit your solution to the problem, lemonade.c, over WebCourses.

Restrictions
Although you may use other compilers, your program must compile and run using DevC++. Please use DevC++ to develop your program. Your program should include a header comment with the following information: your name, course number, section number, assignment title, and date. Also, make sure you include ample comments throughout your code describing the major steps in solving the problem.

Grading Details
Your program will be graded upon the following criteria:

1) Your correctness
2) Your programming style and use of white space. (Even if you have a plan and your program works perfectly, if your programming style is poor or your use of white space is poor you could get 10% or 15% deducted from your grade.)
3) Compatibility to DevC++. (If your program does not compile in this environment, you will get a sizable deduction from your grade, likely to be over 50%)

please it has to be in pure c not c++

Bear