Questions
Question1: Consider the below description of the class Box. 1. Create a class and call it...

Question1: Consider the below description of the class Box. 1. Create a class and call it Box. Box has the following methods & variables a. Variable for length, height, width & volume, b. setlength(int x ) method to set the length, c. setWidth (int y ) method to set the width, d. setHeight (int z ) method to set the height & e. displayCalculatedVolume( ) method that calculates the volume and displays it. (Hint: volume = length*width*height)

In: Computer Science

A geographic information system is a conceptualized framework that provides the ability to capture and analyze...

A geographic information system is a conceptualized framework that provides the ability to capture and analyze spatial and geographic data. Discuss the following. If required, include the pictures. (20marks)

1. Definition and explanation of GIS
2. Components of GIS
3. Data and Data Sources of GIS
4. GIS Applications

In: Computer Science

3.11 Develop an EE- Diagram for the dental group described above. Expand it by assuming that...

3.11 Develop an EE- Diagram for the dental group described above. Expand it by assuming that there are multiple dentists with some of the dentists being surgeons, who can perform oral surgery. Also assume some of the professionals are dental hygienists, who can perform routine work such as cleaning and taking x-rays A patient typically begins an ordinary visit by starting with a dental hygienist who performs routine work, and then a dentist who does a checkup during the same initial visit. The work needed is usually determined at this visit. If follow-up visits are required, each of the next visits will be with one dentist. If a patient requires oral surgery, at least one of his or her visits must be with one of the surgeons even though the rest of the work needed might be performed by his or her regular dentist. When surgery is performed, there must be a qualified assistant present. Only some of the hygienists are qualified to assist in surgeries. Assume this database does not keep track of appointments, only of actual visits, work, billing, and payments.

In: Computer Science

Create a sub class of the class Box and call it SBox. The SBox class has...

Create a sub class of the class Box and call it SBox. The SBox class has inherited the list of variables and methods from Box & has its own members too.

a. It has a variable color having a String data type.

b. This class also has a method called SetColor( ) which read the color from the user (Use JOptionPane), set the color to the value given by the user and display it.

In: Computer Science

Using C ++, Given the following data set N =9 12 3 78 89 22 31...

Using C ++, Given the following data set N =9

12 3 78 89 22 31 5 20 14

a ) sort the data using: Insertion and Selection sorts

Determine thee number of comparisons and the number of moved for every sort.

b) Sort the data using Heap and bubble sort, show all steps

In: Computer Science

Override the methods below (in SBox). The overridden methods should perform the actions mentioned below and...

Override the methods below (in SBox). The overridden methods should perform the actions mentioned below and it and must display the following message “Overridden method X”, where X is the method name.

a. setlength(int x ), to set the length

b. setWidth (int y ) to set the width

c. setHeight (int z) to set the height & d. displayCalculatedVolume( ) that calculates the volume and displays it.

In: Computer Science

In designing a university-wide student information system for Cambridge, it is necessary to meet the usability...

