Answer:
Web technology refers to the means by which computers communicate with each other using markup languages and multimedia packages. It gives us a way to interact with hosted information, like websites.
Here is my solution. I did the following:
- changed the setRemover into a constructor, since the comment seems to hint that that is expected.
- changed the lookFor type into a String, so that it can work with the string replace overload. That's convenient if you want to replace with an emtpy string. The char type won't let you do that, you can then only replace one char with another.
- Added a static Main routine to use the class.
import java.lang.System.*;
public class LetterRemover
{
private String sentence;
private String lookFor;
public LetterRemover() {}
// Constructor
public LetterRemover(String s, char rem)
{
sentence = s;
lookFor = String.valueOf(rem);
}
public String removeLetters()
{
String cleaned = sentence.replace(lookFor, "");
return cleaned;
}
public String toString()
{
return sentence + " - letter to remove " + lookFor;
}
public static void main(String[] args)
{
LetterRemover lr = new LetterRemover("This is the tester line.", 'e');
System.out.println(lr.toString());
String result = lr.removeLetters();
System.out.println("Resulting string: "+result);
}
}
Answer:
- The leftmost 1 in 101 gives the 4.
- 1 in 101 (using binary system) gives the bits that must be counted to make a decimal number.
Explanation:
While working on binary system, we represent the decimal digits (0-9) by using only two digits 0's and 1's. They are written by dividing the decimal digit by 2 and then recording the remainder bits in reverse order.
As given in the question 5 is represented in binary as 101.
Now converting binary to decimal:
- The bits of binary number are multiplied by increasing powers of 2 (starting from the right) and added to get decimal value.
- So the binary number 101 will be interpreted as:
- So the leftmost 1 will show the presence of 4.
- 1 in the number 101 shows which bits will be weighted to give the required value.
i hope it will help you!
Answer The data structure and algorithm provide a set of techniques for that program in order for it to function. think of it like yt
Explanation: