Answer:
import java.util.Scanner;
public class ANot {
public static void main(String[] args) {
Scanner in = new Scanner (System.in);
System.out.println("How many cookies did you eat today");
int numOfCookies = in.nextInt();
double numCalories = (numOfCookies*300)/4;
System.out.println("The total number of calories you consumed in "+numOfCookies+" cookies is " +
" "+numCalories);
}
}
Explanation:
This code is implemented in Java.
- We know from the question that 4 cookies contain 300 calories
- Therefore number of calories consumed = (number of cookies eaten*300)/4
- To implement this in java we used the scanner class to prompt user for the input
- save the input to a variable and write mathematical expression for the number of calories consumed
- Then output the result
UDP = connectionless vs. TCP is connection oriented.
Answer:
1. - Observer
2. - iterator
3. - strategy
4. - composite
5. - decorator
Explanation:
An object contains other objects (elements) and must give access to them for clients, without exposing its internal structure. This is an observation.
The subject-object can generate events as an iterable (iterator) and could use different strategic algorithms to achieve a task. Class objects can be used to aggregate other class objects.
In python, the decorator function mimics the outer function of a nested function, but still maintains the functionality of the second function
Resource allocation is a function performed by control programs that manages computer resources, such as storage and memory. It is necessary for any application to be run on the system because the computer is required to allocate certain resources for it to be able to run once the user opens any program.
<u>Normally windows end user can login 3 ways as follow:</u>
1. End user can Login as local account where user has not connected or even connected to local Area network LAN.
2. Next user can login into cloud accounts nothing but hot mail accounts
3. Login to windows domain controller where end user should connect to LAN.
Purpose of installation of Windows domain controller with Active Directory is to keep trace and keep log history activities.
Due to windows domain controller with Active Directory end user desktop or laptop has control on software access also.
Every time when end user login on windows domain controller a small modified is executed whenever is required. It is not going effort the workstation performances.
Note: - Domain severs should be POWER on first.