Brookhaven College Write a Java Program Computer Programming Task Writ a 2 different Java program. All the information I attached in the word file. Write a | Course Hero

Brookhaven College Write a Java Program Computer Programming Task Writ a 2 different Java program. All the information I attached in the word file. Write a Java program that does the following. This can all be done inside the main() method.
1. Using the System class, use the method getProperty and display the result for the argument
“os.name”.
System.getProperty(“os.name”)
2. Using the System class, display the current time in milliseconds since Jan 1 1970. Hint: There
is a method that does just that.
3. Boolean Class. The purposes of this task is to convert a String that has the value “True” to a
boolean true.
A. Create a String named awake and assign it the string value “True”.
B. Create a primitive boolean variable named isAwake.
C. Using the Boolean wrapper class, assign the value of the String variable awake to the boolean
variable isAwake.
D. Display the value of isAwake;
4. Integer Class.
A.
Create a int variable and assign it the value of 100.
B.
Using the Integer wrapper class, display the value as a HexString. There is a method for that.
Note : There is no keyboard input for this class.
The results should be as follows. Your results for OS may vary and Milliseconds will vary.
Boolean and Hex results should match as below.
OS = Windows 10
Milliseconds since Jan 1 1970 = 1554768376670
My Boolean result for isAwake = true
My Hex Result for 100 = 64
The Locale Class is used to help write code that can be used – as-is – in multiple languages,
countries and cultures.
This assignment references information in these links:
https://docs.oracle.com/javase/7/docs/api/java/util/Locale.html
https://docs.oracle.com/javase/7/docs/api/java/util/Currency.html
Write a Java program that will display locale specific information.
1. In the main() method, create 4 objects ( instances) of the Locale class. Use the following 2
arguments for the objects. Name the objects with appropriate descriptive names.
A. “en”, “us” // This is English – US
B. “en”, “gb” // This is English – Great Britian
C. “es”, “mx” // This is Spanish – Mexico
D. “es”, “pa” // This is Spanish – Panama
2. Write a method named displayMyLocaleInfo. It needs to have 1 parameter that is a Locale
object.
3. The method displayMyLocaleInfo() needs to display data in the format given in step 5. It
must reference methods that are part of the Locale object to get data. The data for the first
2 ????? (below) can be obtained from the Locale Object.
4. Inside the displayMyLocaleInfo(), create a currency object using the available passed locale.
This is done as follows:
Currency currency = Currency.getInstance( myPassedLocale );
Using the currency object, obtain the name of the currency using one of the object’s
methods.
5. From the main() method, call the displayMyLocaleInfo() method for each of the created
objects. The displayMyLocaleInfo() method needs to display the data as below:
The country ????????? speaks ???? and uses the currency ?????? .
Expected Output. There is no keyboard input.
The country United States speaks English and uses the currency US Dollar.
The country United Kingdom speaks English and uses the currency British Pound Sterling.
The country Mexico speaks Spanish and uses the currency Mexican Peso
The country Panama speaks Spanish and uses the currency Panamanian Balboa.
5 point bonus – Display data for Japan. See the link below for proper parameters.
https://www.oracle.com/technetwork/java/javase/java8locales-2095355.html#installers

Purchase answer to see full
attachment

Don't use plagiarized sources. Get Your Custom Essay on
Brookhaven College Write a Java Program Computer Programming Task Writ a 2 different Java program. All the information I attached in the word file. Write a | Course Hero
This is a Snippet Preview, get a Complete Solution Here
Order Essay
superadmin

Recent Posts