Answer:
sorry its late
Explanation:
/*
* Write a program that guesses every possible 4 digit passcode
* combinations until the correct passcode is guessed.
*
* The passcode is randomly generated and stored in the variable
* secretPasscode.
*
* Print out how many guesses it took to guess the correct passcode.
*/
function start() {
var correctCode = generateRandomPasscode();
var b = 0;
while(true){
var guessCode = generateRandomPasscode();
b++;
if(isCorrect(guessCode, correctCode)){
println("The correct passcode was " + guessCode);
println("It took you " + b + " tries to guess it");
break;
}
}
}
function isCorrect(guessCode, correctCode) {
return guessCode == correctCode;
}
function generateRandomPasscode() {
var randomPasscode = "";
for(var i = 0; i < 4; i++) {
var randomDigit = Randomizer.nextInt(0, 9);
randomPasscode += randomDigit;
}
return randomPasscode;
}
Answer:
// here is code in java.
import java.util.*;
// class definition
class SammysRentalPrice
{
// main method of the class
public static void main(String[] args) {
// scanner object to read input from user
Scanner s=new Scanner(System.in);
// ask user to enter year
System.out.print("Enter the rented minutes:");
// read minutes
int min=s.nextInt();
// find hpurs
int hours=min/60;
// rest of minutes after the hours
min=min%60;
// total cost
int tot_cost=(hours*40)+(min*1);
// print hours,minute and total cost
System.out.println("total hours is: "+hours);
System.out.println("total minutes is: "+min);
System.out.println("total cost is: "+tot_cost);
}
}
Explanation:
Read the rented minutes of an equipment from user with the help of scanner object. Calculate the hours and then minutes from the given minutes.Calculate the cost by multiply 40 with hours and minute with 1.Add both of them, this will be the total cost.
Output:
Enter the rented minutes:140
total hours is: 2
total minutes is: 20
total cost is: 100
Answer:
b. the same data type
Explanation:
Any number of variables can be declared in a statement as long as the variables have the same data type. For example:
1) int a,b,c,d,e;
Here each of the declared variables a,b,c,d,e have the type int.
2) char p,q,r,s,t,u,v,w;
In this case variables p to w all have the type char.
3) float x,y,z;
x,y and z are all of type float.
1. B joint application design
2. A it is necessary to write most of the new code manually
3. D since users have been involved in the pro typing, managers can be confident that the system can handle large numbers of users
4. B extreme programming
5. C code that is produced using OOD is easy to secure
6. A more testing is preferable to less testing
7. C object-oriented development
8. D component-based development
9. A object
10. B the code can only represent information as objects
Answer:
Bluetooth is a wireless communication is typically limited to six feet distances
Explanation:
Bluetooth is one type of communication maximum it covers 10 meters to 30 meters. but it is one to one communication made for data transactions. After 25 meters of coverage on communication will be very slow on data transactions. But Bluetooth has also had a limitation.
IR. It is one of communication where infrared technology used. It is like face to face communication and speed of data transaction limited and it is also one to one communication made for data transactions. Communication paired and covered very little distances.
NFC it is chip-based and covers very little in fact just to device meet each and communication started. And very it caries very little data during the data transactions. it is also one to one communication made for data transactions
RFID is one of communication and it is powerful to cover more areas with multiple connections at the same time. It has a limitation in distance and it covers like a net with a specific distance