Answer:
The attached files contain the realization of a D flip-flop from an RS flip-flop. It also contains the truth tables for both kinds of flip-flops
Explanation:
An SR flip flop is like a light switch. Set turns it 'on' and reset turns it 'off'
A D type flip-flop is a clocked flip-flop which has two stable states. A D type flip-flop operates with a delay in input by one clock cycle.
D type flip-flops are easily constructed from an SR flip-flop by simply connecting an inverter between the S and the R inputs so that the input to the inverter is connected to the S input and the output of the inverter is connected to the R input.
Answer:
public class SimpleSquare{
public int num;
private int square;
public SimpleSquare(int number){
num = number;
square = number * number;
}
public int getSquare(){
return square;
}
}
Explanation:
*The code is in Java.
Create a class called SimpleSquare
Declare two fields, num and square
Create a constructor that takes an integer number as a parameter, sets the num and sets the square as number * number.
Since the square is a private field, I also added the getSquare() method which returns the value of the square.
Answer:
#program in Python
#read until user Enter an integer
while True:
#try block to check integer
try:
#read input from user
inp = int(input("Enter an integer: "))
#print input
print("The integer is: ",inp)
break
#if input is not integer
except ValueError:
#print message
print("Wrong: try again.")
Explanation:
In try block, read input from user.If the input is not integer the print a message in except block.Read the input until user enter an integer. When user enter an integer then print the integer and break the loop.
Output:
Enter an integer: acs
Wrong: try again.
Enter an integer: 4a
Wrong: try again.
Enter an integer: 2.2
Wrong: try again.
Enter an integer: 12
The integer is: 12
Answer:
The option to add the date and time to a document is located in the
text grouping on the Insert tab.
Explanation: