The Result Must Be Formated Like The Given Tesstcase
The Result Must Be Formated Like The Given Tesstcase
- Create a new folder that is named with the following format: studentID-studentname-
workshopNumber. The folder contains 4 projects: Q1,Q2,Q3,Q4,….
Example: se18123-nguyenvana-WS01 or SE12123-nguyen van a-WS01
- Use jdk 1.8
- The result must be formated like the given tesstcase
- Submit your result to the LMS page( example : se18123-nguyenvana-WS01.zip)
Q1: Create a new project named “Q1”, and then create a class “Tester” in the default package. In the
main method, you are required to enter the list of integers and display the sum of these numbers.
For example:
TC1: TC2:
10 0
50 1
20 2
30 4
40 0
OUTPUT: OUTPUT:
150 7
Q2: Create a new project named “Q2”, and then create a class “Tester” in the default package. In the
main method, you are required to enter the list of chars and display all digit chars
for example:
TC1: TC2:
a a
c c
1 e
2 2
v v
4 OUTPUT:
OUTPUT: 2
124
Q3: Create a new project named “Q3”, and then create a class “Tester” in the default package. In the
main method, you are required to enter a string and do :
Q4: Create a new project named “Q4”, and then create a class “Tester” in the default package. In the
main method, you are required:
-Enter and convert the list of digit characters to a string . For example:
input :
‘2’
‘3’
‘1’
OUTPUT:
[231]
-Enter and conert the list of digit characters to an integer. For example:
input :
‘2’
‘3’
‘1’
OUTPUT:
[231]
-Enter a string and convert to an integer. For example:
input:
190
OUTPUT:
190
-Enter a string and convert to a float. For example:
INPUT:
190.5
OUTPUT:
190.5
-Enter a number and display this number. For example:
INPUT :
15.208
OUTPUT:
15.20