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

  Recursive factorial program

Write a class Array that encapsulates an array and provides bounds-checked access. Create a recursive factorial program that prompts the user for an integer N and writes out a series of equations representing the calculation of N!.

  Hunt the wumpus game

Reprot on Hunt the Wumpus Game has Source Code listing, screen captures and UML design here and also, may include Javadoc source here.

  Create a gui interface

Create GUI Interface in java programing with these function: Sort by last name and print all employees info, Sort by job title and print all employees info, Sort by weekly salary and print all employees info, search by job title and print that emp..

  Plot pois on a graph

Write a JAVA program that would get the locations of all the POIs from the file and plot them on a map.

  Write a university grading system in java

University grading system maintains number of tables to store, retrieve and manipulate student marks. Write a JAVA program that would simulate a number of cars.

  Wolves and sheep: design a game

This project is designed a game in java. you choose whether you'd like to write a wolf or a sheep agent. Then, you are assigned to either a "sheep" or a "wolf" team.

  Build a graphical user interface for displaying the image

Build a graphical user interface for displaying the image groups (= cluster) in JMJRST. Design and implement using a Swing interface.

  Determine the day of the week for new year''s day

This assignment contains a java project. Project evaluates the day of the week for New Year's Day.

  Write a java windowed application

Write a Java windowed application to do online quiz on general knowledge and the application also displays the quiz result.

  Input pairs of natural numbers

Java program to input pairs of natural numbers.

  Create classes implement java interface

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

  Java class, array, link list , generic class

These 14 questions covers java class, Array, link list , generic class.

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