Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Create a Java project using Eclipse that has one class named Problem1. In the ma

ID: 3675332 • Letter: C

Question

Create a Java project using Eclipse that has one class named Problem1. In the main function, write code that implements the flow chart below. All your code may be in the main function.

Problem 1 (50 points) Create a Java project using Eclipse that has one class named Probleml. In the main function, write code that implements the flow chart below. All your code may be in the main function. Start Ask user to enter a number Print "Enter a larger number Is the number >10? No Yes Print "The number you The in this statement is the number that they just entered entered is Add the number to an array Have they entered valid numbers? No Yes Stop and print the list of valid numbers entered End

Explanation / Answer

Problem1.java

package org.students;

import java.util.Scanner;

public class Problem1 {
   public static void main(String args[]) {
       int i=0;
       int count = 0;
       int num[] = new int[4];
       //This do-while loop will run untill the user have entered 4 valid numbers.
       do
       {
           System.out.println("");
           System.out.print("Enter a number greater than 10:");
           Scanner sc = new Scanner(System.in);
           int number = sc.nextInt();
           if (number > 10)
           {
              
               System.out.println("The Number you entered:" + number);
              
           num[i] = number;
           i++;
           count++;
              
           }else
           {
               System.out.println("");
               System.out.println(":: Please enter a larger number greater than 10::");
               continue;
           }

       }while(count<4);
       System.out.println("");
       System.out.print("The Numbers you Entered are:");
       //This Will print the Elements in the array.
       for( i=0;i<4;i++)
       {
           System.out.print(num[i]+" ");
       }

   }
}

-------------------------------------------------