[SOLVED] COSC2452 Assignment 1

24.99 $

Programming resource
Digital learning resource
Category:
✓ Practical programming resource
✓ Suitable for guided study and reference
✓ Tutor guidance available when needed

Description

5/5 - (1 vote)

1. Overview

There is no book containing the music to every song that will be written. There is no book containing the answers to every mathematical calculation that we will need to perform. Similarly, there is no book, set of lecture slides, video, etc. that will give a programmer (you) the solutions to every programming problem.

In this assignment, you are awarded marks for demonstrating your ability to meet the requirements given in this document using no more than the concepts and approaches taught in Introduction To Programming compulsory lecture lessons and “modules” to write and debug a working Java program. Consider the simplest solution that meets the requirements as the best solution (Occam’s razor principle). There are code requirements (5 marks) and documentation requirements (2 marks) for a total of 7 marks.

Develop this assignment in an iterative fashion (as opposed to completing it in one sitting). You can and should get started now as there are concepts from the week 1 lessons that you can incorporate from now itself.

2. Assessment Criteria

This assessment will determine your ability to:

  1. Exclusively follow coding, convention and behavioral requirements provided in this document and in the compulsory live lessons.
  2. Independently solve a problem by using programming concepts taught over the first several weeks of the course.
  3. Write and debug Java code independently.
  4. Document code.
  5. Ability to provide references where due.
  6. Meeting deadlines.
  7. Seeking clarification from your “supervisor” (instructor) when needed via discussion forums.
  8. Create a program by recalling concepts taught in class, understanding and applying concepts relevant to solution, analysing components of the problem, evaluating different approaches.

3. Learning Outcomes

This assessment is relevant to the following Learning Outcomes:

  1. Demonstrate knowledge of basic concepts, syntax and control structures in programming
  2. Devise solutions to simple computing problems under specific requirements
  3. Encode the devised solutions into computer programs and test the programs on a computer
  4. Demonstrate understanding of standard coding conventions and ethical considerations in programming.

4. Assessment details

Note: Please ensure that you have read sections 1-3 of this document before going further.

Assume that a children’s software developer has hired you for your coding skills to work on a project involving personalised/dynamic stories/poetry named ‘StoryMaker’. At first, the program asks the user to enter several fields such as names of characters/places, numbers of things, etc. that are important to the chosen story and then finally displays that story with the entered fields embedded (similar to the Myself program but with inputs). You must not use the given example story. You must meet the code (section 4.1) requirements and documentation (section 4.2) requirements detailed further below.

Tip: As you are not given marks for creativity, you can come up with your own story or feel free to use one found online (provide references when relevant). As this is for hypothetical children, please keep the non-changing parts of the story “tame”.

4.1) Code requirements (1+1+1+2=5 marks):

C1. Code presentation and format – The program must be entirely inside the main method of a Java class/file named StoryMaker.java and formatted consistently (Tip: use Eclipse→Source menu→Format before every submission). Must not include any unused/irrelevant code (even inside comments).

C2. The story/poem must be able to store at least two String fields and one number field based on the chosen story.

C3. Values for the fields must come via user inputs when the program is run. All inputs must be taken before any part of the story is shown.

C4. The final composition of the story must be in one variable and it must be displayed using one output statement. Refer to the behaviour demonstrated in the Myself and TypeDemo examples. Consider these as requirement presentations by the “client”.

In places where this specification may not tell you how exactly you should implement a certain feature, the programmer (you) need to use your judgment to choose and apply the most appropriate concepts from class materials. Follow answers given by your “client” or “supervisor” (you instructor) under Canvas→Discussions→’Assignment 1’ when in doubt.

4.2) Documentation requirements (1+1=2 marks):

D1. Write comments next to defined code blocks (e.g. near public static void main, ifs, etc. where you can have { }) and declared variables explain their purpose in the program and what alternatives would have been possible. Do not assume that the reader can figure these out.

E.g. with important variables, discuss which data type you have used and what other data types might have been possible/impossible and why.

E.g. with if statements (if you have them), discuss how else one might perform the same conditional check or if there is no other way, state why it would be impossible.

D2. Explain any code requirements that you have not met and all bugs (situations that might cause the program to crash or behave abnormally) in the approximate locations they originate within your code. Bugs imposed by limitations in the lesson topics such as input type mismatches need not be corrected in code but they still must be documented, if they exist. If you do not have bugs, you must explicitly say that there are none. Tip: A good programmer knows the limits of their program. If doing B2, explain any standard code requirements that you may have violated due to the bonus requirements.

