Answered step by step
Verified Expert Solution
Question
1 Approved Answer
PLEASE WRITE CODE IN JAVA PLEASE DO NOT USE JAVA LIBRARIES FOR THE FOLLOWING Write a Java program that print a table as shown below.
PLEASE WRITE CODE IN JAVA
PLEASE DO NOT USE JAVA LIBRARIES FOR THE FOLLOWING
Write a Java program that print a table as shown below. The pogram takes an optional command line argument: an integer n0 which is the number of rows in the table. If the argument is omitted by the user, then the table should have ten rows. The table has seven columns, each column is nine characters wide and there is a gutter of one space between the columns. 1. Column 1: the decimal number i, decimal, right justified, separate 1000s with commas 2. Column 2: the six-digit, hexadecimal number i, zero-padded 3. Column 3: the number of bits needed to represent i 4. Column 4: the log base 2 of i2, rounded to three digits right of decimal point, right justified 5. Column 5: the decimal number i2, right justified, separate 1000s with commas 6. Column 6: the decimal number i3, right justified, separate 1000s with commas 7. Column 7: the percent of rows completed (rounded to the nearest integer percent) Please observe the headers and the lines of dashed before and after the table. Also please print the current date. It should be centered on the last line of the output. (Actually, there should be no trailing white space on the last line. And, if the necessary one less space on the right.) The date must be given as shown in Mexican Spanish. Not only will Java format the data anyway you wish, it will translated into most languages! For the command: java Table 10 the output would look something like this: domenica, 28 agosto 2022 123456789123456789123456789123456789123456789123456789123456789 The last line is just to help convey the column widthsStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started