[SOLVED] CS6310 Software Architecture & Design

$25

File Name: CS6310__Software_Architecture_&_Design.zip
File Size: 357.96 KB

5/5 - (1 vote)

CS6310 Software Architecture & Design
Assignment #3 [150 points]: Grocery Express Project Individual Implementation (v4) Fall Term 2022 Instructor:
Submission Deliverables
This assignment must be completed as an individual, not as part of a group.

Copyright By Assignmentchef assignmentchef

You must submit the following items in Canvas:
(1) A ZIP file named 2022-09-A3.zip that includes your source code. The structure of the zip file is shown in more detail below.
(2) An updated copy of the UML Design Class Diagram from the earlier assignment reflecting any problem requirement updates as described below, named class_diagram.pdf.
(3) A UML Sequence Diagram that captures the sequence of actions described below, named sequence_diagram.pdf.
You must notify us via a private post on Canvas and/or Ed Discussion BEFORE the Due Date if you are encountering difficulty submitting your project. You will not be penalized for situations where Canvas is encountering significant technical problems. However, you must alert us before the due date not well after the fact. You are responsible for submitting your answers on time in all other cases.
Please consider that uploading files to Canvas might occasionally take a long time, even in the case of seemingly relatively small submissions. Plan accordingly, as submissions outside of the Canvas Availability Date will likely not be accepted. You are permitted to do unlimited submissions, so we recommend you save, upload, and submit often. You should use the same file naming standards for the (optional) interim submissions that you do for the final submission.
General Intent
In the first phase of the Grocery Express Project, you were required to provide design artifacts to describe your approach to structuring the classes, attributes, operations, methods and relationships needed to simulate the problem. Now, you are required to provide a lightweight implementation of the system in Java that reflects your design.
You are required to demonstrate fundamental separation of classes in your source code indicative of a reasonable design. This means that your source code should show some indication of being divided up into classes, files, etc. that match your design. You will lose points if you submit poorly structured code.
And dont panic if you realize that your original design had flaws while working on this assignment this is common for agile styles of development. Make sure that your implementation works per these requirements and specifications and note your earlier design oversights with some brief comments in your code. Youre also being asked to provide improved design artifacts based on your revised and improved understanding of the problem space, and especially in light of the problem requirement changes included in this document.
We provide some examples of the expected input and output for a few test cases. You must provide the actual Java source code. We must also be able to recompile your application from your source code as part of the evaluation process.
Problem Scenario

Your requirements for the Grocery Express Project are continued here. Any requirements from the earlier assignments are carried over here unless explicitly modified and/or otherwise cancelled. If you feel that there are any conflicts between any of the earlier requirements and the more recent requirements, then please seek clarification immediately. In general, though, the newer requirements will take precedence.
This assignment involves implementing some of the core architecture and functional capabilities for the Grocery Express Project that you designed in the earlier assignments. Your system must implement the following functionality:
(1) Create stores and allow them to offer items for purchase.
(2) Create drones that can be used by stores to deliver orders.
(3) Create pilots who can be hired by stores and assigned to fly the drones.
(4) Create customers who can start orders and request items on those orders.
(5) Allow orders to be eventually purchased or cancelled by customers.
(6) Display various reports of the systems information (e.g., stores, customers, etc.) to view the systems state
and verify that the operations are working correctly.
The instructions below will provide more details about the specific functions, including input and output formats, that your system will need to implement. Your system does not have to provide a Graphical User Interface. At this point, we will evaluate your system based on the text-based output and the structure of the source code. Youll have ample opportunity to develop a more advanced interface during the group project.
Evaluation/Grading Your Submissions
Your submission will be evaluated based on four main areas:
(1) 20 points for your systems correctness: source code provided, the capability to recompile your code, etc.
(2) 40 points for correct operation of the system on the selected scenario (test) files
(3) 50 points for reasonably structured source code
(4) 40 points for your updated Class & Sequence diagrams
Dont lose sight of the goal for the course: there are many more potential improvements that you could make to this system, but you really need to think about how you will separate and distribute the complexity of the overall problem across separate classes; and, how the objects instantiated from those classes then communicate and collaborate to solve the problem. Helping you develop a solid structure for your design is the most important aspect of working on this assignment.
(1) 20 points for your submission correctness: the capability to recompile your code, etc. Common issues that cause you to lose points in this category:
The code doesnt function properly in docker during testing for example, JNI errors, etc.
Gross formatting errors weve designed the testing harness to be as robust as possible when processing
the submissions, but errors caused by including graphical displays of the space region, diagnostic output,
and other random messages will also cause you to lose points.
Formatting is important! Syntax is important! Use the matching characters for the output strings, and
dont put extra spaces between elements of the output strings. Strings that do not match the correct output because of formatting (syntax) errors might receive significant penalties.
(2) 40 points for correct operation of the system on the selected scenario (test) files

