Billly 7) IFP & AFP – Computer Science Semester II - Programming Supplemental Continuous Assessment SCNC1007 2019/20 Question 1 of 1 – Answer both parts. [100 marks] Based on the program...

1 answer below »


Billly 7) IFP & AFP – Computer Science Semester II - Programming



Supplemental Continuous Assessment



SCNC1007



2019/20






Question 1 of 1 – Answer both parts. [100 marks]






Based on the program description below, provide the following:









PART (A) Create a flowchart for the program ensuring sufficient level of detail and appropriate shape elements to denote start/finish, actions, conditions and I/O. Please use a package like



MS Publisher



(with page size A3 or larger) to create your flowchart. MS Publisher is available to all TU Dublin students free of charge.




[40 Marks]







PART (B) Write the code for the program outlined in your flow chart in Java that meets the specification outlined in the description below. Your code should be submitted in a text file format.




[60 Marks]









Task: Simple Slot Machine Game


Create a flowchart and a java program that plays
a simple slot machine game
with the user.


The program flows as following:


1. User starts with €5 Credit Balance


2. The user is asked their name.


3. User presses [ENTER] to start the game


4. Slot machine has three drums – each drum can display one of three items, a “Bar”, a “Cherry” or an “Dollar”.


5. Each spin cost the user €1 to spin


6. If they get any two items the same, they win their money back (€1)


7. If they get three of a kind, they win €10


8. They can spin again (press 1) or exit and take their money (press 2)


9. If they have no money left the game exits automatically.






The following is an on-screen example of how this code will work:




Hi Tommy, you have €5 in the bank! Each play costs €1.


Wins are 3 of any kind wins €10


Any two of a kind and you get your €1 back


Press [ENTER] to pull the lever...



Deducting €1 from your balance to play (€9 now remaining)


------------------------------


-BAR- -DOLLAR- -DOLLAR-


------------------------------


#######################################


Two of a kind! You won your money back.


#######################################


You Balance is now €10


Press 1 and [Enter] to Play Again or


Press 2 and [Enter] to Leave Game



EXIT SELECTED - You are walking away with €10 in your pocket... Bye!








Note:


· Under no circumstances should your submitted work match worked submitted by another student or from a website. You should be aware your work will be submitted and analyzed using the universities “Urkund” plagiarism detection software.


· You should use concise and meaningful comments in your code that clearly outline what you code is doing at any point.


· Your programme should use the users’ name in all on screen communications.


· You should include error checking at every stage of your code to validate user input.


· The user should be told at all times what balance is.


· Your program should include enhancements to make the game more enjoyable, but what these will be is up to you










MARKING:



FLOW CHART 40 Marks:



Flowchart has sufficient detail to explain the program flow 50%



Flowchart accurately explains the flow 50%






Note: Flowchart must match exactly the submitted java program code.



The correct shapes must be used for each element.



Marks will be lost for non-adherence.






CODE 60 Marks:



Program delivers to the specifications described,



with full error checking 70%



Comments 10%



Program augmentations that add improved playability 10%



Program can run (compiled) as described 10%






NOTE: Negative marking scheme is employed for each syntax errors and/or incorrect keywords.




Marks lost for using inefficient code, redundant/unnecessary code or poor variable naming.




Marks will be deducted if comments are not sufficiently descriptive of your code.









As this is an open book exam, the following describes what is and is not permitted:







































Is Permitted:




What is NOT Permitted:



Use of class notes.



Working in a group.


(this is an individual assessment)



Using internet sites for reference.



Copying code off the internet.



Using books for reference.



Sharing code with other students.



Using Lab work as examples.



Asking or getting help from someone else.



Submitted your own work, even if the code is not correct or does not compile.



Paying someone else to do the work.





Getting someone else to do the work for you.





Submitting work that is not entirely your effort



Answered Same DayJul 14, 2021

Answer To: Billly 7) IFP & AFP – Computer Science Semester II - Programming Supplemental Continuous Assessment ...

Neha answered on Jul 23 2021
146 Votes
61854 - java game/flowchart.png
61854 - java game/Main.java
61854 - java...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here