Recent Question/Assignment

ITECH 1000/ITECH 5000 Programming 1 Assignment 1 Sem3 2014 (201427)
CRICOS Provider No. 00103D ITECH1000/5000 Programming 1 Assignment 1 Specification Sem3 2014 (201427) Page 1 of 6
Assignment 1 – Development of Simple Menu Driven Program
Due Date: Week 7 (see Course Description for further details)
Please see the Course Description for further information related to submission date, extensions for
assignments and Special Consideration. You are required to demonstrate your code to your tutor in your lab
class.
Project Specification
For this assignment you are required to specify, design, implement and test a menu driven program of your
own design. You are to imagine that you are developing a prototype for entering the initial records of a system
and providing reports from that system. For example you could design a program that supports entering
membership details of a club or entering records of student grades within a class or any system you can
imagine involving storing personal details in a two dimensional array. You are provided with incomplete
sample starter code that you can modify and build upon. You are expected to fully comment the provided code
as well as your own code.
Resources Provided
The following files/links are available on Moodle:
? An electronic copy of this assignment specification sheet
? The General Guide for the Presentation of Academic Work
? A sample incomplete program to get you started
Note: 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 ask for help.
Design Constraints
Your program should conform to the following constraints:
? it should include at least one example of the successful and appropriate use of :
o a two-dimensional array containing Strings
o a switch statement
o an if statement
o a while-loop or a do-while loop
o a for-loop
? you must successfully code the showSummaryReport() method and one other new method. For
example in the starter code you might code a method to list members with a particular member level or
list members who owe more than a certain amount.
? it must be able to handle invalid data which lies outside of a specified range e.g. (in the example)
number of members 0 or an AGE is invalid. You can assume that the correct format of data has
been entered i.e. if you are expecting the user to enter numbers, numbers will be entered but stored as
a String. CRICOS Provider No. 00103D ITECH1000/5000 Programming 1 Assignment 1 Specification Sem3 2014 (201427) Page 2 of 6
? you must use appropriate formatting and programming styles (i.e. naming, formatting and commenting
of code).
You are encouraged to add additional functionality to your program but as a minimum you must complete the
requested tasks. When finished, check the marking guide to ensure you have addressed all of the above
constraints.
Part A – Code Comprehension
Sample code has been provided in Moodle. Use the sample code provided to answer the following questions:
1. When the program is first run and menu item 3 is selected what is displayed? Explain what has
happened?
2. When the program is run and menu item 1 is selected and then menu item 3 is selected what is
displayed?
3. If the program is run, menu item 1 is selected and the user attempts to add in 4 members what will
happen and why?
4. Explain how the loop displaying the menu and processing a response is exited. What value does
userOptionSelected have when the program finishes? Describe what happens on this line:
userOptionSelected = m.getsel(scan); // get a user option entered
    .