The test cases will be distributed across two categories: basic and advanced. The basic test cases will not cause/invoke any error conditions. The advanced test cases will likely cause one or more error conditions for each case. The score for this section will be determined by 80% of your systems success with the basic test cases + 20% of your systems success with the advanced test cases.
(3) 50 points for reasonably structured source code
The main issue that will cause you to lose points in this category is submitting poorly structured, possibly monolithic source code that doesnt display any indication of separation of responsibilities among classes, objects, etc. There isnt a specific set of objects that you must have, but you do need to display some significant effort to apply object-oriented analysis & design principles.
(4) 40 points for your updated Class & Sequence diagrams
The main issue that will cause you to lose points in this category is submitting Class & Sequence Diagrams that are inconsistent, and/or that dont reflect the latest changes to the problem requirements. For your Sequence Diagram, you only need to show the interactions required to successfully complete the following commands in your system:
start_order
request_item
purchase_order
transfer_order
You should create enough notional objects to demonstrate the messages and related data being shared to complete each of these operations successfully. They can be demonstrated as one connected sequence, or as individual separate sequences.
Input/Output & Command Formatting Requirements
We will test your program at this point using a relatively simple, text-based Command Line Interface (CLI) approach. The commands that we will use are listed below and your system is expected to follow the syntax of the commands as listed. Your program should accept input from a basic command (Terminal) interface please dont use any windows, third-party text-input libraries, etc.
The basic testing is focused on the best case/error-free use of the system. The test cases exercise the commands to ensure that the state of the system would be updated correctly for multiple object interactions. Advanced testing includes various circumstances that should not cause updates namely, error conditions such as undefined identifiers, duplicate identifiers, or violations of the logical (e.g., business-level) constraints defined in the problem scenario.
For the remaining phase of the project, the system must be able to process commands that are issued with erroneous data and display an appropriate message to the given error conditions. The use case below is based on the earlier best case/error-free use case, while also including erroneous commands to indicate how the system must respond. The annotations below are focused on the error messages and related details.
Welcome to the Grocery Express Delivery Service!
The following commands demonstrate a solid use case that exercises all the required functions with some sample data. We have also provided starter code that highlights the required syntax for the functions to include parameters positions and data types (all Strings or Integers). The code weve provided generates the welcome header and handles the stop command to cease execution of the loop. Otherwise, you must

generate the code to handle all the remaining commands to change and display information about the state of the system.
[1] Themake_storecommandmustcreateastorewiththeprovidednamethatcanbeusedtosellitems to customers, along with the stores initial revenue. The name of the store must be unique.
The OK message is used for commands that change the system state to acknowledge that it completed successfully.
> // create multiple stores
> make_store,kroger,33000
OK:change_completed
> make_store,kroger,37000
ERROR:store_identifier_already_exists
> make_store,publix,33000
OK:change_completed
Make stores that will sell items to customers. The store identifiers (e.g., kroger, publix) must be unique within the system.
[2] Thedisplay_storescommandmustdisplaytheinformationabouttheallthestoresthathavebeen created. Note that the OK message here is for commands that display information about the system state.
> display_stores
name:kroger,revenue:33000
name:publix,revenue:33000
OK:display_completed
Display the stores that have been created.
When displaying any information, the system must display the information in ascending alphabetical order based on the identifying values used. For example, if we created three stores with the names whole_foods, kroger and publix, then the associated records must be displayed in the order kroger, followed by publix, then followed by whole_foods. This applies to all the display commands listed here and below. This is important to ensure that your programs output matches the sequence of the expected test results consistently.
There are various ways to achieve the ordering, and you are welcome to use whichever one works best for you. One suggestion: while hash maps are generally well known to most programmers and software developers, you should also investigate Javas implementation of tree maps.
[3] Thesell_itemcommandmustaddtheitemprovidedtothecatalogofitemsavailabletobe requested and purchased from the store. The name of the store must be valid, and the item name must be unique within that store. The weight of the item will also be provided.
> // create multiple items to be sold by stores
> sell_item,kroger,pot_roast,5
OK:change_completed
> sell_item,kroger,cheesecake,4