In designing a university-wide student information system for Cambridge, it is necessary to meet the usability requirements of various groups, including (among to others

(i)   Staff working in college tutorial offices, and

(ii) People applying online for admission as graduate students.

  1. In what respects would the usability requirements of these two groups be likely to differ?                                                                                                [2 marks]
  1. Discuss THREE (3) usability properties concerning both groups and explain how it can be achieved.                                                          [6 marks]
  1. Create a form and write EIGHT (8) questions based on heuristic evaluation to evaluate the interactive design.                              [8 marks]
  1. Suggest TWO (2) specific interaction features that might address the needs of these different users.                                                                     [4 marks]

In: Computer Science

Write an error-free Java program to do the following things. Prompt the user to input a...

Write an error-free Java program to do the following things.

Prompt the user to input a set of numbers. The numbers represent hourly wages so they will be between 7.25 (peon) and 50 (big boss). The user should be able to input up to 35 numbers but if the user enters 0 then the data input ceases. All of the data that the user enters should be stored in a single array. You do not need to check the input data to see if it is in the proper range – assume the user will input correct data.

The program should calculate the average, the variance and the kurtosis of the numbers that were entered. The equation for the average is given in the book. The formula for the variance and the kurtosis (fourth centralized moment) is given by

Variance = SIGMA (xi-x(bar))^2/(n-1)

kurtosis = SIGMA ((xi-x(bar))^4/(n*var)^2) - 3

where xi are the individual numbers, n is the number of data points, var is the variance, and is the average of the sample. Kurtosis gives an indication of how “peaked” the data samples are relative to a normal (Gaussian) distribution.

The kurtosis must be calculated via a call to a method.

At the end, the program should repeat all of the numbers on one line and then print the average, variance, and kurtosis of the data sample.

MM§MEnter a data value (0 to quit)
¼¼§M10.5
MM§MEnter a data value (0 to quit)
¼¼§M48
MM§MEnter a data value (0 to quit)
¼¼§M8.25
MM§MEnter a data value (0 to quit)
¼¼§M8.50
MM§MEnter a data value (0 to quit)
¼¼§M20
MM§MEnter a data value (0 to quit)
¼¼§M0
MM§Msize = 5
MM§MThe data values are . . .
MM§M10.5 48.0 8.25 8.5 20.0
MM§MThe average is 19.05
MM§MThe variance is 285.0125
MM§MThe kurtosis is -1.1934395407885128


Remember to put the usual header at the top of the program and to submit via Canvas.

In: Computer Science

Java language. Create the following Java command line iterator application Lab4. Pass in three arguments when...

Java language.

Create the following Java command line iterator application Lab4. Pass in three arguments when the program starts.

For example java Lab4 4 3 5

The command line arguments get passed into the main method as a String array in the variable object named args. Remember they get passed in as strings so you need to parse them into integers using the Integer.parseInt(args[X]) before you can treat them as integers. Create four sections that perform the following functions.

  1. Create a for loop iteration structure: loop the number of times of args[0] passed in, printing the counter value each time to the command line
  2. Create while loop iteration structure: loop the number of times of args[1] that was passed in, printing the counter value each time to the command line
  3. Create a do loop iteration structure: loop the number of times of args[2] that was passed in, printing the counter value each time to the command line
  4. Create a for each iteration structure to iterate through the args[] array printing the value in each element to the command line screen

In: Computer Science

[Design Pattern] Think of a scenario that can be solved using all of these 3 patterns...

[Design Pattern] Think of a scenario that can be solved using all of these 3 patterns - Strategy, Factory and Abstract Factory patterns.

1. Write the Scenario

2. Write the code for the 3 patterns

3. Create the UML diagram

In: Computer Science

In this question, you are going to implement a human vs. human version of Notakto. Notakto...

In this question, you are going to implement a human vs. human version of Notakto.

Notakto is a tic-tac-toe variant. It is played across three 3 x 3 boards: Board A, board B and board C. When you start the game you should output the boards as follows.

A B C
0 1 2 0 1 2 0 1 2
3 4 5 3 4 5 3 4 5
6 7 8 6 7 8 6 7 8
Player 1:
There are two players: Player 1 and player 2. Player 1 always starts. Both players play the same piece: X. E.g., let player 1 choose location 6 on board A, i.e., the user will enter A6. The output of the program should be as follows (bold font represents user input).

A B C
0 1 2 0 1 2 0 1 2
3 4 5 3 4 5 3 4 5
6 7 8 6 7 8 6 7 8
Player 1: A6
A B C
0 1 2 0 1 2 0 1 2
3 4 5 3 4 5 3 4 5
X 7 8 6 7 8 6 7 8
Player 2:
Each player takes turn placing an X on the board in a vacant space (a space not already occupied by an X).

A B C
0 1 2 0 1 2 0 1 2
3 4 5 3 4 5 3 4 5
6 7 8 6 7 8 6 7 8
Player 1: A6
A B C
0 1 2 0 1 2 0 1 2
3 4 5 3 4 5 3 4 5
X 7 8 6 7 8 6 7 8
Player 2: A7
A B C
0 1 2 0 1 2 0 1 2
3 4 5 3 4 5 3 4 5
X X 8 6 7 8 6 7 8
Player 1:
If a board has three X in a row, column, or diagonal, the board is dead and it cannot be played anymore. It should not be displayed anymore. E.g., in the following, board A becomes dead and is not displayed anymore.

A B C
0 1 2 0 1 2 0 1 2
3 4 5 3 4 5 3 4 5
6 7 8 6 7 8 6 7 8
Player 1: A6
A B C
0 1 2 0 1 2 0 1 2
3 4 5 3 4 5 3 4 5
X 7 8 6 7 8 6 7 8
Player 2: A7
A B C
0 1 2 0 1 2 0 1 2
3 4 5 3 4 5 3 4 5
X X 8 6 7 8 6 7 8
Player 1: A8
B C
0 1 2 0 1 2
3 4 5 3 4 5
6 7 8 6 7 8
Player 2:
The game ends when all the boards contain three X in a row, column, or diagonal, at which point the player to have made the last move loses the game. Unlike tic-tac-toe, there will always be a player who wins any game of Notakto.

A B C
0 1 2 0 1 2 0 1 2
3 4 5 3 4 5 3 4 5
6 7 8 6 7 8 6 7 8
Player 1: A6
A B C
0 1 2 0 1 2 0 1 2
3 4 5 3 4 5 3 4 5
X 7 8 6 7 8 6 7 8
Player 2: A7
A B C
0 1 2 0 1 2 0 1 2
3 4 5 3 4 5 3 4 5
X X 8 6 7 8 6 7 8
Player 1: A8
B C
0 1 2 0 1 2
3 4 5 3 4 5
6 7 8 6 7 8
Player 2: B0
B C
X 1 2 0 1 2
3 4 5 3 4 5
6 7 8 6 7 8
Player 1: B4
B C
X 1 2 0 1 2
3 X 5 3 4 5
6 7 8 6 7 8
Player 2: C0
B C
X 1 2 X 1 2
3 X 5 3 4 5
6 7 8 6 7 8
Player 1: C4
B C
X 1 2 X 1 2
3 X 5 3 X 5
6 7 8 6 7 8
Player 2: C8
B
X 1 2
3 X 5
6 7 8
Player 1: B8
Player 2 wins game
Note that you should check for legal moves. If the users enters something illegal you should prompt them again. Let's play a new game to illustrate this.

A B C
0 1 2 0 1 2 0 1 2
3 4 5 3 4 5 3 4 5
6 7 8 6 7 8 6 7 8
Player 1: C0
A B C
0 1 2 0 1 2 X 1 2
3 4 5 3 4 5 3 4 5
6 7 8 6 7 8 6 7 8
Player 2: B9
Invalid move, please input again
Player 2: fds
Invalid move, please input again
Player 2: C0
Invalid move, please input again
Player 2: C6
A B C
0 1 2 0 1 2 X 1 2
3 4 5 3 4 5 3 4 5
6 7 8 6 7 8 X 7 8
Player 1: C6
Invalid move, please input again
Player 1: C3
A B
0 1 2 0 1 2
3 4 5 3 4 5
6 7 8 6 7 8
Player 2: C2
Invalid move, please input again
Player 2:
Implement the game and try to pass all test cases. The list of test cases is not complete. We may add more test cases when marking after the deadline.

Yo

I want the answer in python

In: Computer Science

describe at least 4 online legal reconnaissance activities


describe at least 4 online legal reconnaissance activities

In: Computer Science

Describe a business situation in which you would want to choose OLAP over OLTP or OLTP...

Describe a business situation in which you would want to choose OLAP over OLTP or OLTP over OLAP. How would you describe the purpose and advantages of one over the other?

In: Computer Science

consider the code; typedef struct { int size; int *nums; }Data; Complete the function below that...

consider the code;

typedef struct {

int size;

int *nums;

}Data;

Complete the function below that creates and returns a new data type that contains a nums array with size randomly chosen integers. Ensure proper error checking.

Data *getRandomData(int size) {

//PUT CODE HERE

//Create random ints

for(int i=0; i<size; i++)

d->nums[1] = (int)(rand()/(float)RAND_MAX*100);

return d;

In: Computer Science

I need pesodocode of this code. void claimProcess() { int id; bool found = false; system("cls");...

I need pesodocode of this code.

void claimProcess()
{
int id;
bool found = false;
system("cls");
printf("Enter patient ID for which you want to claim insurrence: ");
scanf("%d", & id);
int i;
for (i = 0; i < patientCount; i++)
{
if (patients[i].id == id)
{
found = true;
break;
}
}
if (found == false)
{
printf("subscriber not found\n");
return;
}
int numOfDaysHospitalized, suppliesCost, surgicalFee, otherCharges;
bool ICU;
printf("How many days were you haspitalized: ");
scanf("%d", & numOfDaysHospitalized);
int ICUFlag;
do {
printf("Select A Ward Type\n1-Normal Ward 2-ICU: ");
scanf("%d", & ICUFlag);
} while (ICUFlag < 1 || ICUFlag > 2);
if (ICUFlag == 2)
ICU = true;
else
ICU = false;
printf("Enter Cost of Supplies and Services: ");
scanf("%d", & suppliesCost);
printf("Enter Surgical Fees: ");
scanf("%d", & surgicalFee);
printf("Enter Other Charges: ");
scanf("%d", & otherCharges);
int ICUCharges = 0;
if (ICU == true)
{
if (patients[i].plan == 1)
ICUCharges = numOfDaysHospitalized * 120;
else if (patients[i].plan == 2)
ICUCharges = numOfDaysHospitalized * 150;
else
ICUCharges = numOfDaysHospitalized * 200;
} else
{
if (patients[i].plan == 1)
ICUCharges = numOfDaysHospitalized * 250;
else if (patients[i].plan == 2)
ICUCharges = numOfDaysHospitalized * 400;
else
ICUCharges = numOfDaysHospitalized * 700;
}
int totalClaimAmount = numOfDaysHospitalized + suppliesCost + surgicalFee + otherCharges + ICUCharges;
if (patients[i].annualClaim == true)
{
if (patients[i].age > 60)
{
printf("The subscriber age has exceeded the limit(60 Year), Not Eligible");
return;
}
}
int j;
for (j = 0; j < patientCount; j++)
{
if (claims[j].id == patients[i].id)
break;
}
int amountToBeBorne = 0;
if (totalClaimAmount <= claims[j].remaininigAmount)
{
claims[j].amountClaimed += totalClaimAmount;
claims[j].remaininigAmount -= totalClaimAmount;
} else
{
amountToBeBorne = totalClaimAmount - claims[j].remaininigAmount;
claims[j].amountClaimed += (totalClaimAmount - amountToBeBorne);
claims[j].remaininigAmount = 0;
printf("\n\nThe amount that can be claimed is less then the claim by subscriber. %d RM should be given by subscriber themselves\n", amountToBeBorne);
}
FILE * fp;
fp = fopen("claims.txt", "w");
for (int i = 0; i < patientCount; i++)
fprintf(fp, "%d,%d,%d,%d\n", claims[i].id, claims[i].claimedYear, claims[i].amountClaimed, claims[i].remaininigAmount);
fclose(fp);
printf("Subscriber ID: %d\nSubscriber Name: %s\nSubscriber Claimed Year: %d\nSubscriber amount Claimed: %d\nSubscriber Remaining Claimed: %d\n", claims[j].id, patients[i].name, claims[j].claimedYear, claims[j].amountClaimed, claims[j].remaininigAmount);
system("pause");
}

In: Computer Science