Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
159 views1 page

Major Elec 1 - Final Exam

This document contains instructions for a Java programming final exam with three parts: 1) Write user-defined functions for basic math operations accepting two integer parameters, 2) Declare and initialize five arrays of different types and sizes, and 3) Create a Java program to demonstrate the user-defined functions using the declared arrays. The exam is worth a total of 100 points and was prepared by an instructor named Jayson Tamayo.

Uploaded by

jayson_tamayo2
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
159 views1 page

Major Elec 1 - Final Exam

This document contains instructions for a Java programming final exam with three parts: 1) Write user-defined functions for basic math operations accepting two integer parameters, 2) Declare and initialize five arrays of different types and sizes, and 3) Create a Java program to demonstrate the user-defined functions using the declared arrays. The exam is worth a total of 100 points and was prepared by an instructor named Jayson Tamayo.

Uploaded by

jayson_tamayo2
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

Pangasinan State University

Lingayen Campus

Mathematics Department

Major Elec 1 - Java Programming


Final EXAM

I. Write user defined functions for the following operations (make sure to accept 2
parameters (integer values): (1) Addition, (2) Subtraction, (3) Division and (4)
Multiplication. (10pts each function)

II. a. Declare and create an array called (5pts)

- moreNumbers, of size 100, containing type short

- prices, of size 11, containing type double

- characters, of size 50, containing type char

- names, of size 80, containing type String

- shoppingList, of size 5, containing type String

b) Complete the table below with a name of each array and the relevant
values (5pts)
array name first index last index
moreNumbers 0 99
prices .
characters
names
shoppingList

III. Create a complete Java program to demonstrate the user-defined functions created in
Test A. (50pts.)

Prepared by: Jayson Tamayo

You might also like