This lab requires you to run two different programs. So, create projects named Lab05a, and Lab05b -- and use the default package names for those projects. Activity #1: Download the program named Draw Diamond.java. The program draws a diamond shape, i.e., a triangle with apex pointing up joined by lower triangle with apex down (See sample output 2). Program reads the height of the top triangle from the user. The height needs to be between 3 and 10. If the user enters an invalid size, the program objects and ends -- pausing to ensure that the user sees the message. Otherwise, the program continues on to draw the diamond. It first prints the top triangle, followed by the bottom triangle. The height of the bottom triangle is one less than the height of the top triangle. The code provided draws the upper triangle. Your task is to draw the lower triangle of the diamond shape. Use nested for loops to do the task. Sample outputl: Draw Diamond This program prints a diamond shapel By Jiju Poovancheri (A00000000) Please enter the height of the upper triangle: 2 That's not a valid size. I can only do shapes from 3 to 10 Quitting now. Press enter... Sample output2: Draw Diamond This program prints a diamond shapel By Jiju Poovvancheri (A00000000) Please enter the height of the upper triangle: 4 Diamond shape: Activity #2: Create program named Calculate Power.java. The program should implement the integer powering function, i.e. pow (x, n)=x" (x raised to n). The program reads the base (x) and exponent (n) from the user. It uses the loop to calculate X". You are not allowed to use Ja.puwU TUNCTIUNI U UU is ask, ricas HU UCIOW a Tew sample outputs. Sample outputl: Power Function This program calculates xn By Jiju Poovvancheri (A00000000) Please enter the base 10 Please enter the exponent 2 10^2 is 100 Sample output2: Power Function This program calculates xn By Jiju Poovvancheri (A00000000) Please enter the base 100 Please enter the exponent 4 100-4 is 100000000 Sample output3: Power Function This program calculates xn By Jiju Poovvancheri (A00000000) Please enter the base-2 Please enter the exponent 9 -29 is - 512