Answer:
public class Person {
//fields
private int id;
private String name;
private Payment pay;
//constructor
public Person(String name, int id,
int startSal, int startBon){
this.name = name;
this.id = id;
this.pay = new Payment(startSal, startBon);
}
//method get name
public String getName(){
return name;
}
//method get id
public int getId(){
return id;
}
//method get start salary
public int getStartSalary(){
return pay.startSalary;
}
//method get start bonus
public int getStartBonus(){
return pay.startBonus;
}
//inner payment class
private class Payment{
int startSalary;
int startBonus;
public Payment(int sal, int bon){
this.startSalary = sal;
this.startBonus = bon;
Answer:
d. Internet Protocol
Explanation:
Internet Protocols suite are used to transport packets from the host network across other networks. This task is usually performed by optimizing the size of each available packet, which are then forwarded through the internet protocol (IP) address.
Therefore, Internet Protocol is responsible for packet forwarding.
Explanation:
The difference between entry condition loop is and exit - condition loop is that the entry condition loops first checks the condition to enter the loop body if the condition true then the loop body is executed otherwise loop body is not executed while the exit-condition loops first executes the loop body and then the condition for the loop is checked.
There are three loops in C that are as following:-
- For
- While
- Do While
Among these three loops While and For loops are entry condition loops and Do While loop is exit condition loop.
For example:-
for(int i=0;i<10;i++)
{
printf("%s","John Doe\n");
}
If the initial value of i should have been 10 then loop body didn't had executed.
int i=0;
while(i<4)
{
printf("%s","John Doe\n");
}
If you try to run this while loop nothing will print on the screen because the condition is false.So the compiler will not enter the loop body and will skip over it.
int i=5;
do{
printf("%s","John Doe\n");
}while(i<4);
Even if the condition is false.You will see that the John doe have been printed one time on the screen because first the body is executed then the condition is checked.
Answer:
to tell the truth
Explanation:
l mean there is no reason to keep it secret