CSCE Homework Help

profilentiwari20
MeanGreenEagleLiftSystem.pdf

Mean Green EagleLift System

Assignment: Homework 2 Course: CSCE 1040 Date: 02-16-2020

Name: Nischal Tiwari Professor: Dr. David Keathley

Class Relationships

Collects Collects Collects

Pickups Contains

Class Contents

Drivers Passengers Rides

Driver Passenger Ride

Driver

ID (int)

First Name (char)

Last Name (char)

Vehicle Capacity (int)

Handicap Check (bool)

Vehicle Type (char)

Driver Rating (float)

Availability (bool)

Pets Allowed (bool)

Notes (string)

Set/get ID

Set/get First Name

Set/get Last Name

Set/get Vehicle Capacity

Set/get Handicap Check

Set/get Vehicle Type

Set/get Driver Rating

Set/get Availability

Set/get Pets Allowed

Set/get Notes

Passenger Name (string)

ID (int)

Payment (char)

Handicap Check (bool)

Rating (float)

Pets (bool)

Set/get Name

Set/get ID

Set/get Payment

Set/get Handicap Check

Set/get Rating

Set/get Pets

Ride

Ride ID (int)

Pickup Location (string)

Pickup Time (string)

Drop-off Location (string)

Size of Party (int)

Includes Pets (bool)

Drop-off Time (int)

Ride Status (char)

Rating (float)

Set/get Ride ID

Set/get Pickup Location

Set/get Pickup Time

Set/get Drop-off Location

Set/get Size of Party

Set/get Includes Pets

Set/get Drop-off Time

Set/get Ride Status

Set/get Rating

Function Pseudo Code: Add Driver Prompt user for ID Prompt user for First Name Prompt user for First Name Prompt user for Vehicle Capacity Prompt user for Handicapped Check Prompt user for Vehicle Type Prompt user for Availability Prompt user for Pets Policy Prompt user for Notes Create Driver Object Populate Driver Object Add object to collection

Edit/Delete Driver Prompt user for Driver ID Search the driver by ID

If it matches drivers ID

Drivers

Count (int)

Driverslist (vector)

Add Driver

Edit Driver

Delete Driver

Search Driver

Print Driverlist

Print Details (all)

Print Search Driver

Passengers

Count (int) Passengerslist (vector) Add Passenger Edit Passenger Delete Passenger Print Passengerslist Print Entries

Rides

Count (int)

Rideslist (vector)

Add Ride

Edit Ride

Delete Ride

Search Ride

Print Rideslist

Print Search Ride

Print Status

Print Rides (Passenger,

Driver)

Print details Prompt user for Edit or Delete

If they want to Edit Print Driver’s details and Prompt user for editing details If they want to Delete

Prompt user for confirmation Populate and update the details to Driver object

Add Passenger Prompt user for Name Prompt user for ID Prompt user for Payment Preference Prompt user for Handicapped Prompt user for Rating required Prompt user for Pets Create Passenger object Populate Passenger object Add object to collection

Edit/Delete Passenger Prompt user for Passenger ID Search the passenger by ID

If the search matches ID Print the details Prompt user for Edit or Delete If they want to Edit Print Passenger details and Prompt user for editing details If they want to Delete Prompt user for confirmation Populate object Update the details to the Passenger object

Add Ride Auto-assign Ride ID Prompt user for Pickup Location Prompt user to select the Driver Prompt user for Pickup Time

If the time entered by passenger is not available Print and Prompt user to select a different option; Re-enter the time for pickup Select a different Driver

Prompt user for Drop-off Location Prompt user for Size of Party

If the Size of Party entered by the user is not valid Print and Prompt user to select a different option; Re-enter the size of party Select a different Driver

Prompt user for Pets If Pets entered not available or valid Print and Prompt user to select a different option; Enter the value again Select a different Driver

Print if the selected driver has handicapped capability If the handicapped capability is not available according to the passenger’s preference Prompt the passenger to select a different driver

Create the Ride object Populate the Ride object Add object to collection

Edit/Delete Ride Prompt user for Ride ID Search Ride by ID

If the ride matches the ID Print details for the ride

Prompt user for Edit or Delete If they want to Edit Print the ride details and Prompt user for editing the details If they want to Delete Prompt user for confirmation

Update the details to the Ride object

Complete Ride Prompt user for the Ride ID Prompt user for the Passenger ID Prompt user for completion Find ride by ride ID Search ride by Passenger ID Search all ride by both ID

If they both matches Print details for the completed ride

Prompt user for drop-off time Prompt user for rating Populate the object Update details to the Ride object

Cancel Ride Prompt user for Ride ID Prompt user for Passenger ID Prompt user for cancellation Find ride by ride ID Search ride by Passenger ID Search all rides by both ID

If they both matches Print details

Prompt user for confirmation Update details to the ride object

Print Rides for particular Passenger Prompt user for the Passenger name Prompt user for the Passenger ID Find Rides by Name Search all rides (by Passenger ID)

If passenger ID matches Print ride details

Print Rides for particular Driver Prompt user for the Driver name Prompt user for the Driver ID Find rides by Name Search all rides (by Driver ID)

If driver ID matches Print ride details

Print Rides by Status Prompt user to choose status (Active, Completed and Cancelled) Search all by status

If matches Print the detail