5. The reserved word break is used in the switch-statement to manage the menu selection. What
happens if you remove the break statement in case 3?
6. Currently, if the user enters an incorrect menu selection (such as 5) what happens? Explain why the
error message is displayed. What method and line of code is responsible and why.
7. What alternative looping structure could have been used for the main while loop?
8. Explain the purpose of the boolean variable finished.
9. Briefly explain the two lines of code that have been used to create the array to store the scores for
each competitor. In your explanation, provide a diagram to illustrate how the array is stored.
10. Explain what would happen (and why) if the code in the while loop was changed to:
while(finished==true)
11. Currently, menu item one prompts the user for data for up to 3 rows of data and 4 values in each row.
What change would you have to make to the code so that the data contains 8 rows of data, with 8
values on each row?
12. The design of the output for menu selection 2 needs to be changed so that it displays the data as per
the following:
Row 1:   Smith,Bruce 22 1 12.00   
============================================
Row 2:   Brown,Peter  24 2 12.00   
============================================
Row 3:   Maison,Mark 38 3   6.00   
============================================
Provide the changes to the code that you need to make to do this. CRICOS Provider No. 00103D ITECH1000/5000 Programming 1 Assignment 1 Specification Sem3 2014 (201427) Page 3 of 6
Part B – Program Requirements
The first part of the assignment is to describe the requirements of your program to be developed. This should
provide enough details so that another programmer would be able to design and implement the program.
Your program should present the user with a menu that provides at least the following functionality:
? Input the number of members, students, etc
? Input values to fill your two-dimensional array
? View reports – at least two different reports (e.g. list members with a particular member level, list
members who owe more than a certain amount)
? Quit the system
Your requirements should allow your program to conform to the design constraints listed above. A basic
example of “program requirements” has been provided for you to refer to (see page 6 of this document for the
Example Specification
You are required to check with your either your lecturer or tutor before continuing to ensure the
problem you are considering is appropriate.
Part C – Analysis and Design
Design a program for the task you have specified in Part B. You should include:
1. A description of the methods used to address the program requirements
2. High level pseudo-code for each menu option and associated method
3. Test data
Once you have completed your pseudo-code, perform a desk check of your logic. If you find any problems with
your pseudo-code you should redesign and retest. Details of any refinements that you have made to your
algorithm and further testing that was conducted should be included in your design. Ensure you plan
requirements so that the showSummaryReport method and your new method will do something interesting with
your data.
Part D – Implementation and Development
Using design developed in Part C, implement the program in Java. Use the sample java code provided as a
starting point. For your first task, extend the code where appropriate (as a minimum complete the TO DO
commented sections) and any other appropriate comments. You may then further modify the code to conform
to all aspects of your specifications as you have documented under Part B.
Your code should use appropriate programming standards and should be well documented/commented. You
are permitted to discuss the sample program with your peers in order to understand it. However, you must
ensure that you complete this section individually. It is expected that no two students will have the same
program. You need to be creative in order to ensure your program is unique. CRICOS Provider No. 00103D ITECH1000/5000 Programming 1 Assignment 1 Specification Sem3 2014 (201427) Page 4 of 6
Part E – Testing
Using the data developed in Part C, test your program to ensure that it works as specified and that there are
no logic errors in your code.
You will need to provide evidence that the testing has been completed – it is suggested that you make use of
tables to display the data and testing.
Assignment Submission
Your assignment should be completed according to the General Guidelines for Presentation of Academic
Work.
The following criteria will be used when marking your assignment:
? successful completion of the required tasks
? complexity of code in your showSummaryReport() method and your new method (e.g. if you have a simple
report involving a one line calculation, you will not get as many marks as if your report is more complex in
logic)
? quality of code that adheres to the programming standards for the course including:
? comments and documentation
? code layout
? meaningful variable names (it is expected that you will change the names of variables in the sample
code provided and alter the size of the array to suit your circumstances)
? check that data entered is valid
You are required to provide documentation, contained in an appropriate file, which includes:
? a front page - indicating your name, a statement of what has been completed and acknowledgement
of the names of all people (including other students and people outside of the university) who have
assisted you and details on what parts of the assignment that they have assisted you with
? a table of contents and page numbers
? answers to the questions from Part A
? the program requirements(specification)
? design details - including requirements, algorithm, test data
? details of test data and evidence that the testing was conducted
? list of references used (APA style); please specify if none have been used.
? An appendix containing your code
Using the link provided in Moodle, please upload the following in one zip file:
1. your code (SurnameStudentIdAssign1.java)
2. your report (surnameStudentIDAssign1.docx)
You will be required to demonstrate your working code to your tutor in your lab class. CRICOS Provider No. 00103D ITECH1000/5000 Programming 1 Assignment 1 Specification Sem3 2014 (201427) Page 5 of 6
Marking Guide
PART A – Code Comprehension
/12
PART B – Specification of the problem
/12
PART C – Analysis and Design
/11
PART D – Implementation and Development
Sample code suitably modified and extended to fit requirements (/10)
ShowReport method (/10)
Additional Report method (/10)
Validation (/5) /35
PART E – Testing
Evidence in report as well as in code /15
Additional Functionality (eg. an Extra menu item for a 3rd report) /15
Total /20 /100 CRICOS Provider No. 00103D ITECH1000/5000 Programming 1 Assignment 1 Specification Sem3 2014 (201427) Page 6 of 6
Example Specification
The following is provided as an example specification of requirements. The specification that you provide
should provide at least as much detail as provided here although your description and menu options will be
different.
This program will assist with the entry and processing of member details at a surf club. For each member the
club will store their name, age, member level and the fees owed. They will also keep track of whether they
have paid their fees and also indicate if they are a life member.
The club would like to be able to enter up to 200 members.
Name is to include last name followed by a comma followed by first name.
member level can be novice (1), intermediate (2), expert (3).
Fees owed should be between $0.00 and $1000.00
Payment and life membership are Y/N values.
The club would like to be able report on:
the whole list of entries i.e. provide details of all members – This should have headings and be listed in
surname ascending order;
the average age of all members;
list name and age of life members;
list outstanding (fees) members.
The prototype program should provide a menu of functions that the user can select from.These options are:
Option 1 will ask the user to enter the data for the club;
Option 2 will display all the raw data i.e. list of members in surname, ascending order;
Option 3 will show a report of the average age of members;
Option 4 will list the name and age of life members;
Option 5 will display the name of amount of all outstanding members.
The program will verify all data entered to ensure that only correct data types within the expected ranges are
entered. The program provides users with the opportunity to choose how they wish to look at the data and
gives them the option of looking at it more than once.

Looking for answers ?