Reference no: EM132358546
Introduction To Programming Assignment - HomeAutoBot
Introduction - You must create a prototype of a simple home automation bot named "Fraizr" (fictional name) that demonstrates the exact behaviours shown in the following video: COSC1519 ITP A1 - Introduction (see attached file).
The code that you write does not need to control any appliances. Fraizr has a list of appliances that it can either turn on or turn off (see video above). You are given marks on your ability to follow all requirements on this document as well as on your ability to match behaviours in the video.
Note: When clients explain their requirements, it is normal for the programmer to refer to the presentation several times and ask questions as needed.
Functional and Development Requirements -
Develop Fraizr in a .java file named HomeAutoBot.java. This is the file that you will submit. Fraizr must be developed in 3 stages discussed further below; Each stage will guide you correctly to the next stage so it is crucial that you follow this sequence. However, only the final stage that you complete must be included in the HomeAutoBot.java file.
All 3 stages follow the following algorithm (identify the steps from the lecture 1 video):
A. Show welcome message.
B. Do appliance count or/and name input mode.
C. Listen for instructions mode until user chooses to exit by selecting the cancel button.
1. Display appliances and their current states (exactly as shown in video) and ask for input
2.1 If user input starts with "turn on" or "turn off" followed by an appliance name, display confirmation and update state variable/array element.
2.2 If user input starts with "turn on" or "turn off" followed by an unknown appliance name, display "I can only control: ..." followed by all appliances and their states.
2.3 If the user input does not start with "turn on" or "turn off", display "please say turn on or off for the following: ..." and display all appliances and their states.
D. Show goodbye message.
Development Stage 1: Fixed to 4 appliances. Appliance names are entered by the user. Does not use arrays; variables must be created for appliance names and appliance states (on/off). Comments are added to the code explaining where each algorithm step is located in the code.
Development Stage 2: Fixed to 4 appliances. Appliance names are entered by the user. Must use 2 arrays: one for appliance names, one for appliance states. Comments are added to the code explaining where each algorithm step is located in the code then discusses coding approach.
Development Stage 3: At the start, asks user the number of appliances and then takes name inputs for that many appliances. Must use 2 arrays (see stage 2) and each array's length matches the number of appliances entered. Comments are added to the code explaining where each algorithm step is located in the code then discusses coding approach and evalauates against alternatives.
Attachment:- Introduction To Programming Assignment File.rar