Chat with us, powered by LiveChat Java Playing with The Bits & Hide the Number Programming Project - Essayabode

Java Playing with The Bits & Hide the Number Programming Project

Part 1  Playing with the bits.

Get the source from A3.java

Get a sample image sample.png

  • What you need to do: Look for the instructions in the source code.
  • Here is how the output image should look like: out.png (attached in the zip file)
  • Part 2 (. Hide the number.

Write a program that asks the user for a number (an integer). Then your program loads a png image and hides the number in the image using the LSB method.
Write another program that loads an image in which a number has been hidden. Then retrieve and display the hidden number.

The following program iterates through each bit of a number, from the most significant bit to least significant bit.

import java.util.Scanner;

public class A {
   public static void main(String args[]) {
       Scanner in = new Scanner(System.in);
       System.out.print(“Please give me a number: “);
       int N = in.nextInt();
       
       System.out.println(“nAn integer is ” + Integer.SIZE + ” bits long.n”);
       
       for(int i=Integer.SIZE-1; i >= 0; i– ) {
           int b = (N >> i) & 0x01;
           System.out.print(b + ” “);
       }
       System.out.println();
   }
}

Our website has a team of professional writers who can help you write any of your homework. They will write your papers from scratch. We also have a team of editors just to make sure all papers are of HIGH QUALITY & PLAGIARISM FREE. To make an Order you only need to click Ask A Question and we will direct you to our Order Page at WriteDemy. Then fill Our Order Form with all your assignment instructions. Select your deadline and pay for your paper. You will get it few hours before your set deadline.

Fill in all the assignment paper details that are required in the order form with the standard information being the page count, deadline, academic level and type of paper. It is advisable to have this information at hand so that you can quickly fill in the necessary information needed in the form for the essay writer to be immediately assigned to your writing project. Make payment for the custom essay order to enable us to assign a suitable writer to your order. Payments are made through Paypal on a secured billing page. Finally, sit back and relax.

Do you need an answer to this or any other questions?