













Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!














Module title Computer Programming Module NFQ level (only if an NFQ level can be demonstrated) n/a Module number/reference BSCH-CP Parent programme(s) Bachelor of Science (Honours) in Computing Science Stage of parent programme Stage 1 Semester (semester1/semester2 if applicable) Semester 1 & 2 Module credit units (FET/HET/ECTS) ECTS Module credit number of units 10 List the teaching and learning modes Direct, Blended Entry requirements (statement of knowledge, skill and competence) Learners must have achieved programme entry requirements. Pre-requisite module titles None Co-requisite module titles None Is this a capstone module? (Yes or No) No Specification of the qualifications (academic, pedagogical and professional/occupational) and experience required of staff (staff includes workplace personnel who are responsible for learners such as apprentices, trainees and learners in clinical placements) Qualified to as least a Bachelor of Science (Honours) level in Computer Science or equivalent and with a Certificate in Training and Education (30 ECTS at level 9 on the NFQ) or equivalent.with a Certificate in Training and Education (30 ECTS at level 9 on the NFQ) or equivalent. Maximum number of learners per centre (or instance of the module) 60 Duration of the module Two Academic Semesters, 24 weeks teaching Average (over the duration of the module) of the contact hours per week 5 Module-specific physical resources and support required per centre (or instance of the module) One class room with capacity for 6 0 learners along with one computer lab with capacity for 25 learners for each group of 25 learners
Analysis of required learning effort Minimum ratio teacher / learner Hours Effort while in contact with staff Classroom and demonstrations 1:60 36 Monitoring and small-group teaching 1:25 72 Other (specify) Independent Learning Directed e-learning Independent Learning 82 Other hours (worksheets and assignments) 55 Work-based learning – learning effort Total Effort 250 Allocation of marks (within the module) Continuous assessment Supervised project Proctored practical examination Proctored written examination Total Percentage contribution 70% 30% 100% Module aims and objectives The aim of the module is to teach the learner how to design high-quality computer programs in a systematic way. All the relevant concepts and techniques are explained and exemplified in the clearest, simplest language. The objectives are to facilitate the learner to understand the theory underlying programming as a concept and to enhance the logical step by step approach to problem solving required. The basic concepts of command sequences, iteration and selection are introduced, and the constructs used in a modern programming language to implement these. Minimum intended module learning outcomes On successful completion of this module, the learner will be able to:
Professional Practice
E-learning The college VLE is used to disseminate notes, advice, and online resources to support the learners. The learners are also given access to Lynda.com as a resource for reference. Module physical resource requirements Requirements are for a classroom for 60 learners equipped with a projector, and a 25 - seater computer lab for practical sessions with access a development environment (Notepad++) and the Java SDK (this may change should better technologies arise). Reading lists and other information resources Recommended Text Deitel, P. J. and Deitel, H. M. (2018) Java: How to Program. New York: Pearson. Schildt, H. (2014) Java: the Complete Reference. San Francisco: McGraw-Hill. Secondary Reading: Charatan, Q. and Kans, A. (2009) Java in Two Semesters. London: McGraw-Hill. Dos Reis, A. J. and Dos Reis, L. L. (2012) An Introduction to Programming Using Java. Sudbury: Jones & Bartlett Learning. Specifications for module staffing requirements For each instance of the module, one lecturer qualified to at least Bachelor of Science (Honours) in Computer Science or equivalent, and with a Certificate in Training and Education (30 ECTS at level 9 on the NFQ) or equivalent.with a Certificate in Training and Education (30 ECTS at level 9 on the NFQ) or equivalent.. Industry experience would be a benefit but is not a requirement. Learners also benefit from the support of the programme director, programme administrator, learner representative and the Student Union and Counselling Service.
Workbook 1: Variables, Conditional Statements and Iteration Remember to include a comment at the start of each file with you name and student number Question 1 (week 5) Make a program to has three integers (d, h, and m), and display the number of seconds in d days, h hours, and m minutes (assume d, h, and m have values of 1 , 17 , 34 respectively). Question 2 (week 5) Make a program to swap the values of variables x and y. Question 3 (week 6) Create a program that takes an integer from the user and outputs just the last digit in the input value Question 4 (week 6) Create a program that takes 5 integer values from the user and prints them to the screen in reverse order to how they were entered. Question 5 (week 7) Make a program to input an integer representing a month number and output the name of the month. If the integer is not a month number, a suitable reproach message should be displayed. Question 6 (week 7) Design a program to input three positive integers representing day, month and year, and output ‘yes’ or ‘no’ according to whether they form a legitimate date. For Example: Input è day = 10 month = 5 year = 1912 Output è yes Input è day = 30 month = 2 year = 1958 Output è no
Question (week 8) Create a guessing game program. Your program should generate a random number between 1 and 100 (inclusive) and then ask the user for a guess. The game will keep asking for a guess until one of the following conditions are matched:
Assignment 1 Title: Griffith College Fruit Machine For this assignment you are to create a complete game to emulate a fruit machine (http://en.wikipedia.org/wiki/Slot_machine). Your machine will use the number 1-7 to represent the outputs on the wheels. The game should allow a user to begin with 10 credits, each time they play the game it uses 1 credit. If they win a prize (combinations detailed below) the winning amount of credits should be added to their total (less the 1 credit they spent to play the game. If they lose the game their total credits remaining should decrease by 1. After each play the user should be presented with the following menu:
25 Credits 2 Matching even 10 Credits 2 Matching odd 5 Credits Any one 7 (i.e. X- 7 - X) 2 Credits Assessment Criteria Your code will be assessed as follows: Menu System: (10%)
Game System: (55%)
Rules are available here (https://www.thespruce.com/how-to-play-battleship- 411069 )^1 and a flash version of the game is available here (http://www.miniclip.com/games/battleships/en/) 2 The program will use 2 2D Arrays (one for each player) and 2 arrays of boat objects ( for each player). The boat object needs to hold the following information:
Advanced Requirements (15% of assessment)
In your answer clearly detail the design of the program as well as creating the code for the solution. Question 2 Write a java class for a DVD. Each DVD has a title, a director and duration. You should also write a test program that creates and outputs the details of at least two DVDs by means of a display method. In your answer clearly detail the design of the program as well as creating the code for the solution. Question 3 Design a Java program to read a text file called dwarves.txt. The file contains the names of the 7 dwarves (Sleepy, Grumpy, Happy, Bashful, Doc, Dopey, Sneezy). Your program should create a new text file for every dwarf in the source file. Each new file should be called after a dwarf. The lines have no extra spaces or tabs at the beginning or end. In your answer clearly detail the design of the program as well as creating the code for the solution.
Date: XXXXXXXX Time: XXXXXXX THIS PAPER CONSISTS OF FIVE QUESTIONS FOUR QUESTIONS TO BE ATTEMPTED SECTION A – COMPULSORY SECTION B – THREE QUESTIONS TO BE ATTEMPTED
(f) Study the following program carefully and answer the question below: public class PartB{ static void swap(int a,int b){ int temp=a; a=b; b=temp; } public static void main(String[] args){ int x=5; int y=7; swap(x,y); System.out.print("x:" + x+ "y:"+ y); } } Write down the output that is displayed when this program is executed and briefly justify your answer. (5 marks) (g) Show, with the aid of a clear example, what is meant by the term scope of a variable declaration. (5 marks) Total (40 marks) SECTION B – THREE QUESTIONS TO BE ATTEMPTED QUESTION 2 Consider a staircase of size 4 :
Observe that its base and height are both equal to 4, and the image is drawn using # symbols and spaces. The last line is not preceded by any spaces. Write a program that accepts in an integer value from the user N and prints a staircase of size N. In your answer clearly detail the design of the program as well as creating the code for the solution. (12 marks for Code) (8 marks for Design) Total (20 marks)
A Pangram is a sentence constructed by using every letter of the alphabet at least once. Create a program that accepts a string from the user and tells the user if it is a pangram or not. You can assume that the input string is all lowercase characters. Example : Input = we promptly judged antique ivory buckles for the next prize Output = This is a pangram Example : Input = i really hope this example works for me Output = This is not a pangram In your answer clearly detail the design of the program as well as creating the code for the solution. (12 marks for Code) (8 marks for Design) Total (20 marks) QUESTION 4 Create a method that is given an array of integers. The integer values will range from