4.3) The following is only an example. You must choose your own story and relevant fields.

“Enter name of big animal” (You enter “lion”)

“Enter name of small animal” (You enter “mouse”)

“Enter story duration in days” (You enter 2)

[Your code should then display in one go (similar to the Myself program shown in week 1 tutorial lesson)…]

Once upon a time there lived a lion in a forest. One day after a heavy meal it was sleeping under a tree. After a while, there came a mouse and it started to play on the lion. Suddenly the lion got up with anger and looked for those who disturbed its nice sleep. Then it saw a small mouse standing trembling with fear. The lion jumped on it and tried to kill it. The mouse requested the lion to forgive it. The lion felt pity and left it. The mouse ran away. 2 days later, the lion was caught in a net by a hunter. The mouse came there and cut the net. Thus it escaped. There after, the mouse and the lion became friends. They lived happily in the forest afterwards.

4.4) Bonus requirements (bonus marks for this assignment are capped at 1)

You can do either or both of the requirements below but to obtain any bonus marks, you must meet all requirements of the non-bonus/standard part.

B1. Submit your final version of the assignment 1 week before the deadline for +0.5 bonus marks or 2 weeks before the deadline for +1 bonus marks.

B2. By incorporating if-statements to perform conditional checks, make your story change based on the inputs. You can make it like an interactive adventure where the story is displayed progressively. If meeting bonus requirements mean that you have to violate a non-bonus requirement, explain this in your code documentation (marks will not be deducted as long as these are explained). If you choose to incorporate this bonus functionality, your bonus version is the only version that you must submit. Please do not include multiple versions of your code in the final submission. (+1 bonus marks).

Note: The total mark for assignments+weekly work (the non-exam component) is capped at 50 marks; the exam will be 50 marks. For a full break-down, see Canvas→Home→Syllabus.

 

9. Rubric/assessment criteria for marking

For full marks, you must use only the concepts taught in the compulsory Live Lecture (and relevant Canvas→Modules); programs that work do not necessary receive full marks if required approaches are not demonstrated. Code must also be valid, runnable Java to be given a mark (non-compilable code such as JavaScript, pseudocode, incomplete/broken Java code cannot be marked). Runtime errors will incur up to a 50% penalty (run-time errors due to data type mismatches in inputs are acceptable).

Inadequate                Partial                                                             Complete

(Uses only the concepts covered in class materials)

C1    Formatting Program name not an exact match or             Correct program name, formatted consistently, only relevant code inconsistent or           formatting somewhat inconsistent or            and comments included. irrelevant code       irrelevant code included or has included.              unreachable code.

C2    Does not      Required number of fields in required           Able to store at least two String fields and one number field. demonstrate               types not present or identifier names             Demonstrates understanding of primitive data types vs. class knowledge of data may not be descriptive but shows            types where relevant. Uses descriptive identifier names.

types and     understanding of the concepts of declarations.      storing values in relevant data types.

C3    Relevant input-            Does not show appropriate prompts or Appropriate prompts, input taking and storing demonstrated. All taking not present. only some fields are taken as inputs or inputs taken before any part of the story is shown. not all inputs are taken at once.

C4    No output or story Multiple output statements or entire   Final composition of the story must be in one variable and hard-coded to        story not stored in one variable.     displayed using one output statement.

output statements.

D1    Purposes of most        Explains purpose of most declared                 Explains purpose of each declared variable in plain English and variables and code variables and defined code blocks but      analyses possible alternative declarations.

blocks not   lacks detail given under ‘complete’.                Explains purpose of each written code block in plain English and explained.   analyses possible alternative implementations or orderings.

D2 No comments Identification (without discussion) of Explains any code requirements that have not been met, aside from D1 the criteria stated under ‘complete’ or situations that might cause the program to crash or behave ‘complete’ level. discussions exclude some of the abnormally. Able to identify the approximate locations of any Does not discuss criteria under ‘complete’. issues within the code and comments are given in those issues in the code. locations. Bugs imposed by limitations in the lesson topics

discussed. If doing B2, discusses if any B2 requirements violate non-bonus requirements.

 

Resource details

Understand the Task Before You Use the Resource

Review the requirements, identify the programming concepts involved, study the implementation and test your understanding with your own examples and modifications.