Starting from:

$30

CPT120-Assignment 1 StoryMaker Solved

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

Develop this assignment in an iterative fashion (as opposed to completing it in one sitting).

.

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.
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

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.
4.2) Documentation requirements

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.

More products