subject
Computers and Technology, 17.04.2021 23:00 youby

Recently you have visited China and you are affected by corona virus so that you have to stay in the hospital for fourteen days. Again, you are

a graduate of Computer Science and Engineering. So, you want to make an

application by which you can track every one of the hospitals those who are affected

by corona virus in the hospital smoothly. The Hospital has only 10 seats for the

patient. On a specific day 10 patient has been admitted in the hospital and 6 of them

are affected by corona virus. Now you have to accomplish the following task.

Define a class Patient that has three instance variables: patientId (int type and

starting from 1 to 10), isCorona (a boolean type; true if the patient has corona; false

otherwise), age(int type). All of the data fields should not be accessible from outside

of the class. Include appropriate constructors. Add toString() method that returns a

string containing patient’s information.

Write a Main class HealthDemo that includes a main() method for testing the

functionalities of these classes: Patient. Create an array of Patient class for 10

Patient’s and invoke add (Paitent) and toString() methods of the Patient class

appropriately. Remember that, for admission of the 10th patient print a message “Seat

is not available”. Finally print the sum of the ages of the people affected by corona

virus.

Hint: use static variable wisely.
Using Java programming language

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 22:00
Determine which of the four levels of measurement (nominal, ordinal, interval, ratio) is most appropriate for the data below. internet speed levels of "fast comma " "medium comma " and "slow" choose the correct answer below. a. the ordinal level of measurement is most appropriate because the data can be ordered comma but differences left parenthesis obtained by subtraction right parenthesis cannot be found or are meaningless. nothing nothing nothing nothing nothing b. the interval level of measurement is most appropriate because the data can be ordered comma differences left parenthesis obtained by subtraction right parenthesis can be found and are meaningful comma and there is no natural starting point. c. the nominal level of measurement is most appropriate because the data cannot be ordered. nothing d. the ratio level of measurement is most appropriate because the data can be ordered comma differences left parenthesis obtained by subtraction right parenthesis can be found and are meaningful comma and there is a natural starting point.
Answers: 2
question
Computers and Technology, 22.06.2019 12:20
Usually, when we sniff packets, we are only interested certain types of packets. we can do that by setting filters in sniffing. scapy’s filter use the bpf (berkeley packet filter) syntax; you can find the bpf manual from the internet. set the following filters and demonstrate your sniffer program again (each filter should be set separately): (a) capture only the icmp packet. (b) capture any tcp packet that comes from a particular ip and with a destination port number 23. (c) capture packets comes from or to go to a particular subnet. you can pick any subnet, such as 128.230.0.0/16; you should not pick the subnet that your vm is attached to.
Answers: 3
question
Computers and Technology, 22.06.2019 13:30
1. technician a says horsepower information can be used by consumers to compare the power of different automobile engines. technician b says that manufacturers will often list the horsepower output of their engines in the online service information. who is right?
Answers: 2
question
Computers and Technology, 22.06.2019 22:50
Assume the existence of a bankaccount class. define a derived class, savingsaccount that contains two instance variables: the first a double, named interestrate, and the second an integer named interesttype. the value of the interesttype variable can be 1 for simple interest and 2 for compound interest. there is also a constructor that accepts two parameters: a double that is used to initialize the interestrate variable, and a string that you may assume will contain either "simple", or "compound", and which should be used to initialize the interesttype variable appropriately. there should also be a pair of functions getinterestrate and getinteresttype that return the values of the corresponding data members (as double and int respectively).
Answers: 2
You know the right answer?
Recently you have visited China and you are affected by corona virus so that you have to stay in th...
Questions
question
Mathematics, 15.10.2019 02:30
question
Mathematics, 15.10.2019 02:30
question
Mathematics, 15.10.2019 02:30
question
Mathematics, 15.10.2019 02:30
Questions on the website: 13722367