You are on page 1of 3

National Institute of Business Management

School of Computing and Engineering

BSc (Hons) Computing|ITB |EHNS-Year 1


Diploma in Computer Systems Design-20.1F
Diploma in Software Engineering–20.1F
Enterprise Application Development-1
Time allowed: Two hours 11th August 2021|9AM-11AM
INSTRUCTIONS TO CANDIDATES

• This paper contains 4 questions. Answer ALL questions.

Question 01[25 Marks]


A. List three considerations that software engineers should follow when enterprise level
applications are programmed. (03 Marks)
B. Briefly explain why Java is platform independent. (02 Marks)
C. A factory produces electrical equipment for exporting to different countries. Each equipment
has an equipment code, an equipment value and quantity exported from one type of equipment.
The constructor is used to set code, value, and quantity to be exported of an equipment. The
method getTotalValue() is used to find a total value of one type of equipment to be exported.
The method showDetails() is used to display the code and total value of one type of equipment
to be exported. Write an object-oriented application to set equipment details, get total value
and display considering two equipment which the company is planning to export. (15 Marks)
Info: total value of one type of equipment= an equipment value* quantity exported.

D. Write a java application to create a package “office” to keep class Employee. Use the
information given below. It is sufficient to program the given class. Write the import statement
for created package to use the class separately. (05 Marks)
Class: Employee
Method: displayData(int,String,String);
//This gets age, name of the employee and address of the employee.

Page 1 of 3
Question 02[25 Marks]
A.
i. List two run time errors. (02 Marks)
ii. Briefly explain try, catch, and finally used in exception handling. (03 Marks)
iii. Differentiate Checked Exception and Unchecked Exception. (03 Marks)
iv. What is the usage of the keyword “throws” in programming? (02 Marks)
v. The following part of the program successfully compiled. But it creates an exception
when it is running. You are required to write program codes to handle it. (05 Marks)

int var1 = 15.


int var2 = 5.
int var3 = 0.
int ans1 = var1 / var2.
int ans2 = var1 / var3.
B. Write a java thread program to output the sum of numbers from 10 to 30 which are divisible
by 3 without remainder (remainder 0). You should Set name and priority of the thread and
execute it. (10 Marks)

Question 03[25 Marks]


A. List out three swing components and two swing containers. (05 Marks)
B. Write a Java Swing program to convert temperature Celsius units into Fahrenheit units. User
interface and formula given below.

Formula:
// Parse degrees Celsius as a double and convert to Fahrenheit.
// Consider tempTextField as the inputText field which is designed to enter the
// Celsius temperature value.
int tempFahr = (int)((Double.parseDouble(tempTextField.getText()))* 1.8 + 32);
Program must contain,

Page 2 of 3
i. Java program to implement above UI design. (12 Marks)
ii. Button Click action event handling (Use the above conversion formula for the
calculation). Display output as a message. (06 Marks)
iii. Input Validation, show following Error dialog alert if user enters nonnumeric value.
(02 Marks)

Question 04[25 Marks]


A. You are required to write a java program to record your name as bytes into a text file.
(05 Marks)
B. Write a functional interface with following method and use lambda expression to execute it
with required data. The method calculates tax amount of the given payment. (04 Marks)
Method: void findTax (float payment_amount,float tax_rate);

C. Briefly introduce the following items in the Collection framework. Write java codes to store
names of employees in a list and output stored values using each below. (08 Marks)
i. List
ii. Set
D. Write a java console application to perform following operations. You are required to establish
connection prior to perform operations. (08 Marks)
i. Insert customer id, customer first name, mobile number to customer table.
ii. Search and display customer details of customer id 1300.
Database : supermarket
Table : customer
Fields: customer_id number [5]
customer_first_name text [15]
mobile_number number [10]

END of the Paper

Page 3 of 3

You might also like