Question
Project Iteration 02 Implement a Solution: Ride Share Program Goals: • Implement structured programming using the C language and continue building a foundation in programming fundamentals • Understand and implement secure coding practices. . • • Implement, and evaluate a computing-based solution to meet a given set of computing requirements (ABET standard 2) Communicate effectively in a variety of professional contexts - written. (ABET standard 3) Apply computer science theory and software development fundamentals to produce computing-based solutions. (ABET standard 6) Effort: Individual (Academic Integrity) • Reminder if you share work/code/solutions or use someone else's code you will receive a 0 and be reported to the CS chair and UCCS Dean of Students Do not use Al tools Points: 100 (Can be turned in up to 24 hours late for 10% deduction) Read Rubric in canvas Due date: Look in canvas Deliverables: • • Reflection and Learning in separate document that contains questions and answers but not the original document. lastnameFirstInitial_project.c file. Submit spreadsheet for project plan Submit files separately and not in a zip file. Description Problem statement: Requirements User Story1: RideShare Admin Login User Story2: Admin RideShare Set Up User story 3: Rider Mode User Story 4: UCCS Ride Share Admin Report Mode Specification: Learnings and Reflection Description To demonstrate ability to implement a solution that is readable, maintainable, testable and flexible using c concepts learned in class so far. Create a project plan of dates you will work on different parts. ● Highlight when you complete part of the assignments so you can track your progress compared to the deadline. Try to submit a day early. ● Ask clarifying questions if something doesn't make sense. Make sure you keep you commit your versions locally and push them to github often. You can also keep your documents in github so they are versioned too. Problem statement: Your company wants to provide ride sharing for ride share companies. You are hired to make a program for the ride share businesses. For example, here is some information on how Lyft/Uber calculate ride fares. First the administrator will log in to set up the rideshare information. After the administrator sets up the information they will be logged out and the ride share mode will take riders until the admin shuts down the program with sentinel value and successful login. The program will provide survey data and a calculated fare for all riders and track all the fare details for each driver. After the admin shuts down the program a summary for that business will be printed. The pricing is based on the following formula. If the ride cost doesn't meet a certain minimum rate a flat rate ride fare will be charged. Base (or initial) fare – A flat fee charged at the beginning of every ride Cost per minute – How much you are charged for each minute you are inside the ride - Cost per mile – How much you are charged for each mile of the ride - Minimum flat rate - minimum charge for any ride Ride Fare = = Base Fare + (Cost per minute * time in ride) + (Cost per mile* ride distance) If the ride fare is less than the minimum flat rate, customers will be charged that flat rate. To simulate the ride miles and time the rider will enter the number of miles needed to get to destination. The program will calculate a random number based on the miles for the number of minutes the ride took. Random minutes based on number of miles formula: Min minutes = 1.2 * miles Max minutes = 1.5 * miles Generate random integer between min and max minutes Example Values Pricing Base (or initial) fare = 1.8 Cost per minute = .25 Cost per mile = 1.2 Minimum flat rate = $20 Miles to destination for rider Miles = 10 Find random integer between Min minutes 12 = 10 * 1.2 Max minutes 15 = 10 * 1.5 Estimated Ride Minutes (Integer Randomly generated by computer) = 13 Calculated Ride Fare $17.05 = 1.8 + (.25 *13) + (1.2 * 10) Ride Fare Amount = $20 Requirements User Stories and Acceptance Criteria for Iteration 02 User Story1: RideShare Admin Login As a rideshare admin I want to be able to log in so I can securely access my account. For example the user id and passcode • User id is "id1" User passcode is "abcd" Acceptance criteria 1.1 Get Correct Id and Password within 4 attempts. • Display: "Admin Login" ○ Prompt "Enter your Admin id." О Prompt "Enter your Admin passcode." If id and pass code are both correct go to user story 2 to enter rideshare details If the id and password are not correct repeat prompts. After 4 incorrect attempts the program displays "Exiting RideShare" and the program ends. User Story2: Admin RideShare Set Up As the admin I want to be able to enter the rideshare company details so the program can calculate the rideshare. ExampleRideShare Information entered by admin so ride fare can be calculated. baseFare = 1.8 costPerMinute = .25 costPerMile = 1.2 minFlatRate = 20.0 All the input will be validated to make sure the values for any of the above are from a calculation min of .1 to a calculation max of 50 currently. Acceptance Criteria Display "Set up rideshare information" 2.1 Get base fare “Enter the base fare”. ●• If it is not a valid number or not in range, display an error such as “Error: Enter a number from [MIN_SET_UP] to [MAX_SET_UP]" and repeat the prompt until valid. 2.2 Get Cost Per Minute "Enter the cost per minute”. • If it is not a valid number or not in range, display an error such as “Error: Enter a number from [MIN_SET_UP] to [MAX_SET_UP]" and repeat the prompt until valid. 2.3 Get Cost Per Mile "Enter the cost per mile". If it is not a valid number or not in range, display an error such as "Error: Enter a number from [MIN_SET_UP] to [MAX_SET_UP]" and repeat the prompt until valid. 2.4 Get Minimum Flat Rate “Enter the minimum flat rate”. ● If it is not a valid number or not in range, display an error such as “Error: Enter a number from [MIN_SET_UP] to [MAX_SET_UP]" and repeat the prompt until valid. 2.5 Get the RideShare Organization name ● No validation needed. 2.6 Display Rideshare Details Example [RideShare Organization Name] baseFare = 1.8 costPerMinute = $.25 costPerMile = 1.2 minFlatRate = $20.00 Exiting Admin Mode User story 3: Rider Mode As a riderl want to be able to get a ride using a rideshare so I can get to my destination. As a rider I would like to see ratings of the rideshare to assist in determining if I want to use that ride share. As a rideshare company owner I want to analyze the rider ratings to see how I can improve the experience to get more riders. Acceptance criteria 3.1 Display "Welcome to the [RideShare Organization Name]. We can only provide services for rides from 1 to 100 miles." Then display rideshare ratings collected so far Example rating RideShare Organization [Name] Ratings" Survey Results (if none entered yet) No Ratings Currently Survey Results (if any entered so far list only the amount entered) Rating Categories: Survey 1: 1. Safety 1 Survey 2: 4 Survey 3: 3 Survey 4: 5 2.Cleanliness 4555 5 5 3. Comfort 1324 3 Survey 5: 3 5 2 3.2 Prompt to verify yes or no: "Do you want to request a ride from RideShare Organization Name]?" Display error and repeat prompt if not valid input y/Y or n/N. “You did not enter a y or n." When n/N entered go back to 3.1 above for the next customer. ● When y/Y entered go to 3.3. 3.3 Get the number of miles, Enter the number of miles to your destination.” Repeat prompt until a valid number (decimal number) is entered. • If the number is not a valid number greater then display error “Error: you didn't enter the number of miles correctly." Repeat the prompt. Here are the criteria о О Greater than or equal to minimum number of miles of 1 Less than or equal to the maximum number of miles of 100 NOTE: You can accept 40f as a valid value since scanf will read the 40 and leave the f character in the buffer. If the sentinel value is entered Prompt for the admin to log in. Do not shut the rider mode down until they log in. If the rideshare admin correctly logs in with id and passcode within the number of attempts listed in user story 1 the program will display “Admin shutdown. Exiting RideShare Mode" go to user story 4.1 to display report. If the rideshare admin does not enter the correct id and passcode within the number of attempts listed in user story 1 the program goes to 3.1 for the next rider. You do not want to shut down the rider mode unless the admin was able to log in. If the number is valid then ○ Display number of estimated minutes (randomly created) ○ Min minutes = 1.2 * miles ◉ Max minutes = 1.5 * miles Generate random number between min and max minutes Calculate the charge based on formula Display ride fare charge Go to 3.4 3.4 Prompt to verify yes or no: “Do you want to rate your rideshare experience?" ● • Display error and repeat prompt if not valid input y/Y or n/N. “You did not enter a y or n." When n/N entered о Display "Thanks for riding with us" Go back to 3.1 for the next rider When y/Y entered Example ○ Get ratings from the rider where the rider enters a valid rating from rating min to rating max for each category in the survey. ○ Once all ratings are entered go back to 3.1 for the next rider. "We want to know how your experience was on your ride today. Using the rating system 1 to 5 enter your rating for each category: 1. Safety 2.Cleanliness 3. Comfort