It’s C. An MP3 file is an audio/video file, so only a media player would be able to play this
Answer:
see explaination
Explanation:
class Employee
{
String name;
double salary;
void tostring()
{
System.out.println("Employee:\nName: "+name+"\nSalary: "+salary+"\n");
}
Employee(String n,double s)
{
name=n;
salary=s;
}
}
class Manager extends Employee
{
String department;
void tostring()
{
System.out.println("Manager:\nName: "+name+"\nDepartment: "+department+"\nSalary: "+salary+"\n");
}
Manager(String n,double s,String d)
{
super(n,s);
department=d;
}
}
class Executive extends Manager
{
void tostring()
{
System.out.println("Executive:\nName: "+name+"\nDepartment: "+department+"\nSalary: "+salary+"\n");
}
Executive(String n,double s,String d)
{
super(n,s,d);
}
}
public class test
{
public static void main(String args[])
{
Employee e =new Employee("Neo",12000);
e.tostring();
Manager m =new Manager("Cramster",100000,"Homework");
m.tostring();
Executive ex =new Executive("Chuks",1000000,"Homework");
ex.tostring();
}
}
Answer:
Portrait orientation is taller then it is wide, while landscape orientation is wider then it is tall.
Explanation:
Answer:
b) Bounded Waiting
Explanation:
int currentThread = 1;
bool thread1Access = true;
bool thread2Access = true;
thread1 { thread2 {
While (true) {
While (true)
{
while(thread2Access == true)
{
while(thread1Access == true)
{
If (currentThread == 2) {
If (currentThread == 1)
{
thread1Access = false; thread2Access = false;
While (currentThread == 2);
While (currentThread == 1);
thread1Access = true; thread2Access = true;
} }
/* start of critical section */ /* start of critical section */
currentThread = 2 currentThread = 1
… ...
/* end of critical section */ /* end of critical section */
thread1Access = false; thread2Access = false;
… ...
} }
} }
} }
It can be seen that in all the instances, both threads are programmed to share same resource at the same time, and hence this is the bounded waiting. For Mutual exclusion, two threads cannot share one resource at one time. They must share simultaneously. Also there should be no deadlock. For Progress each thread should have exclusive access to all the resources. Thus its definitely the not the Progress. And hence its Bounded waiting.