Java program by array

Assignment Help JAVA Programming
Reference no: EM13213635

Write a java program by array:
It would be nice to display images by some means other than printing out integers. Ideally, your program should read and write images using standard image formats. But actual image formats, like giff, tiff, and jpeg are very complicated. Instead, write a program that displays an image by using rows of characters to represent brightness levels. 

Write a program that reads in a file that contains one integer per line. Each integer represents one location in the image. Assume that there are 64 rows and 64 columns in the image. Assume that the integers are in the range 0 to 63. 

For each integer, write out a single character depending on its value: 

· 0 to 7: space 

· 8 to 15: . 

· 16 to 23: , 

· 24 to 31: - 

· 32 to 39: + 

· 40 to 47: o 

· 48 to 55: O 

· above 55: X 

Don't put extra spaces between characters. Start a new line after each row of 128 characters. This is one place where the switch statement is convenient. To use it, divide the input value by 8 to get the integer for the switch. Or you can use eight if-else statements if you prefer. 

Reference no: EM13213635

Questions Cloud

State what is the final pressure of the whole system in atm : Three bulbs are connected by tubing, and the tubing is evacuated. The volume of the tubing is 32.0 mL. The first bulb has a volume of 35.0 mL and contains 3.00 atm of argon, the second bulb has a volume of 250 mL and contains 2.27 atm of neon
Compute the molar mass of the unknown gas : From the same container under the same conditions--same temperature and initial pressure, it takes 40 s for 1.00 L of O2 gas to effuse. Calculate the molar mass (in grams/mol) of the unknown gas.
Explain the original pressure of argon in the cylinder : If the pressure in the cylinder is 5.28 atm after the neon is added, what was the original pressure (in atm) of argon in the cylinder?
Painful divorce : While Professor Gomez was going through a painful divorce, he tended to create unnecessarily difficult tests and gave his students unusually low grades. A psychoanalyst would be most likely to view the professor's treatment of students as an example ..
Java program by array : Write a program that reads in a file that contains one integer per line. Each integer represents one location in the image. Assume that there are 64 rows and 64 columns in the image
Explain what is the partial pressure of argon : What is the partial pressure of argon, in torr, in a container that also contains neon at 147 torr and is at a total pressure of 536 torr?
Explain what mass of water in grams forms from the reaction : What mass of water (in grams) forms from the reaction of 2.58 L of hydrogen gas and 2.26 L of oxygen gas?
Why was the annexation of texas so controversial : Why was the annexation of Texas so controversial? What conditions gave rise to the early women's rights movement?
Reaction of magnesium metal with hcl yields hydrogen gas : The reaction of magnesium metal with HCl yields hydrogen gas and magnesium chloride. What is the volume, in liters, of the gas formed at 736 torr and 18 oC from 4.49 g of Mg in excess HCl?

Reviews

Write a Review

JAVA Programming Questions & Answers

  Definition of a method named copy receives

Write the definition of a method named copy receives a reference to a Scanner object associated with a stream of input. The method reads all the Strings remaining to be read from the stream and displays them

  Implement a shopping cart class with user interface

project will be to implement a shopping cart class with user interface (UI) that contains main() in Net Beans. The UI class will be used to perform user input/output and to invoke the appropriate methods of shopping cart class. When your program star..

  Specify, design, and implement a class

Specify, design, and implement a class that can be used in a program that simulates a combination lock. The lock has a circular knob with the numbers 0 through 39 marked on the edge, and it has a three-number combination, which we will call x,y,z.

  Implement the finite field gf

Write a program called "GF2.java" to implement the finite field GF(p n )where p is a prime number andn is a positive integer.You also need to write four methodsto realize.

  Create the working applet to compute tax

Write down a java applet. Your applet assits to find out how much federal tax we require to pay suppose the tax rate is 12%. Create and implement the working applet to compute tax.

  Javascript validation - cgi program

CGI mailer script form-mail.pl to your server's cgi-bin directory, and change the permissions on the script to make it executable - BMIS 310

  Use inheritance to read, store, and print questions for test

use inheritance to read, store, and print questions for a test. First, write an abstract class

  Distance traveled modification

Distance Traveled Modification

  Write a java application to ask number of assignments

Write a java application that accomplishes the following tasks with built in exception handling: ask the number of homework assignment students have submitted in a semester

  Display a welcome message to your user

Write a one screen description of your initial reactions to Java. Reactions may be both positive and negative. At the end of this module you will be asked to write a reply to these initial reactions.

  Create classes implement java interface

Interface that contains a generic type. Create two classes that implement this interface.

  Write a program called word guessing game.

Write a program called Word Guessing Game. Open the file FourLetterWords.txt and write the contents into an array of Strings (the file has 87 words in it).

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd