Assignment title: Information


ITECH 1000/ITECH 5000 Programming 1 - Semester 2 2015 CRICOS Provider No. 00103D ITECH1000/5000 Programming 1 Assignment 1 Specification Page 1 of 5 Assignment 1 – Development of a Simple Menu Driven Program Due Date: 4pm, Thursday Week 7 Please see the Course Description for further information related to submission date, extensions for assignments and Special Consideration. Important Notes 1. Code that does not successfully compile will not be marked. In such cases, only the specification, design and question sections of the assignment will be awarded marks. If you are unable to get sections of your code to compile prior to handing it in, please state this clearly in your submission and comment out the offending code. Marks will also be deducted if your code compiles but contains warnings. Please see your tutor for help if you are unable to successfully compile your code. 2. If you use any resources apart from the course material to complete your assignment you MUST provide an in-text citation within your documentation and/or code, as well as providing a list of references in APA formatting. This includes the use of any websites, online forums, books or text books. If you are unsure of how to do this please either see the online guide or ask your tutor for help. 3. You are strongly urged to keep backup files as you work on the project so that you can revert to an earlier version if you break an aspect of the program while attempting to implement one of the later requirements. 4. If you encounter any problems in uploading files to Moodle please report this to your lecturer or other staff member as soon as possible. It is your responsibility to check that you are submitting the correct version of your files and the correct assignment. 5. You may be required to demonstrate and explain your working code to your tutor in your lab class. Resources Provided The following files are available on Moodle: • An electronic copy of this assignment specification sheet • A video of a complete version of the project • The sample starter code • Links to relevant university resources Project Overview For this assignment you will be provided with incomplete sample starter code that you can modify and build upon. Your task will be to carry out the design, analysis, coding and testing to add several additional features to this sample code. You are expected to fully comment the provided code as well as your own code. The sample code provided has some minor issues that mean that although the code compiles it does not run as required. CRICOS Provider No. 00103D ITECH 1000/5000 Programming 1 Assignment 1 Specification Page 2 of 5 Project Specification The program that is to be developed should enable the entry of data from a short survey and to provide the user with some short reports on this data. The data to be entered is from a survey and initially includes the following information: • Gender – male, female, other or unspecified • Preferred hand – left, right, both • Super power – invisibility, super strength • Life preference – famous, happy The program should present the user with a menu that provides the following functionality: 1. Input data 2. View data 3. View report and graph 4. View basic statistics Further details on functionality are provided in the task specifications provided below. Part A – Code Comprehension Your task is to first answer some questions testing your comprehension of the partial solution. Use the sample code provided in StarterCode.java to answer the following questions. Include the answers in your assignment submission. 1. The code provided does not contain any comments. a. Briefly explain why comments are important in code. b. Update the code provided to include comments – include a copy of the commented code starter code in your assignment submission. 2. Identify all of the lines of code within the program that are associated with obtaining user input. This can be done by either copying the lines into your answers or highlighting the lines within the code. 3. The variable finished should be used as the condition for the while loop. a. Briefly explain the purpose of the variable finished. b. What value will it have when the while loop is initially entered? 4. Run the program. When the menu is presented enter 2 as the selected item. a. What is the output of the program to the console? Why are all the values 0? b. Briefly explain how would you should alter the code below so that it displays an appropriate prompt, rather than "Enter Response 1" for each loop: case 1: System.out.println("Menu selection 1"); for(int i=0;i