Rate Interest - 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: Rate interest, Software Development, Payrate, Public Job, String Responsibility, Double Payrate, String Getresponsibility, Vector, Bankaccount, Savingsaccount

Typology: Exams

2012/2013

Uploaded on 03/25/2013

digvijay
digvijay 🇮🇳

4.4

(17)

185 documents

1 / 6

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Cork Institute of Technology
Bachelor of Science in Computing in Information
Technology Support - Award
(NFQ Level 7)
January 2007
Software Development
(Time: 3 Hours)
Instructions
Answer Four questions.
All questions are worth equal marks
Examiners: Mr. G. MacSweeney
Mr. J. Greenslade
Mr. J. Walsh
1.
Write an applet which prompts a user to enter an amount and a rate of interest for a loan.
The program should calculate the total repayment for the year and display the monthly
repayments.
The monthly repayment can be calculated by:
monthly repayment = (amount + (amount x interest rate) / 100) / 12
(25 Marks)
pf3
pf4
pf5

Partial preview of the text

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

Cork Institute of Technology

Bachelor of Science in Computing in Information

Technology Support - Award

(NFQ Level 7)

January 2007

Software Development

(Time: 3 Hours)

Instructions Answer Four questions. All questions are worth equal marks

Examiners: Mr. G. MacSweeney Mr. J. Greenslade Mr. J. Walsh

Write an applet which prompts a user to enter an amount and a rate of interest for a loan. The program should calculate the total repayment for the year and display the monthly repayments.

The monthly repayment can be calculated by:

monthly repayment = (amount + (amount x interest rate) / 100) / 12

( 25 Marks )

a) In Java, what is meant by association? ( 2 Marks )

b) Write a Job() class with the following attributes, constructor and methods:

attributes: responsibility, payRate, time

constructor: public Job(String responsibility, double payRate, double time)

methods: public double getPayRate() public double getTime() public String getResponsibility() ( 6 Marks )

c) Write an Employee() class with the following attributes, constructor and methods:

attributes: name, newJob

constructor: public Employee(String name, Job newJob)

methods: private String displayName() private double calculatePay() public void displayDetails() ( 6 Marks )

d) Write an example program which incorporates the above classes. ( 6 Marks )

e) In java, what is a Vector()? ( 2 Marks )

f) Suggest an advantage of using Vector() instead of an array? ( 3 Marks )

a) Write a frame which displays the canvas for a simple calculator as follows:

In your answer, include appropriate layout managers and panels. You do not need to include the ActionListener interface. ( 15 marks )

b) State three reasons why a developer might choose an object orientated language. ( 6 marks )

c) State two reasons why a developer might reject using an object orientated language. ( 4 marks )

a) Write the code to define the class Person() which includes code for the following methods:

  • Set a name
  • Set an age
  • Return name
  • Return age

Decide what data variables are required, arguments for methods, etc. ( 8 Marks )

b) Write a program to create an array of ten Person() objects and read ten names and ages into the array from the file people.dat.

The first part of the code is as follows:

import java.io.*; public class Test1 { public static void main( String args[] ) throws IOException {

File f = new File("people.dat"); FileInputStream fs = new FileInputStream(f); InputStreamReader isr; BufferedReader fileInput; isr = new InputStreamReader(fs); fileInput = new BufferedReader(isr); ……. ( 8 Marks )

c) Write a piece of code which sorts the items from the array into order the youngest first. ( 9 Marks )