Skip to the content.
Review Feature PPR 6 Things N@TM MCQ Review Self-Grade

Personalized Project Reference

PPR

Explanation of my highlighted feature

One of my features that I chose to highlight is my vinStore api feature. This feature is not just an API, but also has clean frontend UI that allows the user to seamlessly interact with the storing of data. The user can choose to upload their VIN to our database, which we then send the the Department of Transportation’s VIN decoder to get information about their car. We get: make, model, year, and engine type. This is information we store and display to the user so they will not only know this information about their car, but we can also use this data and integrate it with other features, like posts and mechanic tips.

pic of vinStore page

CPT Requirements Fulfilled

My project fulfills many CPT requirements (link) that I will now list, starting with Instructions for Input From:

Instructions for Input From…

User Input
  • Uses data acquired from user input.
  • This happens when user submits their VIN in the data field to send to my API which stores it in the data base and returns to the user with their car info.
  • Below is a code segment which displays this.

picture of post html picture of post user

Online Data Stream
  • Uses data from an online data stream.
  • This happens when a user submits a VIN in the data field. We take this VIN from the user and sends it to the Department of Transportation (link) which then sends us all data about the car.
  • We then parse that data for specific parts and format it into JSON where it gets stored and available to the user to view.
  • Below is a code segment which displays this.

picture of DoT code

Use of at least one list or other collection type

  • My code takes data from the user and an online data stream to store data into a database.
  • The database holds relevant information to my feature and helps fulfill my programs purpose.
  • Below is an image that shows my table in the database that holds data relevant to the user-submitted VIN.

pic of vehicles table in DB

At least one procedure that has a name, return type, and one or more parameters

  • Procedure name: put. This is the put method in my vinStore API.
  • Return type: Response or jsonify. Depends on what it is for. Responses will give errors while jsonify will provide success message.
  • Parameters: old_vin and new_vin. Both of which are retrieved from the request JSON. These are used to modify the data in the database.

pic of put method

Algorithm that includes sequencing, selection, and iteration

  • Found in the aforementioned put method
  • Sequencing: Step by step execution of statements
  • Selection: Decision-making using IF statements
  • Iteration: Looping over a collection with JSON handling and database queries

Calls to procedure

  • A call to my procedure is seen in the frontend doing a API request call.
  • It accesses the put method to update the database

pic of call

Instructions for Output Based on Input and Program Functionality

  • Some instructions for output can be seen with the textual outputs.
  • This is seen in errors but also the success message
  • {“message”: “User is not authenticated”}
    {
    “message”: “Vehicle VIN updated successfully”,
    “vehicle”: { “vin”: “NEWVIN12345678901”, “make”: “Toyota”, “model”: “Camry”, “year”: “2022”, “engine_type”: “Gasoline” }
    }