Interaction styles are methods to communicate between users and machines through user interface. List four types of interaction styles with at least two strengths and limitations of each style. Also present one example screenshot of each interaction style
In: Computer Science
Draw the activity diagram for teledermatology
Teledermatology :
From the word Teledermatology that comes from two words 'Tele' and 'Dermatology' which denotes the way of e-health. Tele means the communication and here the cometmunication is made through the server between the doctors and the patients.The doctors are mainly the skin doctors means dermatologist. In this field, telecommuncation technologies are being used to transfer medical information over varying distances through audio, visual and data communication.Applications of teledermatology span different areas of health care management such as consultation, diagnoses, treatment and even education.
Telemedicine describes the application of information and communication technologies in the entire range of functions that involve the health sector. Several medical and surgical specialties utilize tele-consultation. It is a sub specialty in the medical field of dermatology and probably one of the most common applications of tele-medicine and e-health.Teledermatology relieves the primary care physician of the responsibility of making the wrong call about serious skin ailments. It’s well known that stress can make these conditions worse, so eliminating a long drive may be just what the doctor ordered. Teledermatology embraces great potential for revolutionizing the delivery of dermatologic services to remote and distant locations by means of telecommunications and information technology. It encompasses consultations between a patient (and the primary healthcare provider) and a dermatologist for diagnosis and management advice. Teledermatology also covers dermatological education for health professionals and for consumers. Teleconsultations reduce time and increase the chances of access to one or more consultants as the patient or referring doctor desires, irrespective of the distance between the two. Its usefulness in the field of surgery and aesthetic surgery is immeasurable as there are only a few experts in the field of aesthetic surgery available currently in comparison to the dermatology population and the ever growing awareness and demand of the patients towards aesthetics.
Advantages of this Model are Patients can view their health records and prescriptions on their mobile phones on a request basis .It can also be used to share information seamlessly and in near-real-time across devices and other organizations. In this cloud model, customer providers only pay for what they use.It offers remote access allows data sharing between authorized units the updates for the medical history of the patient - consultations, prescriptions, hospitalization - are made in real time and are useful for future treatment validation.
Complete activity diagram from teledermatology---
Teledermatology services are based in this architecture. There is a server application which stores and makes available the incoming skin images from the patients. The client, in its turn, is responsible for acquiring data from patient transmitting them through Internet.Health care Administrator monitors their patients using the server application. Also, data can be exported to XML files or printed. In the application of telemedicine, the medical information usually needs to be distributed among medical doctors and display, archival, and analysis devices .Therefore, the server side was developed with the purpose of receiving, storing and distributing the vital sign data from patients.It was developed under Java technology too. So, any classes were reutilized. Basically, the server is composed of a Java application and a relational database(MySQL).
There is a incredible assure for cloud computing infrastructure in the healthcare industry. Cloud computing would help healthcare centers to achieve efficient use of their hardware and software investments and to increase profitability by improving the exploitation of resources to the maximum. The purpose of implementing cloud computing systems in health care is not to compete with each other but serves to facilitate and improve the excellence of patient care. When a health organization considers moving its service into the cloud, it needs strategic planning to examine environmental factors such as staffing, budget, technologies, organizational culture, and government regulations that may affect it, assess its capabilities to achieve the goal, and identify strategies designed to move forward.
In: Computer Science
11. First and Last Design a program that asks the user for a
series of names (in no particular order). After the final person's
name has been entered, the program should display the name that is
first alphabetically and the name that is last alphabetically. For
example, if the user enters the names Kristin, Joel, Adam, Beth,
Zeb, and Chris, the program would display Adam and Zeb.
#Sentinel value is DONE
SENTINEL = "DONE"
ls = []
prompt = "Enter a name, or enter DONE to quit."
newLs = input(prompt)
n = newLs
#test for sentinel
while newLs != SENTINEL:
ls.append(newLs)
newLs = input(prompt)
#sort in alphabetical
for i in range(n) :
name = int()
ls.append(name)
ls.sort()
print('{} and {}'. format(ls[0],ls[n-1]))
I need help with sorting the names from the sentinel loop so that I
get only two outputs that are alphabetically ordered
In: Computer Science
In: Computer Science
QUESTION 1
User can interact with a PC using a command-line interface by issuing commands to the program in the form of successive lines of text.
True
False
1 points
QUESTION 2
A machine code (object code) is generated by an executor for process.
True
False
1 points
QUESTION 3
In case of all the resources are being used, the new process with a low priority might not get its resource forever.
True
False
1 points
QUESTION 4
A computer can understand source code and directly executes it.
True
False
1 points
QUESTION 5
Solaris always comes with both CLI and GUI.
True
False
1 points
QUESTION 6
In most cases, API is used for system calls.
True
False
1 points
QUESTION 7
In the parameter passing, LPDWORD indicates the size of the data to be read.
True
False
1 points
QUESTION 8
Layered structure is well protected but not efficient.
True
False
1 points
QUESTION 9
A program trying to create a file with a certain name, what will the program do if there is a file with the same name already exist in the directory.
Abort and ask the user to input a new title. |
||
Delete the existing file and create a new file |
||
Move the existing file into another directory |
||
None of them |
1 points
QUESTION 10
In Unix, which three system calls are responsible for protecting the files.
chmod() mmap() chown() |
||
fork() ioctl() chown() |
||
chmod() pipe() umask() |
||
None of them |
1 points
QUESTION 11
Name the best OS structure and its inherited structures.
Modular and inherits Monolithic and Layered structures. |
||
Monolithic and inherits layered and Modular structures. |
||
Microkernel and inherits Monolithic and UNIX structures. |
||
Modular and inherits Microkernel and Layered structures. |
1 points
QUESTION 12
An operating system service that deal with internet and message passing between systems.
LAN |
||
Communication |
||
Internet and file manager |
||
Network operating systems |
1 points
QUESTION 13
Operating system service, which ensures that the data have not been corrupted in transit.
Communication |
||
Buffer |
||
Trap |
||
Error-detection |
1 points
QUESTION 14
A guest OS can be hosted by an OS using _____.
Virtual Machines |
||
Virtual Memory |
||
Virtual Reality |
||
Virtual Codes |
1 points
QUESTION 15
A structure where its kernel can add or remove functions.
Modular |
||
Microkernel |
||
Layered |
||
Monolithic |
1 points
QUESTION 16
The top layer (layer N) in the layered OS structure.
Memory |
||
Kernel |
||
Hardware |
||
User interface |
1 points
QUESTION 17
_________ makes sure not to happen a scenario that processes keep waiting for a certain resource but never get it.
In: Computer Science
Test all of the methods in the code below:
Instantiate several Matrix objects of different sizes.
Make a Matrix copy from an excisting Matrix
Test the equals method to show one matrix being equal and one matrix not being equal
display 2 matrices using a toString method
display a mtrix object before and after multiplying by a scalar after
display a matrix object before and after multiplying by 0
test the matrix by matrix multiplication with at least 3 different matrix objects that test different outcomes of the method including the exception
Source Code:
public class Matrix { private int rows, columns; private int[][] data; public Matrix(int r, int c) { data = new int[r][c]; rows = r; columns = c; } public Matrix copyMatrix() { Matrix m = new Matrix(rows, columns); for(int i = 0; i < rows; i++) for(int j = 0; j < columns; j++) m.data[i][j] = data[i][j]; return m; } public boolean equals(Matrix m) { if(rows == m.rows && columns == m.columns) { for(int i = 0; i < rows; i++) { for(int j = 0; j < columns; j++) { if(m.data[i][j] != data[i][j]) return false; } } return true; } else return false; } public String toString() { String s = ""; for(int i = 0; i < rows; i++) { for(int j = 0; j < columns; j++) { s += String.format("%5d ", data[i][j]); } s += "\n"; } return s; } public void scalarMultiply(int k) { for(int i = 0; i < rows; i++) for(int j = 0; j < columns; j++) data[i][j] *= k; } public Matrix multiply(Matrix m) { if(columns != m.rows) //can't perform multiplication return null; Matrix A = new Matrix(rows, m.columns); for(int i = 0; i < rows; i++) { for(int j = 0; j < m.columns; j++) { for(int k = 0; k < columns; k++) A.data[i][j] += data[i][k] * m.data[k][j]; } } return A; } public void set(int r, int c, int val) { if(r >= 0 && r < rows && c >= 0 && c < columns) data[r][c] = val; } }
In: Computer Science
List 4 different types of memories according to the hierarchy (lowest to the highest). What is the advantage and disadvantage of each one of them?
In: Computer Science
This needs to be in Java
implementing Insertion Sort and displaying the floats sorted.
Sample Output: (green is user input)
Please select one of the following: 1: Initialize a default array 2: To specify the max size of the array 3: Add value to the array 4: Display values in the array 5: Display the average of the values 6: Enter multiple values 7: Read values from file 8: Save values to file 9: Sort the array 10: To Exit
import java.io.File; import java.io.FileNotFoundException; import java.io.PrintWriter; import java.util.Scanner;
class Numbers {
private float[] numbers;
private int numItems = 0, size = 1;
public Numbers() {
numbers = new float[size];// default size }
public Numbers(int size) {
this.size = size;
numbers = new float[size]; }
public void addValue(Scanner scanner, boolean fromKeyboard) {
if (fromKeyboard)
System.out.print("Enter value: ");
float value = scanner.nextFloat();
numbers[numItems++] = value;
if (numItems >= size) {
float[] temp = new float[size + 5];
for (int i = 0; i < numItems; i++) {
temp[i] = numbers[i]; }
numbers = temp; } }
public float calcAverage() {
float sum = 0;
for (int i = 0; i < numItems; i++) {
sum += numbers[i];// calculating sum of the snumbers in the array }
return (float) sum / numItems;// calculating average }
@Override
public String toString() {
String data = "";
for (int i = 0; i < numItems; i++) {
data += numbers[i] + "\n"; }
return data; }
public void addMultiple(Scanner scanner, boolean fromKeyboard) {
if (fromKeyboard) {
System.out.print("How many values do you wish to add? "); }
int n = scanner.nextInt();
for (int i = 0; i < n; i++) {
addValue(scanner, fromKeyboard);
} }
public void loadData(Scanner scanner) {
System.out.println("Name of the file to read from:");
String name = scanner.next();
try {
Scanner fileScanner = new Scanner(new File(name));
addMultiple(fileScanner, false);
} catch (FileNotFoundException e) {
System.out.println("File not found!");
} catch (Exception e) {
System.out.println("Invalid file format!");
}
}
public void saveData(Scanner scanner) {
System.out.println("Name of the file to save to:");
String name = scanner.next();
try {
PrintWriter writer = new PrintWriter(new File(name));
writer.println(numItems);
for (int i = 0; i < size; i++) {
writer.println(numbers[i]);
}
writer.close();
} catch (FileNotFoundException e) {
System.out.println("File cant be opened!");
} }}
public class Test {// driver class
public static void main(String[] args) {
Numbers obj = new Numbers();
Scanner sc = new Scanner(System.in);
while (true) {// infinte loop
System.out.print("Please select one of the following:\r\n"
+ "1: Initialize a default array\r\n"+ "2: To specify the max size of the array\r\n" + "3: Add value to the array\r\n" + "4: Display values in the array\r\n" + "5: Display the average of the values\r\n" + "6: Enter multiple values\r\n" + "7: Read values from file\r\n" + "8: Save values to file\r\n" + "9: To Exit\r\n" + "> ");
int choice = sc.nextInt();// taking user choice
sc.nextLine();
switch (choice) {
case 1: System.out.println("New array initialized"); obj = new Numbers(); break;
case 2: System.out.print("Enter new size of the array: ");int size = sc.nextInt(); sc.nextLine(); obj = new Numbers(size); break;
case 3: obj.addValue(sc, true); break;
case 4: System.out.println("Numbers are:\n" + obj); break;
case 5: System.out.println("Average is: " + obj.calcAverage()); break;
case 6: // adding multiple values from keyboard obj.addMultiple(sc, true);break;
case 7:// loading values from fileobj.loadData(sc);break;
case 8:// saving values to fileobj.saveData(sc); break;
case 9: System.out.println("Good Bye"); System.exit(0);// exiting the program
default: System.out.println("Invalid choice!"); break; } } }}
In: Computer Science
CNT Books has expanded considerably since you got the network up and running three years ago. It now occupies an entire floor in the building, and its LAN has grown to include several servers and more than 60 workstations. CNT Books has recently purchased another book company and needs more space and computers. Expansion plans include leasing another floor four stories above the current offices in the same building and adding 35 workstations and at least one more server immediately, with additional equipment purchases expected. What type of network is called for—LAN, WAN, MAN, or internetwork? What additional devices might be needed to ensure efficient network communication?
In: Computer Science
MySQL
Multiple Choice
Answer as soon as possible
1. Why is it important to check the replication
status regularly by running SHOW SLAVE STATUS on the slave?
(a) Running SHOW SLAVE STATUS cleans up the binary and relay logs
that are not in use.
(b) Running SHOW SLAVE STATUS syncs all tables where the data is
different from the Master and Slave.
(c) Replication can have an error at any time and if you don't run
SHOW SLAVE STATUS regularly you may not realize for a long
time.
(d) It is not important to run SHOW SLAVE STATUS to check
replication status.
2. Why is it important for an uptime monitoring
service to check your website from multiple servers around the
world, before considering your website down?
(a) Localized network errors may cause false alarms from individual
servers.
(b) You often only need to have your website available from
specific locations so you don't need to check it from locations
around the world.
(c) It is not important. Checking your website from fewer servers
will save greatly on electricity.
(d) It is not important. You can confirm a website is down from an
individual server accurately.
3. Which of the following are correct regaring
PHP's MySQLi and PDO connections to MySQL? (select all that
apply)
(a) MySQLi offers a procedural API.
(b) PDO works only with MySQL.
(c) PDO and MySQLi both offer object-oriented APIs.
(d) PDO has an exception class to handle any problems that may
occur in our database queries.
(e) Only PDO offers prepared statements.
(f) Both PDO and MySQLi offer protection against SQL Injection
Attacks.
In: Computer Science
6. What is the MIPS machine language binary code for these three instructions?
lw $t0, 1200($t1) #Temporary reg $t0 gets A[300]
add $t0, $s2, $t0 #Temporary reg $t0 gets h+A[300]
sw $t0, 1200($t1) #Stores h+A[300]$t0 back into A[300]
In: Computer Science
MySQL
Multiple Choice
Answer as soon as possible
1. Why is it important to check the replication
status regularly by running SHOW SLAVE STATUS on the slave?
(a) Running SHOW SLAVE STATUS cleans up the binary and relay logs
that are not in use.
(b) Running SHOW SLAVE STATUS syncs all tables where the data is
different from the Master and Slave.
(c) Replication can have an error at any time and if you don't run
SHOW SLAVE STATUS regularly you may not realize for a long
time.
(d) It is not important to run SHOW SLAVE STATUS to check
replication status.
2. Why is it important for an uptime monitoring
service to check your website from multiple servers around the
world, before considering your website down?
(a) Localized network errors may cause false alarms from individual
servers.
(b) You often only need to have your website available from
specific locations so you don't need to check it from locations
around the world.
(c) It is not important. Checking your website from fewer servers
will save greatly on electricity.
(d) It is not important. You can confirm a website is down from an
individual server accurately.
3. Which of the following are correct regaring
PHP's MySQLi and PDO connections to MySQL? (select all that
apply)
(a) MySQLi offers a procedural API.
(b) PDO works only with MySQL.
(c) PDO and MySQLi both offer object-oriented APIs.
(d) PDO has an exception class to handle any problems that may
occur in our database queries.
(e) Only PDO offers prepared statements.
(f) Both PDO and MySQLi offer protection against SQL Injection
Attacks.
In: Computer Science
/*
* Returns a new array of students containing only
those students from the given roster that belong
* to the given academic program
* The resulting array must not contain any null
entries
* Returns empty array (length == 0) if no students
belong to the program
*/
public static UStudent[] filterByProgram(String
program, UStudent[] roster) {
//YOUR CODEf
int counter=0;
for(int i=0;i<roster.length;i++)
{
if(roster[i].getAcademicProgram().equals(program)) {
counter++;
UStudent[] Studentbelongprogram = new
UStudent[counter];
Studentbelongprogram[i]=roster[i];
roster=Studentbelongprogram;
}else {
return new UStudent[0];
}
}
return roster;
}
In: Computer Science
Assignment - Number Guessing with a Class
For this assignment you will revisit the number guessing game in which the user picks a number, and your program tries to guess the number.
For review, a sample run of the program is printed below. In the example the user picks the value 72 for the first game, and then 25 for the second game. The user's input is in bold. Here is how the output might look (exact numbers may vary) :
> Think of a number between 1 and 100
> Is the number 50? (h/l/c): h
> Is the number 75? (h/l/c): l
> Is the number 62? (h/l/c): h
> Is the number 68? (h/l/c): h
> Is the number 71? (h/l/c): h
> Is the number 73? (h/l/c): l
> Is the number 72? (h/l/c): c
> You picked 72? Great pick.
> Do you want to play again? (y/n): y
> Think of a number Between 1 and 100
> Is the number 50? (h/l/c): l
> Is the number 25? (h/l/c): c
> You picked 25? Great pick.
> Do you want to play again: (y/n): n
> Good bye.
The point of interest for us is not necessarily the game - but rather the design of the program. The essential part of this assignment is writing the NumberGuesser class. This class will contain all of the logic for guessing.
Write your NumberGuesser class as if it is going to be used in many different guessing games, created by different developers. You want to create a class that will be a useful tool in different contexts.
When a new instance of a NumberGuesser class is instantiated the upper and lower bounds of the possible values should be passed into its constructor. From that point on a NumberGuesser object will always return the mid-point of the possible values when the getCurrentGuess() method is called.
If the higher() or lower() methods are invoked, the NumberGuesser object should adjust its state to represent the new possible range of values. For example, if a NumberGuesser is created with the following line of code then the range will be the numbers from 1 to 100:
NumberGuesser guesser = new NumberGuesser(1, 100);
If the getCurrentGuess() method is called it should return 50, which is the midpoint between 1 and 100. If the higher() method is invoked then the object should adjust its state accordingly so that it knows that the correct value is between 51 and 100. If the lower() method is invoked then it should adjust its state to represent that the possible values are between 1 and 49.
After that, the getCurrentGuess() should return the value that is in the middle of the new range of possible values. (Either 75 or 25). By following this strategy the number guesser should be able to eventually guess the proper value.
Here is the basic design of the NumberGuesser class that you should write. The instance variables have been left up to you.
NumberGuesser Class
Private Instance Variables ?? |
Public Methods and Constructors NumberGuesser(int lowerBound, int upperBound) void higher(); void lower(); int getCurrentGuess(); void reset(); |
The reset() method should return the return a NumberGuesser to the state that it was in when it was constructed. In order to do this your class will need to be able to remember its original state. You can use two additional instance variables to store the original upper and lower bounds.
Write your number guess class and test it until you are sure that it is working properly. After it is working, write the rest of the program so that it plays the game by using an instance of your NumberGuesser class.
Note: Your NumberGuesser class should not use a Scanner object or System.out. It is only responsible for handling the indicated methods. All of the input and output work should be handled elsewhere in your program.
Testing your NumberGuesser class
You might find it useful to test your number guesser class with the main method in this program. This is not required. Testing NumberGuesser with Random Numbers
What to submit
Submit two .java files in a compressed directory:
For this assignment you will revisit the number guessing game in which the user picks a number, and your program tries to guess the number.
For review, a sample run of the program is printed below. In the example the user picks the value 72 for the first game, and then 25 for the second game. The user's input is in bold. Here is how the output might look (exact numbers may vary) :
> Think of a number between 1 and 100
> Is the number 50? (h/l/c): h
> Is the number 75? (h/l/c): l
> Is the number 62? (h/l/c): h
> Is the number 68? (h/l/c): h
> Is the number 71? (h/l/c): h
> Is the number 73? (h/l/c): l
> Is the number 72? (h/l/c): c
> You picked 72? Great pick.
> Do you want to play again? (y/n): y
> Think of a number Between 1 and 100
> Is the number 50? (h/l/c): l
> Is the number 25? (h/l/c): c
> You picked 25? Great pick.
> Do you want to play again: (y/n): n
> Good bye.
The point of interest for us is not necessarily the game - but rather the design of the program. The essential part of this assignment is writing the NumberGuesser class. This class will contain all of the logic for guessing.
Write your NumberGuesser class as if it is going to be used in many different guessing games, created by different developers. You want to create a class that will be a useful tool in different contexts.
When a new instance of a NumberGuesser class is instantiated the upper and lower bounds of the possible values should be passed into its constructor. From that point on a NumberGuesser object will always return the mid-point of the possible values when the getCurrentGuess() method is called.
If the higher() or lower() methods are invoked, the NumberGuesser object should adjust its state to represent the new possible range of values. For example, if a NumberGuesser is created with the following line of code then the range will be the numbers from 1 to 100:
NumberGuesser guesser = new NumberGuesser(1, 100);
If the getCurrentGuess() method is called it should return 50, which is the midpoint between 1 and 100. If the higher() method is invoked then the object should adjust its state accordingly so that it knows that the correct value is between 51 and 100. If the lower() method is invoked then it should adjust its state to represent that the possible values are between 1 and 49.
After that, the getCurrentGuess() should return the value that is in the middle of the new range of possible values. (Either 75 or 25). By following this strategy the number guesser should be able to eventually guess the proper value.
Here is the basic design of the NumberGuesser class that you should write. The instance variables have been left up to you.
NumberGuesser Class
Private Instance Variables ?? |
Public Methods and Constructors NumberGuesser(int lowerBound, int upperBound) void higher(); void lower(); int getCurrentGuess(); void reset(); |
The reset() method should return the return a NumberGuesser to the state that it was in when it was constructed. In order to do this your class will need to be able to remember its original state. You can use two additional instance variables to store the original upper and lower bounds.
Write your number guess class and test it until you are sure that it is working properly. After it is working, write the rest of the program so that it plays the game by using an instance of your NumberGuesser class.
Note: Your NumberGuesser class should not use a Scanner object or System.out. It is only responsible for handling the indicated methods. All of the input and output work should be handled elsewhere in your program.
Testing your NumberGuesser class
You might find it useful to test your number guesser class with the main method in this program. This is not required. Testing NumberGuesser with Random Numbers:
https://www.google.com/url?q=https://docs.google.com/document/d/1WtbkpOZ3OoKuf94HaBCC5or8-dUjClNey6C0wKUNi28/pub?embedded%3Dtrue&sa=D&ust=1571212772373000
What to submit
Submit two .java files in a compressed directory:
In: Computer Science
Number Analysis Program Python:
Initialize an array with these specific 20 numbers: 26 45 56 12 78 74 39 22 5 90 87 32 28 11 93 62 79 53 22 51
Display the following data:
1. The lowest number in the list
2. The highest number in the list
3. The total of the numbers in the list
4. The average of the numbers in the list
In: Computer Science