Answer:
Explanation:
The following code is written in Java. It creates the Bug class with the position and direction variables. Then it creates a constructor, move method, turn method, and getPosition method. Finally, a bug object called bugsy is created in the main method, and we move it once to the right, then again to the right, and then we turn it and move it 5 times to the left, printing out the position when it is done moving. Output can be seen in the attached picture below.
class Brainly {
public static void main(String[] args) {
Bug bugsy = new Bug(10);
bugsy.move();
System.out.println("Current bug position: " + bugsy.getPosition());
bugsy.move();
System.out.println("Current bug position: " + bugsy.getPosition());
bugsy.turn();
bugsy.move();
bugsy.move();
bugsy.move();
bugsy.move();
bugsy.move();
System.out.println("Current bug position: " + bugsy.getPosition());
}
}
class Bug {
char direction = 'r';
int position = 0;
public Bug(int initialPosition) {
this.position = initialPosition;
}
public void turn() {
if (this.direction == 'r') {
this.direction = 'l';
} else {
this.direction = 'r';
}
}
public void move() {
if (this.direction == 'r') {
this.position += 1;
} else {
this.position -= 1;
}
}
public int getPosition() {
return this.position;
}
}
The correct answer is; " a unit of lexical meaning that underlies a set of words that are related through inflection."
Further Explanation:
The lexeme is part of the stream where the tokens are taken and identified from. When these streams become broken, there is always an error message. The lexeme is known as "the building blocks of language."
These are a very important part of computer programming. If any string or character is misplaced this can stop the entire program or operation.
One example of a lexeme is;
- the symbols (, ), and -> are for the letter C.
Learn more about computer programming at brainly.com/question/13111093
#LearnwithBrainly
Question: What is software and explain the five types of software
Explanation: The system software which is controlled and managed by the use of set of instructions and programs is called software.
Ex: Windows 7/8/10/xp etc...
the types of software are'
system software and application software
Android.
CentOS.
iOS.
Linux.
Mac OS.
MS Windows.
Ubuntu.
Unix.
Answer:
you cant mess up in theatre but you can redo scences in movies, thay both have acting in them
Explanation:
im a theatre person
The argument for the function would be answer "D".