akosiraff

Download PROG24178 – JAVA 2 FINAL JAVA Answer

Jan 8th, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.83 KB | None | 0 0
  1.  
  2. Download: https://solutionzip.com/downloads/prog24178-java-2-final/
  3. PROG24178 – JAVA 2 FINAL
  4. TAKE HOME VERSION – Fall 2017
  5. Section 1 – Console Applications
  6. 1) Write a program that uses two nested for loops and the modulus operator (%) to
  7. detect and print prime numbers. A prime numbers are integral numbers that are
  8. not evenly divisible by any other numbers except themselves and 1. Use your
  9. program to print all the prime numbers from 0 to 100,000. Print 10 numbers per
  10. output line, separated by two spaces.
  11. 2) Write a method that creates and initializes a two-dimensional array of primitive
  12. type double. The size of the array is determined by the arguments of the method,
  13. and the initialization values are a range determined by beginning and ending
  14. values that are also arguments of the method (so four arguments total). Create a
  15. second method that will print the array generated by the first method. In main(),
  16. test the methods by creating and printing several different sizes of arrays.
  17. 3) Write an application that prints the following diamond shape. You may use output
  18. statements that print a single asterisk (*), a single space or a single newline
  19. character. Maximize your use of repetition (with nested for statements), and
  20. minimize the number of output statements.
  21. *
  22. ***
  23. *****
  24. *******
  25. *********
  26. *******
  27. *****
  28. ***
  29. *
  30. Section 2 – GUI Applications
  31. 4) Create the following GUI and provide full functionality for the calculator.
  32. 5) Write a temperature conversion application that converts from Fahrenheit to
  33. Celsius. The Fahrenheit temperature should be entered from the keyboard (via a
  34. JTextField). A JLabel should be used to display the converted temperature. Use the
  35. following formula for the conversion:
  36. Celciu s = 5
  37. 9
  38. × (Far en h eit – 32)
  39. Download: https://solutionzip.com/downloads/prog24178-java-2-final/
Add Comment
Please, Sign In to add comment