Start
Int ID = user.input
String name = user.input
Int roomType = user.input
Int commission = 0
If roomType == 3 rooms
commission = $100
Else if roomType == 2 rooms
commission = $75
Else if roomType == 1 rooms
commission = $55
Else if roomType == studio
commission = $30
Print name
Print ID
Print commission
End
Answer:
public class Class {
private String name ="";
private int score = 0;
//Method SetName
public void setName(String newName){
name = newName;
}
//Method SetScore
public void setScore(int newScore){
score = newScore;
}
//Method GetName
public String getName() {
return name;
}
//Method GetScore
public int getScore() {
return score;
}
}
Explanation:
- The class called Class is implemented in Java programming language
- It has two fields (instance variables name and score)
- Methods for setting the values of variables (mutator methods) or setters
- Methods for getting the values of the variables (accessor methods) getters
Answer:
Check explanation
Explanation:
Two stacks can make use of one array by utilizing various stack pointers that begins from different ends of an array. Looking at the array A[1...
], the first stack will drive elements that starts from position 1 as well as to move its' pointer to
.
The Second stack will begin at the
position and motion its' pointer to 1. The best likely divide is to offer each stack a half of an array. whenever any of two stacks transverse the half-point, an overflow can happen but for that overall number of elements, it must be
With the aid of pointer-based arithmetic operations and the usage of pointers in comparison operations, address arithmetic is a technique for determining the address of an object. Pointer arithmetic is another name for address arithmetic.
The pointers can be used for mathematical operations like addition, subtraction, etc. The outcome of an arithmetic operation on the pointer, however, will likewise be a pointer if the other operand is of type integer because we know that the pointer includes the address. These operations are addition and subtraction. In C++, a pointer's value can be increased or decreased. It signifies that we can change the pointer's value by adding or removing integer values. A pointer arithmetic can be subtracted (or added) from another in a manner similar to this.
Learn more about arithmetic here-
brainly.com/question/11424589
#SPJ4