Answer:
See explaination
Explanation:
class Episode{
//Private variables
private String title;
private int seasonNumber;
private int episodeNumber;
//Argumented constructor
public Episode(String title, int seasonNumber, int episodeNumber) {
this.title = title;
this.seasonNumber = seasonNumber;
this.episodeNumber = episodeNumber;
}
//Getter and setters
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public int getSeasonNumber() {
return seasonNumber;
}
public void setSeasonNumber(int seasonNumber) {
this.seasonNumber = seasonNumber;
}
public int getEpisodeNumber() {
return episodeNumber;
}
public void setEpisodeNumber(int episodeNumber) {
this.episodeNumber = episodeNumber;
}
public boolean comesBefore(Episode e){
//Check if titles' match
if(this.title.equals(e.getTitle())){
//Compare season numbers
if(this.seasonNumber<e.seasonNumber){
return true;
}
//Check if season numbers match
else if(this.seasonNumber==e.getSeasonNumber()){
return this.episodeNumber<e.getEpisodeNumber();
}
}
return false;
}
atOverride // replace the at with at symbol
public String toString() {
return title+", season "+seasonNumber+", episode "+episodeNumber;
}
}
class Main{
public static void main(String[] args) {
Episode e = new Episode("Friends",1,1);
System.out.println(e);
Episode e2 = new Episode("The Wire",3,5);
System.out.println(e2);
System.out.println(e.getTitle()+" comes before "+e2.getTitle()+" = "+e.comesBefore(e2));
}
}
a. Lack of direction
b. Lack of coordination
c. Lack of delegation
d. Lack of control
Answer:
b. Lack of coordination
Explanation:
LAteral communication in human resources and organizational communication is known as the communication that exists between peers and colleagues, so that wouldn cause a lack of cirection, delegation or control because its not between bosses and employees, what it would cause would be a lack of coordination between the employees.
Answer:
b
Explanation:
b, lack of coordination
Answer:
192.168.228.0 255.255.255.224
Explanation:
192.168.228.0 255.255.255.128
subnet mask: defines the host and the network part of a ip
CIDR notation : is the shortened form for subnet mask that uses the number of host bits for defining the host and the network part of a ip
For example: 192.168.228.0 255.255.255.128 has CIDR equivalent of 192.168.228.0\25
To have atleast 20 hosts
20 ≤ (2^x) -2
x ≈5
with 5 host bits, we have 2^5-2 = 30 hosts per subnet
and 2^3 = 8 subnets
To get the subnet mask, we have 3 network bits
1110000 to base 10 = 2^7 + 2^6 +2^5= 224
192.168.228.0 255.255.255.224
Answer:hackers
Explanation:
The electric bill program illustrates the use of loops (i.e. iteration)
Loops are used to execute repetitive operations
The electric bill program in Python where comments are used to explain each line is as follows:
#This iteration shows that the process is repeated for 50 consumers
for i in range(50):
#This gets input for the consumer name meter number
mno = input("Consumer name meter number: ")
#This gets input for last month reading
lmr = int(input("Last month reading: "))
#This gets input for current month reading
cmr = int(input("Current month reading: "))
#This calculates the number of units
Nou = cmr - lmr
#This calculates the bills
bill = Nou*2
#This calculates the tax
tax = bill*0.15
#This calculates the netbills
netbill = bill+tax
#This next four lines print the electric bills
print("Number of units:",Nou)
print("Bills:",bill)
print("Tax:",tax)
print("Netbill:",netbill)
Read more about loops at:
Statement Reason
Whenever there is a puppy in the house, I feel happy
If I am happy, then there is a puppy in the house
If there is not a puppy in the house, then I am not happy.
If I am not happy, then there is no puppy in the house
Question 2
Statement Reason
If I am in school today, then I am in CSC231 class
If I am not in school today, then I am not civics class
If I am not in CSC231 class, then I am not in school today
If I am in CSC231 class, then I am in school today
Answer:
Question (1) the statements (i) and( iv) are logically equivalent and statements (ii) and (iii) are logically equivalent. Question (2) the statements (i) and (iii) are logically equivalent.
Explanation:
Solution
Question (1)
Now,
Lets us p as puppy in the house, and q as i am happy
So,
p : puppy in the house, and q : i am happy
Thus,
The Statements
(i) so if there is a puppy in the house, I feel happy : p -> q
(ii) If I am happy, then there is a puppy in the house : q -> p
(iii) If there is no puppy in the house, then I am not happy. : ~ p -> ~q
(iv) If I am not happy, then there is no puppy in the house : ~q -> ~p
Hence, the statements (i) and( iv) are logically equivalent and statements (ii) and (iii) are logically equivalent.
Question (2)
Let us denote p as i am in school today, and q as i am in CSC231 class, and r as i am in civics class,
So,
p: i am in school today, q: i am in CSC231 class, r: i am in civics class,
Now,
(i) if I am in school today, then I am in CSC231 class :p -> q
(ii) If I am not in school today, then I am not civics class :~p -> ~r
(iii) If I am not in CSC231 class, then I am not in school today :~q -> ~p
(iv) If I am in CSC231 class, then I am in school today : q -> p
Therefore, the statements i) and iii) are logically equivalent.