Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

must be using c not c++ Task 1(Read Properly): You have to write a simple ride sharing (like Uber or Pathao) program in C language,

image text in transcribed

must be using c not c++

Task 1(Read Properly): You have to write a simple ride sharing (like Uber or Pathao) program in C language, but a miniature version. There are three types of transportation options - car, motorcycle and bicycle. The bill is calculated as follows: 1. Base fare (Every ride starts with this amount): a. Car: 50 Taka b. Motorcycle: 30 Taka c. Bicycle: 20 Taka 2. Distance fare: a. Car: 25 Taka/km b. Motorcycle: 15 Taka/km c. Bicycle: 10 Taka/km 3. Duration fare: 2 Taka/minute 4. Total fare = Base fare + Distance fare + Duration fare 5. Promo fare: Promo code is applied on the total fare. There can be two types of promo: 1. Flat: flat 50 taka discount 2. Percent: 10% discount Let's assume that we live in an ideal city where the vehicles move in a constant speed. . . Car: 60km/hour Motorcycle: 70km/hour Bicycle: 20km/hour . Input/Output: 1. User chooses a transportation option 2. User chooses the distance he/she wants to travel 3. The duration is calculated automatically. 4. Based on the user's chosen promo code, the promo fare is calculated. 5. At the end, user can see the grand total fare with break down as follows: Base fare: b taka Distance fare: d taka (dd KM) Duration fare: u taka (uu minutes) Total fare: t taka Promo fare: p taka (pp% or pp taka)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Put Your Data To Work 52 Tips And Techniques For Effectively Managing Your Database

Authors: Wes Trochlil

1st Edition

0880343079, 978-0880343077

More Books

Students also viewed these Databases questions

Question

describe the stages involved in human resource planning

Answered: 1 week ago

Question

What are the best practices for managing a large software project?

Answered: 1 week ago

Question

How does clustering in unsupervised learning help in data analysis?

Answered: 1 week ago

Question

LO1 Understand human resource management and define human capital.

Answered: 1 week ago