Q1) Given the following sentences:
Part 1:
Part 2:
In: Computer Science
You must change file HelloWorld.java in hello-java so that the tests all pass
HelloWorld.java
package hw;
public class HelloWorld {
public String getMessage() {
return "hello world";
}
public int getYear() {
return 2019;
}
}
Main.java
package hw;
import java.util.Arrays;
public class Main {
public static void main(final String[] args) {
System.out.println("args = " + Arrays.asList(args));
final HelloWorld instance = new HelloWorld();
System.out.println(instance.getMessage());
System.out.println(instance.getYear());
System.out.println("bye for now");
}
}
TestHelloWorld.java
package hw;
import static org.junit.Assert.*;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
public class TestHelloWorld {
private HelloWorld fixture;
@Before
public void setUp() throws Exception {
fixture = new HelloWorld();
}
@After
public void tearDown() throws Exception {
fixture = null;
}
@Test
public void getMessage() {
assertNotNull(fixture);
assertEquals("hello world", fixture.getMessage());
}
@Test
public void getMessage2() { // this test is broken - fix it!
assertNull(fixture);
assertEquals("hello world", fixture.getMessage());
}
@Test
public void getYear() { // this test is OK, fix HelloWorld.java to make it pass!
assertNotNull(fixture);
assertEquals(2019, fixture.getYear());
}
}
In: Computer Science
Write a MATLAB *function* that draws a spiral by using the plot() command to connect-the-dots of a set of points along the spiral's trajectory. The function should have three input arguments: the number of points along the trajectory, the number of rotations of the spiral, and the final radius of the spiral. The function does not need any output arguments. Use nargin to provide default values for the input arguments. The spiral should begin at the origin. At each step (i.e.,going from one point in the spiral to the next), the angle about the origin and the distance from the origin should increase by a constant increment as defined by the function's inputs.
In: Computer Science
(2) Companies like Symantec, McAffee, Trend Micro, Kaspersky, etc. provide enterprise-level malware protection. Choose a major anti-virus company and familiarize yourself with their product line. Using what you learned from your research create an executive presentation of 8-12 PowerPoint slides on the product and on how you would install an enterprise malware solution on a hypothetical network with 50 Windows servers and 2000 Windows 7 computers. Provide sufficient detail about hardware devices and software and where they would be installed. Create a high-level diagram to accompany your proposal that shows the layout of your software. It is not necessary to diagram your complete network, just a high level representation of it. For example, you could represent the 2000 Windows 7 computers with one Icon labeled Windows 7 Workstations (2000). However, if you include a security appliance that provides malware protection, it should be included as a separate icon. Also, indicate location of software components (clients, servers, databases, management tools, etc) on your diagram, as well.
In: Computer Science
In: Computer Science
Unit 4: Discussion - Part 1
Question
Read the lecture for Chapter 4, and then answer the following:
Think of a brief example where you can use conditional
statements and write it in correct Java syntax. You may use
if-else-if statements or the switch statement. You may also use the
example you wrote in pseudo code for the discussion thread
2 during week 2 and convert it to Java, if you think it is
appropriate. Be mindful that we are not talking about
homework here. Do not post homework in this or any other discussion
thread. As always, show a screen capture of the
program running.
After writing your example, please explain if you think your
example could also be written in the other conditional statement
you did not chose. Explain why you think so, or why
not.
In: Computer Science
In: Computer Science
As we enter the systems integration selection phase, we must select the technical integration framework, and describe and illustrate our systems integration architecture. For this assignment, share how you think integration frameworks typical to the systems integration selection phase are best used to represent an integration of your system components.
In: Computer Science
Unit 4: Discussion - Part 2
No unread replies.No replies.
Question
Read the lecture for Chapter 4, and then answer the following:
This week covered the many different types of loops in Java: while, do, and for. Think of a brief example where you can use loops and write it in correct Java syntax. You may use the loop example you wrote in pseudo code for the discussion thread 2 during week 2 and convert it to Java, if you think it is appropriate. Be mindful that we are not talking about homework here. Do not post homework in this or any other discussion thread. You should show at least 2 of the 3 different types of Java loops in your posting. You may incorporate both kind of loops in the same example, or alternatively, show how the same example can be written using two different kinds of loops. Try to keep your example short, so others can follow it easily. Also, do not forget to show screen captures of your programs running.
In: Computer Science
C-Language
*Calculates the user's age in seconds.
*Estimate the number of times the person has sneezed in his/her lifetime (research on the Internet to obtain a daily estimate).
*Estimates the number of calories that the person has expended in his/her lifetime (research on the Internet to obtain a daily estimate).
*Also calculate the number of sandwiches (or other common food item) that equals that number of calories. Be creative: Pick other health-related statistic. Try searching the Internet to determine how to calculate that data, and create a program to perform that calculation. The program can ask the user to enter any information needed to perform the calculation.
Code template: C-Language
#include <stdio.h>
int main(void) {
int userAgeYears;
int userAgeDays;
int userAgeMinutes;
int totalHeartbeats;
int avgBeatsPerMinute = 72;
printf("Enter your age in years: ");
scanf("%d", &userAgeYears);
userAgeDays = userAgeYears * 365; // Calculate days without leap years
userAgeDays = userAgeDays + (userAgeYears / 4); // Add days for leap years
printf("You are %d days old.\n", userAgeDays);
userAgeMinutes = userAgeDays * 24 * 60; // 24 hours/day, 60 minutes/hour
printf("You are %d minutes old.\n", userAgeMinutes);
totalHeartbeats = userAgeMinutes * avgBeatsPerMinute;
printf("Your heart has beat %d times.\n", totalHeartbeats);
return 0;
}In: Computer Science
Which of the following are used as tools for both the organization and retrieval of information?
This is a multiple answer question. Select as many as are necessary.
A. Thesauri
B. Google
C. Concepts
D.Boolean
E.Classifications
F.Ontologies
Which of the following are key elements of knowledge organization? Please refer to chapter 4 of the Smiraglia. This is a multiple select question.
A. Computers
B.Bibliographic control
C.Lists
D.Social confluence
E.The Antikythera mechanism
Which process guides user research?
A. Parallel design
B. Waterfall model
C. Screening
D. User-centered design
In: Computer Science
Write a C++ program to input 10 scores (range from 0-100), calculate the average, then display the student's name, and a letter grade such as A, B, C, D, or F. It shall have a Student class with necessary private data members and constructor and public methods, such as getName, getGrade, calcScore, convertToGrade, etc. Try to create a Student object in main(), then invoke its methods to perform the tasks.
In: Computer Science
You have been given the following specifications for a simple database about the requests for software that staff members make for their units (note that primary keys are shown underlined, foreign keys in bold). You should run your SQL to demonstrate that it works correctly, and paste in the statements used plus the output from Oracle.
LAB (RoomNo, Capacity)
SOFTWARE (SoftwareID, SoftwareName, Version)
REQUEST (SoftwareID, RoomNo, RequestDate, TeachingPeriod, Progress)
Based on the table specifications provided, answer the following questions.
a. Give the SQL to create the LAB and SOFTWARE tables. Choose appropriate data types. None of the attributes should be allowed to be null. Include the primary key constraints.
b. Give the SQL to create the REQUEST table. Use appropriate data types, and include the primary key and foreign key constraints. Referential integrity should be set such that if a lab is deleted from the database, any requests that exist for that lab are also deleted.
c. Give the SQL to add a record to each of the tables: LAB, SOFTWARE and REQUEST. Make up your own data (you may wish to add lab 350.2.006 to the LAB table for testing in part (e) later).
d. Give the SQL to create a constraint to the REQUEST table to restrict the possible values of Progress to the following 5: Requested, Installed, Function Testing, User Acceptance Testing, and Deployed.
e. Give the SQL to record the fact that the capacity of lab 350.2.006 has increased by 5.
In: Computer Science
This question demonstrates the use of inheritance and
polymorphism.
Design a Ship class that has the following members:
• A field for the name of the ship (a string).
• A field for the year that the ship was built (a string).
• A constructor and appropriate accessors and mutators.
• A toString method that overrides the toString method in the
Object class. The Ship class
toString method should display the ship’s name and the year it was
built.
Design a CruiseShip class that extends the Ship class. The
CruiseShip class should have the following members:
• A field for the maximum number of passengers (an int).
• A constructor and appropriate accessors and mutators.
• A toString method that overrides the toString method in the base
class. The CruiseShip class’s
toString method should display only the ship’s name and the maximum
number of passengers.
Design a CargoShip class that extends the Ship class. The CargoShip
class should have the following members:
• A field for the cargo capacity in tonnage (an int).
• A constructor and appropriate accessors and mutators.
• A toString method that overrides the toString method in the base
class. The CargoShip class’s
toString method should display only the ship’s name and the ship’s
cargo capacity.
Demonstrate the classes in a program that has a Ship array. Assign
various Ship, CruiseShip, and CargoShip objects to the array
elements. The program should then step through the array and print
each object.
PLEASE DO THE QUESTION IN A SIMPLER WAY
In: Computer Science
Q1: Describe the differences between structured and unstructured data. Explain structured data in big data environment and give one (1) example of machine generated structured data.
Please, Please, Please and Please…
1. I need new and unique answers, please. (Use your own words, don't copy and paste, even when you answer like theses answers before.)
2. Please Use your keyboard to answer my Questions. (Don't use handwriting)
3. Please and please i need a good and a perfect answers.
Thank you..
In: Computer Science