Question: b News Online C Compil Files Lab 4.pdf Lab 4.pdf Download Lab 4.pdf (48.1 KB) ZOOM + For each program, you will be submitting the

 b News Online C Compil Files Lab 4.pdf Lab 4.pdf Download
Lab 4.pdf (48.1 KB) ZOOM + For each program, you will be

b News Online C Compil Files Lab 4.pdf Lab 4.pdf Download Lab 4.pdf (48.1 KB) ZOOM + For each program, you will be submitting the java code file through MyClasses, as you did for the previous labs. Before you write your program think about the following questions: 1. Write a program to calculate the salary paid to a salespersons at a car dealership. The salary is calculated using the following rules: (a) If an employee has worked there for less than 5 years, the salary consists of only the commission amount (b) If an employee has worked there for more than or equal to 5 years, the salary consists of a base salary of $10,000 and the commission amount. The following is a list of commission rates: Sales Amount Commission Rate $0.00 to $15.000 10% $15,001 to $60,000 15% Over $60,000 33% The program should read in a salesperson's first name, last name, the length of employment in years, and the sale amount in dollars from the user. It should then calculate the appropriate commission for this person. Lastly, display the first name, last name and total salary amount in a nice format. 2. How many times do you have to roll a pair of die before they come up snake eyes (both die The program should read in a salesperson's first name, last name, the length of employment in years, and the sale amount in dollars from the user. It should then calculate the appropriate commission for this person. Lastly, display the first name, last name and total salary amount in a nice format. 2. How many times do you have to roll a pair of die before they come up snake eyes (both die roll a one)? Write a program that simulates rolling two dice and report the number of rolls that it makes before getting snake eyes. (a) Use the Math.random() function to generate a random number on two die. (b) Consider how to structure the main loop of the code. How will it check for snake eyes? (c) Make sure to reroll the dice every time the loop runs, so that the program doesn't run forever! In addition to looking for snake eyes, report a message when the dice roll is "boxcars" (both roll six) or "Yo leven" (one five and one 6)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!