Simple code for my first programming class.
Objective To build a complete working Java program to apply variations on the selection control structure and basic error-testing Overview & Instructions Write a program that manages the rewards program for a credit card company. Your program will prompt the user (via dialog boxes) for four data items. First, prompt for the following three (monetary decimal) values related to monthly purchases made: Doubles Electronics (Computers, phones, tablets, etc.) Travel (Gasoline, air travel, etc.) General purchases . Next, prompt for one more (single character) data element: cherchen . Borb - for business Por p - for personal othing. The initial rewards to be returned to the customer will be based on the following: Type Reward Level Electronics 3% Travel 2% All General 1% This initial base reward amount to return will be these simple percentages multiplied by the respective purchase amounts Next, offer all personal customers a volume reward based on the total monthly purchases using the following scheme: Additional reward is ... 1% 2. If total purchase amount is ... Over $1000 but under $3000 $3000 to $5000 above $5000 2% 3%
For business customers, travel and electronic purchases are being promoted so the following scheme defines the volume reward: If sum of travel and electronic purchases is Additional reward is ... Over $5,000 but under $7,500 $7,500 to $10,000 0.5% 1% above $10,000 but not over $100,000 2% Over $100,000 5% Note that these additional volume awards are applied to the total monthly purchases of all categories and are then added to the initial rewards calculated by category. Random Number Add o Finally, a "random drawing" is to be included for personal customers only. Every 5th customer will receive a $25 reward. Your program is only processi one customer at a time, so to simulate this "drawing" a random number generator action must be included in your code to check for "one chance in five". If this chance selection matches, add $25 to the total reward. it bad Your program should include the following error-checking features: Purchase amounts (electronics, travel, and general) must all be zero or above Customer code must be only B or P input "please ron . For input validation, work to utilize "if" and "else" actions to bypass calculations and output for invalid user input. Avoid use of multiple "exit points" within your program (i.e. using [login to view URL](0)). Your output should be a clear, organized summary that includes the amount purchased in each category (i.e. the input values), the base reward amount the additional reward total, the reward received from the random drawing (but only if received), and final total reward. It should be formatted to dollar amounts labels and headings as appropriate. Finally, a programming note for String usage: Instead of if (aString == "B") use if ([login to view URL]("B")) To convert a String to a char, use: achar = [login to view URL](0);
14 фрилансеров(-а) готовы выполнить эту работу в среднем за $124
Hi I have a good skill in C/C++, C#, JAVA programing. I have finished many projects using C/C++, C#, JAVA. I can do it perfectly in your timeline. Let's discuss more details in private chat. Thanks.