Professional Documents
Culture Documents
Programming Fundamentals I 18-19 - Laboratory Sessions Lab Exam - Group A2 Description
Programming Fundamentals I 18-19 - Laboratory Sessions Lab Exam - Group A2 Description
3.) Remove and sort: Given a one-dimensional array of integers (values previously
read from the keyboard), remove all duplicate values of each number, sort the array in
decreasing order, and show the original array followed by the result array.
e.g.: original array: [7, 3, -5, 7, 11, 7]
result array: [11, 7, 3, -5]
4.) Sum of odd numbers in 2D array: Given an “NxM“ array of integers (values
previously read from the keyboard), show the original array followed by the sum of all
odd values.
3 − 5 7 11
e.g.: original array: [2 0 4 − 2]
7 1 6 22
Total sum of odd numbers: 24
The implemented program (*.java) must be uploaded to “Campus Virtual” at the end of
the class time. A template called “LabExamA2.java” is available at “Campus Virtual” to
help with your coding.
Notes:
- Use of modular programming will be a mandatory aspect.
- Show the output for each option in a fancy way.
- Control of errors in keyboard inputs and out of range options through condition
statements.
- Use of class notes is not allowed
- This task can be made in pairs.
It will be scored:
- Code is easily readable (cleaning, correct indentation, appropriate names for
variables, correct statements and loops, comments).
- Use of methods (mandatory)
- Program runs/works properly for each option (1, 2, 3, 4, and 5).
- Program builds/compiles with no errors (mandatory).