Question: You are asked to simulate an automatic bird feeder that has the following features: Feeding doors open automatically at sunrise and close at sunset. Bird


You are asked to simulate an automatic bird feeder that has the following features:

  1. Feeding doors open automatically at sunrise and close at sunset.
  2. Bird seed is placed in a 12 oz. container, and automatically dispensed when the doors open.
  3. Water is placed in a separate 12 oz. dispenser, and automatically dispensed when the doors open.

Requirements:

  1. An optical sensor detects sunlight at a 40% brightness level
    1. A servo is activated and the feeding doors open.
  2. The sensor detects a decrease in sunlight to a 25% brightness level
    1. Servo is activated and feeding door close.
  3. Remoter control way of opening and closing the doors remotely.
  4. An audio sensor that closes the doors when certain bird chirps are detected (assume that such a sensor exists...AI...and simply activates the servo to open the door).
    1. Use case:
Basic Flow Alternate Scenario
Precondition: Doors open
  1. Songbirds arrive at the feeder.
1.1 The audio sensor detects the birdsong
  1. User determines birds are not songbirds
2.1 audio sensor recognizes the chirp from unwanted bird
  1. User presses the remote control button to close door (servo activated)
3.1 The audio sensor activates the servo to close the feeding doors.
  1. Feeding doors close, birds leave

  1. More songbirds arrive at the feeder
5.1 The audio sensor detects the birdsong from wanted birds
  1. User presses remote to open the doors
6.1 The audio sensor activates the servo to open the feeding doors.
Postcondition: Feeding doors are open again


You will hand in the following:


1 . Implementation. Working .java program.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Answer Below is a Java implementation of the automatic bird feeder simulation based on the provided requirements import javautilTimer import javautilT... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!