Giter Club home page Giter Club logo

car-detector's Introduction

Review Assignment Due Date

ENSF 592 Spring 2023 - Assignment 2

๐Ÿ“š Learning Outcomes

  • Accept user input through varied menu options
  • Validate user input through exception handling
  • Process data according to specifications
  • Design control flow logic using data comparisons
  • Develop and implement user-defined classes
  • Print formatted output according to given specifications

๐Ÿ’ป Program Specifications

Computer vision and the related data processing allows cars to detect obstacles in their path. You are being asked to design a terminal-based application for determining a course of action depending on detected obstacles. Your application must meet the following design specifications:

  • Your user interface should prompt the user to input the following information:
    • Select 1 to update the detected traffic light colour, 2 to update whether a pedestrian is detected, 3 to update whether a vehicle is detected, 0 to end the program
    • If menu option 1, 2 or 3 are detected, the user should then be prompted to specify the detected change
      • A traffic light can be "green", "yellow", or "red"
      • Pedestrian status can be "yes" or "no"
      • Vehicle status can be "yes" or "no"
    • A course of action message should be printed following the status change
      • Any scenario where a red light, a pedestrian or a vehicle are detected should display the message "STOP"
      • A green light with no pedestrian or vehicle detected should display the message "Proceed"
      • A yellow light with no pedestrian or vehicle detected should display the message "Caution"
    • After the action message, the current status of each monitored condition should be printed
  • Your input interface design should follow the provided screenshot example.
  • You must validate that the provided input is correct (both menu input and status input).
  • If the menu option input does not meet the criteria, you must handle a ValueError exception by providing a message back to the user and allow them to re-enter their choice without terminating the program.
  • All status input must match the given values exactly (e.g. "red" not "Red").
    • While you should check that the values are valid, you do not need to handle errors/exceptions for these values
  • The initial default values are a green traffic light, no pedestrian and no vehicle.
  • Your code should include and use the provided Sensor class and the provided user-defined functions. Provided code should remain unchanged unless otherwise specified. Details are provided in the template comments.
  • You may not use any global variables. However, you may create your Sensor object in main.
  • Your code must follow the conventions discussed so far in the course (names_with_underscores, ClassNames, four spaces for indentations, spaces between variables/operators, comments throughout, etc.)
  • All user-defined functions must be properly commented above the function header.
  • Your code will be run by the TAs as your end user.
  • FAQs about the assignment will be answered on the D2L discussion boards. Please check the boards for any clarifications before submitting.
  • The grading rubric will be posted to D2L.

๐Ÿ“ Assignment Tasks

  • Make sure to watch video lessons 1 - 14 and review the corresponding Jupyter Notebooks and lab sessions.
  • Clone this repository to your local computer.
  • Open VSCode and start a new terminal. Make sure that your ensf592 environment is activated.
  • input_processing.py is provided as a starting point. Fill in the header with your own information.
  • Remember to test your program execution via the terminal: python input_processing.py
  • Take a screenshot of your successful program run and upload it to your assignment repository.
  • Commit your screenshot and code.
  • Push your local git history to github
  • Submit your repository HTTPS link to the Assignment 2 D2L dropbox.
  • Tip: If you want to learn more about a specific aspect of a Python object, remember to take a look at the official documentation!

car-detector's People

Contributors

github-classroom[bot] avatar tejb96 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.