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
Why Work with Us
Top Quality and Well-Researched Papers
We always make sure that writers follow all your instructions precisely. You can choose your academic level: high school, college/university or professional, and we will assign a writer who has a respective degree.
Professional and Experienced Academic Writers
We have a team of professional writers with experience in academic and business writing. Many are native speakers and able to perform any task for which you need help.
Free Unlimited Revisions
If you think we missed something, send your order for a free revision. You have 10 days to submit the order for review after you have received the final document. You can do this yourself after logging into your personal account or by contacting our support.
Prompt Delivery and 100% Money-Back-Guarantee
All papers are always delivered on time. In case we need more time to master your paper, we may contact you regarding the deadline extension. In case you cannot provide us with more time, a 100% refund is guaranteed.
Original & Confidential
We use several writing tools checks to ensure that all documents you receive are free from plagiarism. Our editors carefully review all quotations in the text. We also promise maximum confidentiality in all of our services.
24/7 Customer Support
Our support agents are available 24 hours a day 7 days a week and committed to providing you with the best customer experience. Get in touch whenever you need any assistance.
Try it now!
How it works?
Follow these simple steps to get your paper done
Place your order
Fill in the order form and provide all details of your assignment.
Proceed with the payment
Choose the payment system that suits you most.
Receive the final file
Once your paper is ready, we will email it to you.
Our Services
No need to work on your paper at night. Sleep tight, we will cover your back. We offer all kinds of writing services.
Essays
No matter what kind of academic paper you need and how urgent you need it, you are welcome to choose your academic level and the type of your paper at an affordable price. We take care of all your paper needs and give a 24/7 customer care support system.
Admissions
Admission Essays & Business Writing Help
An admission essay is an essay or other written statement by a candidate, often a potential student enrolling in a college, university, or graduate school. You can be rest assurred that through our service we will write the best admission essay for you.
Reviews
Editing Support
Our academic writers and editors make the necessary changes to your paper so that it is polished. We also format your document by correctly quoting the sources and creating reference lists in the formats APA, Harvard, MLA, Chicago / Turabian.
Reviews
Revision Support
If you think your paper could be improved, you can request a review. In this case, your paper will be checked by the writer or assigned to an editor. You can use this option as many times as you see fit. This is free because we want you to be completely satisfied with the service offered.