Starter - Software Development - Old Exam, Exams of Software Development Methodologies

These are the Old Exam of Software Development which includes Primenumber, Palindrome, Payrate, String Responsibility, Double Payrate, Double Time, String Name, Private Double Calculatepay, Public Void Displaydetails etc.Key important points are: Starter, Substring Method, integer Array, Private Procedure, Object Oriented Programming, instance, Sequential Execution, Concurrent , Execution, Merit

Typology: Exams

2012/2013

Uploaded on 03/25/2013

digvijay
digvijay 🇮🇳

4.4

(17)

185 documents

1 / 5

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Cork Institute of Technology
1
Higher Certificate in Science in Computing in Information
Technology Support – Stage 1
(NFQ Level 6)
Spring 2007
Software Development
(Time: 3 Hours)
Section A: This question must be answered.
Section B: Choose 1 question
Section C: Choose 1 question
Examiners: Ms.D. Dunlea
Mr. J. Greenslade
Mr. J. Walsh
Section A
Q1) Write a menu program for the HI Café. The following is the list of food on offer:
HI Cafe
Starter
Fruit juice 2.50
Soup 4.50
Cold meat salad 7.00
Main Course
Sausages (2) 4.00
Bacon & egg 5.50
Cod 8.00
Place 9.50
Steak 15.00
Desert
Ice Cream 6.00
Pavlova 7.50
Beverages
Tea 0.80
Coffee 1.00
All prices exclude VAT
The meals in the HI Café are categorized into four courses: starter, main course, desert and
beverages. Using private procedures write a program that presents this information to the customer
and allows the customer to choose the dishes they want from each category. The first category they
must choose from is “Starter”. When they are finished choosing from this menu they choose the exit
option and are then presented with the “Main Course” menu etc. You must then create a final bill to
be output to the screen that includes the name of the individual’s choice, the price and the sub-total.
On the next two line output the value added tax at 15% and then the total for the meal. [40 marks]
pf3
pf4
pf5

Partial preview of the text

Download Starter - Software Development - Old Exam and more Exams Software Development Methodologies in PDF only on Docsity!

Cork Institute of Technology

Higher Certificate in Science in Computing in Information

Technology Support – Stage 1

(NFQ Level 6)

Spring 2007

Software Development

(Time: 3 Hours)

Section A: This question must be answered.

Section B: Choose 1 question

Section C: Choose 1 question

Examiners: Ms.D. Dunlea Mr. J. Greenslade Mr. J. Walsh

Section A

Q1) Write a menu program for the HI Café. The following is the list of food on offer:

HI Cafe Starter Fruit juice 2. Soup 4. Cold meat salad 7. Main Course Sausages (2) 4. Bacon & egg 5. Cod 8. Place 9. Steak 15. Desert Ice Cream 6. Pavlova 7. Beverages Tea 0. Coffee 1. All prices exclude VAT

The meals in the HI Café are categorized into four courses: starter, main course, desert and beverages. Using private procedures write a program that presents this information to the customer and allows the customer to choose the dishes they want from each category. The first category they must choose from is “Starter”. When they are finished choosing from this menu they choose the exit option and are then presented with the “Main Course” menu etc. You must then create a final bill to be output to the screen that includes the name of the individual’s choice, the price and the sub-total. On the next two line output the value added tax at 15% and then the total for the meal. [40 marks]

Section B

2 a) Explain in detail the workings of the following program. What type of program is this? [10 marks]

import java.io.*; import EasyIn;

class CallDown { public static void main(String args[]) { int num = 0; System.out.print("Please enter a number: "); num = EasyIn.getInt(); countDownFrom(num); }

private static void countDownFrom(int x) { System.out.println(x); --x; if (x >= 0) countDownFrom(x); } }

2 c) Look at the short Java program listed below. One block of the program is missing. Your challenge is to match the candidate block of code (on the left), with the output that you’d see if the block were inserted. Not all the lines of output will be used, and some of the lines of output might be used more than once. Draw lines connection the candidate blocks of code with their matching command-line output [12 marks]

class Test { public static void main(String [] args) { int x = 0; int y = 0; while(x<5) { ==+++====+++=== BLOCK HERE =====+++===+++ System.out.print(x + ““ + y + “ “); x = x + 1; } } } Candidates: Possible output:

  1. y = x – y; 22 46

3 d) What is meant by the term “reusability” in relation to Object Oriented Programming and why is it so important? [6 marks]

Section C

4 a) Write the code for the following class: [20 marks]

4 c) Write a main application to create student A below:

Student A 45688H Luke O’ Brien Maths = 63 English = 89 Science = 55

Now output the students details on the screen. [1[ 10 0 mmaarrkkss]]

5 a) Write a program that will allow a teacher to input examination marks at a keyboard for 20 students. Once all examinations marks have been entered into the computer, she must display the mark and grade for each of the 20 students.

Example: “Student 1 received a mark of 60 and a pass grade”

Student

sNumber: String sName : String mathsMark : int englishMark : int scienceMark : int

Student(String, String) getName( ): String getMathsMark(): int setName(String) setMathMark(int) setEnglishMark(int) setScienceMark(int) calculateAverageMark() : double print()

On the first line print the student number and name. On the second line print the subject name and mark. On the third line print the average mark received.

“Student 2 received a mark of 72 and a merit grade”

The grade distribution is shown in the following table:

Mark range Grade 100-85 distinction 84 - 65 merit 64 – 40 pass 39-0 fail

Note: An ARRAY must be used to hold the 20 student results. Use worker methods where necessary [20 marks]

5 c) Using examples explain the following terms?

  1. Class [3 marks]

  2. Instance [3 marks]

  3. Explain the following two terms – sequential execution and concurrent execution. [2 marks]

  4. What is a constructor? Give examples [2 marks]