Having input trouble with a personal Java project

Fortitude

Estimable
Jun 19, 2014
24
0
4,560
0
I'm currently in AP Computer Science at my high school and find it very interesting. I'm trying to write a program as a personal project, (not for a grade), that converts letters to a 5-bit Binary value using "l" and "o". How can I achieve functionality? I'm attempting to be able to type in the values and output the letter, and input the letter to output the values.
An example would be typing a and "ooool" outputs, typing b causes "ooolo" to output and so on.

Java:
import java.util.Scanner;

class BLT
{
	public static void main(String args[])
	{
	   String a = "ooool";
	   String b = "ooolo";
	   String c = "oooll";
	   String d = "ooloo";
	   String e = "oolol";
	   String f = "oollo";
	   String g = "oolll";
	   String h = "olooo";
	   String i = "olool";
	   String j = "ololo";
	   String k = "ololl";
	   String l = "olloo";
	   String m = "ollol";
	   String n = "olllo";
	   String o = "ollll";
	   String p = "loooo";
	   String q = "loool";
	   String r = "loolo";
	   String s = "looll";
	   String t = "loloo";
	   String u = "lolol";
	   String v = "lollo";
	   String w = "lolll";
	   String x = "llooo";
	   String y = "llool";
	   String z = "llolo";
//- - - - - - -^^^^^- Letters to Values -^^^^^- - - - - - - - - -vvvvv- values to letters -vvvvv- - - - -
		String ooool = "a";
		String ooolo = "b";
		String oooll = "c";
		String ooloo = "d";
		String oolol = "e";
		String oollo = "f";
		String oolll = "g";
		String olooo = "h";
		String olool = "i";
		String ololo = "j";
		String ololl = "k";
		String olloo = "l";
		String ollol = "m";
		String olllo = "n";
		String ollll = "o";
		String loooo = "p";
		String loool = "q";
		String loolo = "r";
		String looll = "s";
		String loloo = "t";
		String lolol = "u";
		String lollo = "v";
		String lolll = "w";
		String llooo = "x";
		String llool = "y";
		String llolo = "z";
//-------------------------------------------
		System.out.println("*******************************************");
		System.out.println("*                                         *");
		System.out.println("*                   5BBLT                 *");
		System.out.println("*   -5 Bit Binary Language Converter-     *");
		System.out.println("*                                         *");
		System.out.println("*             By mmmmmmm mmmmmm           *");
		System.out.println("*                                         *");
		System.out.println("*                                         *");
		System.out.println("*******************************************");
//-------------------------------------------
Scanner in = new Scanner(System.in);
System.out.println("Enter your message.");
//-------------------------------------------

		 = in.nextLine();
      System.out.println(""+ );


	}
}
 
Thread starter Similar threads Forum Replies Date
Y Apps General Discussion 1
A Apps General Discussion 3
S Apps General Discussion 2
R Apps General Discussion 3
I Apps General Discussion 2
E Apps General Discussion 1
S Apps General Discussion 1
S Apps General Discussion 3
Rainfire Apps General Discussion 3
A Apps General Discussion 6
P Apps General Discussion 5
FlamingFox Apps General Discussion 1
B Apps General Discussion 3
P Apps General Discussion 3
J Apps General Discussion 1
M Apps General Discussion 1
M Apps General Discussion 6
shiftyape Apps General Discussion 3
S Apps General Discussion 1
G Apps General Discussion 2
Similar threads
Write a program to calculate commission for the input valu of sales amount
Getting keyboard input through microfone
I don't have steam but I have origin and I've downloaded a few games (i had a disc input on my old computer) on my first compu
Installed Equalizer APO and now discord wont detect microphone input
1. Write a program that outputs the greatest common divisor of two positive integers. For example, if you input two positive
Gmail response input problems...
How to take user input of one form and assign it to a variable in another form in java?
How to compare user input in a jTextfield with data in the database? (im using java & php)
How do I make a yes or no question with different outcomes depending on input?
3. Write a C# application that asks the user to input ‘A’ and ‘B’ and prints the sum of squares of all even numbers be
Asus Tweaker is causing my monitor to display "input not supported"
[Survey] Wanting Input on Media Players
Batch file to open app, and input commands.
input the roman numerals from text file and convert it into arabic and again write it into text file in java
I need a program that takes HTML file as input and convert it to hypertree of webOQL type. You may consider a simple HTML file
How can I get Speedfan to work constantly without any user input?
Write a program that reads 3 integers as input and prints the second largest of these three numbers. Example: Input: 3 4 5 Out
c++ how to advance if dont get input
After Effects Text Input
How do I re-addres keyboard input?

ASK THE COMMUNITY