Concept explainers
The CarMin dealership has approached you to write a program to keep track of the sales commissions paid to the sales team each time they sell a used car. The amount of the commission that a salesperson earns is based on the type of vehicle sold. Currently CarMin is trying to incentivize it salesforce to try
and sell Hybrids and SUVs because these vehicles generate the most profit within the dealership. vehicle types have the highest commissions.
These
Vehicle Type |
Bonus Commission |
Hybrid. 4.0% of Selling Price
Coupe. 1.5% of Selling Price
Sedan. 1.5% of Selling Price
SUV 3.0% of Selling Price
Minivan 2.5% of Selling Price
Create a program for use by the sales manager to track commissions by vehicle type. It is unknown how many cars the dealership will sell in a given month. The program should allow the manager to continuously enter a vehicle type and selling price each time a vehicle is sold. You must validate the vehicle type and selling price using appropriate validation. If any validations fails you should provide an error message and re-prompt the manager.
Once the manager has indicated they are finished entering sales, display a well-formatted report containing a list of each vehicle type along with:
-
total sold
-
total sales
-
total commissions earned
-
average commission earned.
Sample Output:
Other Requirements:
-
Your solution must demonstrate the concept of one-dimensional arrays.
-
Your solution must not use methods other than main. They are not required for this assignment.
-
Your solution must not import any Java library other than JOptionPane, including
java.util.Arrays.
-
Your solution must contain appropriate validation. Try to think about what might be considered
appropriate as you are designing your solution beyond what has already been explicitly
provided.
-
Your solution may not use any functions or language constructs not covered during this
semester’s IT 106 without prior authorization from your instructor, even if you know other functions or language constructs. We want everyone to be on the same "playing field", regardless of previous programming exposure, and get practice with algorithmic design to solve problems (the intent of the course). Using something existing not discussed in class does not give you as much practice as solving the problem yourself. Doing this may lead to a substantial grade penalty, a grade of zero, or an Honor Code inquiry. When in doubt, ask!
-
1) Create a defining diagram that shows the input, processing, and output
-
2) Create a solution
algorithm using pseudocode -
3) Show testing using the desk checking table method, to include test data, expected results, and a desk checking table. Make sure your desk checking considers multiple cases including both valid and invalid test data to prove your algorithm will work in all cases
Trending nowThis is a popular solution!
Step by stepSolved in 2 steps
- In python Expense tracker: the user should be able to enter expenses per category (food, clothing, entertainment, rent, etc) and the application should track the expenses per week or month. The user should be able to see their total expenses for a month of their choice for each category and a total monthly expense. The monthly expense report should include average expenses for each category for the year and indicate if the user expense for the month selected is lower or higher than the annual average. Also, the report should display the percentage of expenses from each category out of the total monthly expenses. Project application requirements: Requirements description Basic Points: * Project should have a functioning menu * Project should have adequate functions (minimum 3 functions) * Project should make use of files to save the data * Project should handle adequate exceptions * Project should display information formatted adequately * Project should make use of lists or…arrow_forwardSoftware Requirement Engineering Question: Draw a use case diagram for “Get a Cab” application ‘Get a Cab’ is a Smartphone application. It will search cabs for the passenger, provide them with security by reminding them about their luggage and it will also allow the user to inform the police with the help of a one-click button. This application facilitates the guardians to trace the location of their loved ones. It also lets passengers locate a driver at any instance to overcome all time related issues. If the passenger wants to avail the services of the same driver in future, he/she can add the driver to the favorite list, stored in the application. Write a detail use case for “Search a Cab” function. For searching a cab, the passenger would enter his/her source and destination information and the application would list down all the available cabs in a 1km radius. If application unable to find cab within 1km radius passenger can increase the radius up to 3 km. The passenger would…arrow_forwardYou are about to embark on a trip. You know your start and finish locations. However, you have not settled on a formal route for the trip. You will use Google Maps for your trip. To help make the decision, we will create a trip planning report. The user will enter three alternate routes for the trip which will have different mileages but will use the same starting and finishing locations. This program can be used to create a trip report regardless of the mileage of the trip.The input menus will not specify the route, but will:• Show a descriptive route name• A mileage value• An estimated time (to the nearest decimal - remember, 6 minutes, is 1/10 of an hour- The user may adjust the time if they wish ) from Google Maps.• If the route is expected to have any direct route expenses (tolls, ferries, etc.)• A default valueMenu example:• Menu 1 - Tampa, Florida via I-75 | 1067.00 |15.33 | N• Menu 2 - Tampa, Florida via I-77 | 1028.00 | 15.33 | N• Menu 3 - Tampa, Florida via I-65 | 1124.00 |…arrow_forward
- Problem #1: How much should I study outside of class? Issue: Your fellow students liked the previous version of study hour’s application and want to expand it again by adding the features listed below. Minimum Study Hours per Week per Class Grade15 A12 B9 C6 D0 F Project Specifications: The program asks the user their name, employee id, and department. The program also asks the user who they are creating the report for, their employee id, and the department they work in. (hint #1 & 2 are instances of a class – A class must be created and used within the program)The menu driven program has the following options:Determine Hours to StudyDetermine Grade Display Averages and TotalsQuit The user can select any menu option in any order they want. For example:The user can start the program run option A, then option C, then option B, then option D. They restart the program, run option C, then D. They restart the program, run option A, then D. They restart…arrow_forwardA retail company assigns a $5000 store bonus if monthly sales are $100,000 or more. Additionally, if their sales exceed 125% or more of their monthly goal of $90,000, then all employees will receive a message stating that they will get a day off. Step 3: Complete the pseudocode by writing the missing lines. When writing your modules and making calls, be sure to pass necessary variables as arguments and accept them as reference parameters if they need to be modified in the module. (Reference: Writing a Decision Structure in Pseudocode, page 118). Module main () //Declare local variables Declare Real monthlySales //Function calls Call getSales(monthlySales) ______________________________________________________ ______________________________________________________ End Module //this module takes in the required user input Module getSales(Real Ref monthlySales) Display “Enter the total sales for…arrow_forwardInstructions This assignment uses the logic from the recent quiz and assignment. You can see some of that code in there.What is different? The sequence of operations, spending and finding money, is totally controllable with buttons.This makes the program very flexible. Update the Code below with the following: Add 2 new event functions: buyTortilla() and addFoundMoney(). Add 2 new buttons that trigger buyTortilla() and addFoundMoney(). STARTER CODE <!DOCTYPE html><html><head><style>p {font-family: arial; font-size: 20px;} </style></head><body> <button onclick='buyApple()'>Purchase Appple</button><button onclick='buyOrange()'>Purchase Orange</button> <!-- This marks space for a paragraph that we can update during the program --><p id="balance"></p> <script>// javascript code begin// Step 1. initialize variables:change=100 // starting balanceapple=10 // price of 1 appleorange=20 // price of 1…arrow_forward
- A retail company assigns a $5000 store bonus if monthly sales are more than $100,000; otherwise a $500 store bonus is awarded. Additionally, they are doing away with the previous day off program and now using a percent of sales increase to determine if employees get individual bonuses. If sales increased by at least 4% then all employees get a $50 bonus. If they do not, then individual bonuses are 0. Step 4: Write a module that will ask the user to enter the percent of sales increase in decimal format. This module will have to accept salesIncrease as a reference. Complete the missing lines. //MODULE 3 //this module takes in percent of increase in decimal //format such as .02 for 2 percent. Module getIncrease(Real Ref _________________) Display “________________________________________.” Input ___________________________________________ End Modulearrow_forwardWith clear comments in visual studio.arrow_forward// Global constant for calories per minute Constant Real CALORIES_PER_MINUTE = 3.9 // main module Module main() // Local variables Declare Real calories_burned Declare Integer minutes // Set calories burned For minutes = 10 to 30 step 5 Call setCalories(minutes, calories_burned) // display values Call showCalories(minutes, calories_burned) End For End Module // The setCalories module calculates number of calories // from a particular number of minutes. Module setCalories (Integer minutes, Real Ref calories_burned) Declare Real fminutes // some languages require matched type variables for calculations // this expression changes an Integer to a Real type Set fminutes = minutes // variables are now all of the same type Set calories_burned = fminutes * CALORIES_PER_MINUTE End Module // The showCalories module accepts minutes and calories burned // as arguments and displays amounts Module showCalories (Integer minutes, Real calories_burned) Display…arrow_forward
- The Goal: Like the title suggests, this project involves writing a program that simulates rolling dice. When the program runs, it will randomly choose a number between 1 and 6. (Or whatever other integer you prefer — the number of sides on the die is up to you.) The program will print what that number is. It should then ask you if you’d like to roll again. For this project, you’ll need to set the min and max number that your dice can produce. For the average die, that means a minimum of 1 and a maximum of 6. You’ll also want a function that randomly grabs a number within that range and prints it. Concepts to keep in mind: Random, Integer, Print, While Loopsarrow_forwardPlease help me write a program code for this project*Game design*creating a game.*Project description*:1. The game should ask the number of participants, then generate a random number which is stored in memory. The program should ask player 1 to enter a number of his choice. Then subtract that number from the number that was randomly generated by the computer. If the result of the operation is <0, player 1 loses. If the result is >= 0, the program should ask the next player to choose a number. The same operation is now performed on the number entered by player 2 which is then subtracted from the remainder after the operation carried out by player 1 and if the result is <0, player 2 loses else, the program continues until we have a loser. *Note* The program should generate random numbers from 0 - 100 inclusive and the program is not supposed to display the result of the operation.arrow_forward
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education