OK:change_completed
> sell_item,publix,cheesecake,8
OK:change_completed
> sell_item,whole_foods,antipasto,10
ERROR:store_identifier_does_not_exist
> sell_item,kroger,cheesecake,3
ERROR:item_identifier_already_exists
Make items for the store to sell. The store identifiers must be valid (i.e., defined), and the item names (e.g., pot_roast, cheesecake) must be unique within the store where they are defined.
[4] Thedisplay_itemscommandmustdisplaytheinformationaboutalltheitemsthatareavailablefor request/purchase at a specific store. The information must be displayed in ascending alphabetical order of the item names.
> display_items,kroger
cheesecake,4
pot_roast,5
OK:display_completed
> display_items,publix
cheesecake,8
OK:display_completed
> display_items,whole_foods
ERROR:store_identifier_does_not_exist
Display the items for each store. The store identifiers must be valid.
[5] Themake_pilotcommandmustcreateapilotwhocouldflyadronelatertosupportgrocery deliveries. The pilot must have an account (i.e., ffig8) that is unique among all pilots, along with a first and last name, phone number, tax ID, license ID and experience level measured in terms of the number of deliveries completed successfully. The license ID (i.e., panam_10) must also be unique among all pilots.
> // create multiple pilots to control the drones
> make_pilot,ffig8,Finneas,Fig,888-888-8888,890-12-3456,panam_10,33
OK:change_completed
> make_pilot,ggrape17,Gillian,Grape,999-999-9999,234-56-7890,twa_21,31
OK:change_completed
> make_pilot,ffig8,Frances,Faro,777-777-7777,678-90-1234,eastern_6,36
ERROR:pilot_identifier_already_exists
> make_pilot,kkiwi23,Kiara,Kiwi,555-555-5555,890-12-3456,panam_10,28
ERROR:pilot_license_already_exists
Make pilots to fly the drones in the system. The pilots identifiers (e.g., ffig8, ggrape17) must be unique within the system.
[6] Thedisplay_pilotscommandmustdisplaytheinformationaboutallthepilotswhovebeen introduced in the system. The information must be displayed in ascending alphabetical order of the pilots identifiers (e.g., ffig8).

> display_pilots
name:Finneas_Fig,phone:888-888-8888,taxID:890-12-3456,licenseID:panam_10,
experience:33
name:Gillian_Grape,phone:999-999-9999,taxID:234-56-7890,licenseID:twa_21,
experience:31
OK:display_completed
Display the status of the pilots within the system.
[7] Themake_dronecommandmustcreateadronethatcanbeusedtodelivergroceriestothe appropriate customer when an order has been purchased. The drones identifier (i.e., 1) must be unique for the drones at that store. Drones will also have a weight capacity and a measure of the number of deliveries that the drone can make before needing refueling.
> // create multiple drones to deliver the orders
> make_drone,kroger,1,40,1
OK:change_completed
> make_drone,whole_foods,1,40,3
ERROR:store_identifier_does_not_exist
> make_drone,kroger,1,100,1
ERROR:drone_identifier_already_exists
> make_drone,publix,1,40,3
OK:change_completed
> make_drone,kroger,2,20,3
OK:change_completed
Make drones that are used to deliver the groceries. The store identifiers must be valid, and the drone identifiers (e.g., 1, 2) must be unique within the store where they are defined.
[8] Thedisplay_dronescommandmustdisplaytheinformationaboutallthedronesthatcanbeused to deliver grocery orders for a specific store. Note that a drone will not include the name of the pilot unless one has been assigned. The information must be displayed in ascending alphabetical order of the drones identifiers (e.g., 1). A drones identifier is not limited to integers it could be a string.
> display_drones,kroger
droneID:1,total_cap:40,num_orders:0,remaining_cap:40,trips_left:1
droneID:2,total_cap:20,num_orders:0,remaining_cap:20,trips_left:3
OK:display_completed
> display_drones,publix
droneID:1,total_cap:40,num_orders:0,remaining_cap:40,trips_left:3
OK:display_completed
> display_drones,whole_foods
ERROR:store_identifier_does_not_exist
Display the status of the drones for a given store. The store identifiers must be valid.
[9] Thefly_dronecommandmustassignthegivenpilot(i.e.,ffig8)totakecontrolofthegivendrone (i.e., drone 1 at the store kroger). A pilot can only control one drone at a time, and a drone can only be controlled by one pilot at a time.

