Specialty Forums
Security and Virus
General Hardware
CPUs/Overclocking
Networking
Digital Photo/Video
Office Software
PC Gaming
Console Gaming
Programming
Database
Web Development
Digital Home

General Forums
Windows XP
Windows Vista
Windows 95/98
Windows Me
Windows NT
Windows 2000
Win Server 2008
Win Server 2003
Windows 3.1
Linux
PDAs
BeOS
Novell Netware
OpenVMS
Solaris
Disk Op. System
Unix
Mac
OS/2

Drivers
Driver Scan
Driver Forum

Software
Automatic Updates

BIOS Updates

My Computing.Net

Solution Center

Free IT eBook

Howtos

Site Search

Message Find

RSS Feeds

Install Guides

Data Recovery

About

Home
Reply to Message Icon Go to Main Page Icon

C++ Urgent Help Needed

Original Message
Name: Black_Pelican
Date: January 3, 2008 at 23:02:33 Pacific
Subject: C++ Urgent Help Needed
OS: Windows XP SP2
CPU/Ram: 4 CPU 3.2Ghz .98Gb of RAM
Model/Manufacturer: Gateway/9310S
Comment:
I have signed up for high school online c++ courses, which has proven to be a mistake, due to my inability to grasp the content. I would like to keep learning, but as the semester draws to an end, I must catch up on my work. This is a project I desperately need help on.

*******************************************

* Program should ask users how many apples and oranges they want to buy.
* Apples cost $1.00 and Oranges cost $1.50.
* Today's Special! Apples are 2 for 1. Buy one get one free! (1 apple = $1.00, 2 apples = $1.00, 3 apples = $2.00, 4 apples = $2.00, etc.)
* Another Special! How ever many oranges you buy will give you the same number of percentage off your total bill. (If you buy 10 oranges you get 10% off your total bill.) (For now, ask the user to enter a number between 1 and 100. If they don't the numbers will not make sense. Later we will learn how to capture user input errors.
* If you have bought 2 apples = $1.00 and 10 oranges = $15.00 your total bill would be $16.00. But you get 10% off! (use percentage/100*amount = discount amount) 10% of $16.00 = (10/100) * 16.00 = $1.60 discount. Total bill = $16.00 - $1.60 = $14.40
* Your program should tell the user how much they owe.

Other things to keep in mind:

* Use one function to calculate the price of the apples and another function to calculate the price of the oranges.
* If you have programmed before, do not use the If statement. You should be able to program this project without using the If statement (We'll learn about the If statement in the next workshop.)

When you are finished:

* Submit the .cpp source file, .exe file and code file to your instructor.
* Put your name in a comment at the top of the file, followed by the name of the program.

Evaluation Criteria

Your project will be evaluated using the following criteria:

1. The program compiles/builds successfully, runs normally (no runtime errors or unnecessary delays), and exits normally.
2. The program asks how many apples you want and receives keyboard input.
3. The program asks how many oranges you want. It explains that a number between 1 and 100 is required. It receives keyboard input.
4. The program outputs the correct amount of money.
5. The program uses one function to calculate the price of the apples and another function to calculate the price of the oranges.
6. The program does not use the If statement.
7. The program is easy to use.
8. The program does not perform unnecessary tasks.
9. The source code is contained in one file and is not unnecessarily long.
10. The source code utilizes white space properly and consistently to enhance legibility.
11. The variable/function names are chosen and typed/written in a way that clearly explains their purposes. The naming style is consistent throughout the whole program.
12. The source contains effective, consistent comments, especially near any complex or obscure sections of code.


***************************************

What I mostly do not understand is how to program the 2 for one deal, but programming as a whole i don't understand well. I can scrape by the quizzes, but if someone could help me on this project I would be EXTREMELY grateful.


Report Offensive Message For Removal


Response Number 1
Name: Razor2.3
Date: January 4, 2008 at 19:11:27 Pacific
Subject: C++ Urgent Help Needed
Reply: (edit)
What do you have so far?

Report Offensive Follow Up For Removal




Use following form to reply to current message:

   Name: From My Computing.Net Settings
 E-Mail: From My Computing.Net Settings

Subject: C++   Urgent Help Needed

Comments:

 
  Homepage URL (*): 
Homepage Title (*): 
         Image URL: 
 


Data Recovery Software




Slow boot time

Trasnferring Documents from old HD

My k8T Neo-v usb's aren't working!

Date Modified = Date Created Time

system files on removable harddrive


The information on Computing.Net is the opinions of its users. Such opinions may not be accurate and they are to be used at your own risk. Computing.Net cannot verify the validity of the statements made on this site. Computing.Net and Computing.Net, LLC hereby disclaim all responsibility and liability for the content of Computing.Net and its accuracy.
PLEASE READ THE FULL DISCLAIMER AND LEGAL TERMS BY CLICKING HERE

All content ©1996-2007 Computing.Net, LLC