cse-110-lab-7 - CSE 110 Laboratory Assignment 7 This...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: CSE 110 Laboratory Assignment 7 This assignment is due by 11:59 PM on Sunday, October 31. Submit your .java fle through Blackboard be sure to submit through the link that corresponds to your lab day and time. Lab Description In this week s lab, we will continue to learn about the new String variable type, and we will use it to create a crude translator For the Pep/7 machine instruction Format that we discussed in lecture on Monday. or example, given the input 000010010000000000010000 our program will print something like Load the memory address 16 As Lab 6 explained, Java has a variable type called String , which can store a sequence oF characters (like a word or a complete sentence). String s are used to represent non-numeric data like usernames, passwords, and other general text. You can declare and initialize a String variable just like the other kinds oF variables that we ve seen: String x = abcd; Note the double quotes; they tell Java that everything inside them is a sequence oF characters. Unlike the other kinds oF variables we ve worked with so Far ( int and float ), String variables have several special Features built into them (in case you re wondering, this is because the String type is actually a Full-edged Java class, rather than just a dumb container For data). A String value can tell you how many characters it contains, and give you copies oF some or all oF those characters. String s also need to be compared in a special way, because they are stored diFFerently in memory From so-called primitive variables like...
View Full Document

This note was uploaded on 12/06/2011 for the course CSE 110 taught by Professor Shaunakpawagi during the Fall '08 term at SUNY Stony Brook.

Page1 / 3

cse-110-lab-7 - CSE 110 Laboratory Assignment 7 This...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online