> fly_drone,kroger,1,ffig8
OK:change_completed
> fly_drone,whole_foods,1,ggrape17
ERROR:store_identifier_does_not_exist
> fly_drone,publix,2,ggrape17
ERROR:drone_identifier_does_not_exist
> fly_drone,publix,1,hhoneydew20
ERROR:pilot_identifier_does_not_exist
> fly_drone,publix,1,ggrape17
OK:change_completed
Assign pilots to command/fly the drones. The store, drone and pilot identifiers must all be valid. Remember that a drone can only be flown/commanded by one pilot at a time, and a pilot can only fly/command one drone at a time, which has two significant implications. Suppose pilotA is being assigned to fly droneX. In this case: (1) if pilotA is currently flying a different droneY, then droneY will be left without a pilot; and, (2) if droneX is currently being flown by a different pilotB, then pilotB will be replaced by pilotA, and pilotB wont fly a drone again until they are reassigned.
[10] The display_drones command has already been introduced. Note that the listing now includes the name of the pilot who was recently assigned (i.e., flown_by:Finneas_Fig).
> display_drones,kroger
droneID:1,total_cap:40,num_orders:0,remaining_cap:40,trips_left:1,flown_by
:Finneas_Fig
droneID:2,total_cap:20,num_orders:0,remaining_cap:20,trips_left:3
OK:display_completed
> display_drones,publix
droneID:1,total_cap:40,num_orders:0,remaining_cap:40,trips_left:3,flown_by
:Gillian_Grape
OK:display_completed
> display_drones,whole_foods
ERROR:store_identifier_does_not_exist
Display the status of the drones for a given store. The store identifiers must be valid, and the drone informationmustincludethepilotsname(e.g.,Finneas Fig, )if(andonlyif)apilothas been assigned.
[11] Themake_customercommandmustcreateacustomerwhocanstartorders,requestitemsand eventually purchase (or cancel) those orders. The customer must have an account (i.e., aapple2) that is unique among all customers, along with a first and last name, phone number, customer rating and credits (i.e., money used to purchase items).
> // create multiple customers to purchase items
> make_customer,aapple2,Alana,Apple,222-222-2222,4,100
OK:change_completed
> make_customer,aapple2,Ariana,Asparagus,333-333-3333,5,150
ERROR:customer_identifier_already_exists

> make_customer,ccherry4,Carlos,Cherry,444-444-4444,5,300 OK:change_completed
Make customers to purchase items from stores. Customer identifiers (e.g., aapple2, ccherry4) must be unique within the system.
[12] Thedisplay_customerscommanddisplaysallthecustomerswhohavebeenintroducedinthe system. The information must be displayed in ascending alphabetical order of the customers identifiers (e.g., aapple2).
> display_customers
name:Alana_Apple,phone:222-222-2222,rating:4,credit:100
name:Carlos_Cherry,phone:444-444-4444,rating:5,credit:300
OK:display_completed
Display the status of the customers within the system.
[13] Thestart_ordercommandmustcreatetheinitialstubforanorderatagivenstoreforagiven customer (i.e., aapple2). The identifier (i.e., purchaseA) must be unique for all orders at that store. Also, the drone and customer identifiers must be valid.
> // create multiple orders as requested by customers
> start_order,kroger,purchaseA,1,aapple2
OK:change_completed
> start_order,kroger,purchaseB,1,aapple2
OK:change_completed
> start_order,whole_foods,purchaseC,1,aapple2
ERROR:store_identifier_does_not_exist
> start_order,kroger,purchaseA,1,aapple2
ERROR:order_identifier_already_exists
> start_order,kroger,purchaseC,3,aapple2
ERROR:drone_identifier_does_not_exist
> start_order,kroger,purchaseC,1,bbanana3
ERROR:customer_identifier_does_not_exist
> start_order,kroger,purchaseD,2,ccherry4
OK:change_completed
> start_order,publix,purchaseA,1,ccherry4

CS: assignmentchef QQ: 1823890830 Email: [email protected]

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[SOLVED] CS6310 Software Architecture & Design
$25