Question about Hard Disks
1. For Redundant Arrays of Inexpensive Disks, which of the following two has more reliability? The Level 0 + 1 (Striping + Mirroring) or Level 1 + 0 (Mirroring + Striping)? Why?
2. Why does the Elevator have better performance than Shortest Seek Time First algorithm for a heavy load? (Elevator is also called the SCAN or C-SCAN)
3. Do accesses to sectors in outer tracks require less time compared to accesses sectors to inner tracks? Why or why not?
In: Computer Science
Create the program using C#
A business records its daily sales totals. Enter the following weekly sales information into an array.
1245.67
1189.55
1089.72
1456.88
2109.34
1987.55
1872.36
Once, the information has been entered into the array. Access the items in the array to find and display the following:
In: Computer Science
In: Computer Science
What are differences between structure and union by coding example in C language?
In: Computer Science
It seems like every day we hear about another data breach. Find and discuss at least TWO recent examples of data breaches. Why are these important? How can these affect a business? In the examples you cite, what was the cost to the business involved? How long did the breach continue before the company find the breach? Cite your sources. Do these cause you to not buy items online or use social media?
In: Computer Science
Write this code in full c++ and in separate files in visual studio.
Binary Search Tree Using a binary search tree, you are tasked with building a dictionary program that stores a word with its definition. Each node of the tree will contain the word and definition. The word is what will be used as the key to sort our data. The dictionary should allow you to search for a word. If the word exists in the dictionary then the definition will display. You can also add words to the dictionary. For testing you should be able to display the current word list. The dictionary will populate from a data file and new words will be saved to the file as well.
In: Computer Science
Lab Directions:
Complete each
of the programs
here. Create a
separate Netbeansproject
for each program using the name I specified. Create a single java
main class for each of the programs using the filename I
specified.
Task
1: (5 points)
Project name:
CtoFConverter
Main
file name:
TempConverter.java
A program that converts an inputted temperature in
C
and provides the equivalent temperature in
F.
Hint: Google is your friend! Given
C,
solve for
F.
Again, check for a valid input value and only respond with
the
F
value if you got it, otherwise output an appropriate error msg to
the user.
Testing: 3 conditions: Bad Input, then test for the known freezing
and boiling points.
EMBED
SCREEN SHOT(S)
OR COPY THE OUTPUT WINDOW
OF NETBEANS HERE SHOWING YOUR PROGRAM TEST RUN(S):
Task
2: (5 points)
Project
name:
FuelCosts
Main
file name: FuelCost.java
Write a program that asks the user to input
Then print how far the car can go with the gas in the tank. Again, check for valid input and exit with an error msg if you do not have it. Testing: here just use some reasonable values that you can inspect the calculations and determine they are correct.
EMBED SCREEN SHOT(S) OR COPY THE OUTPUT WINDOW OF NETBEANS HERE SHOWING YOUR PROGRAM TEST RUN(S):
Submitting your work:
Create a new compressed .zip archive folder. (Don’t give me any other type of archive, it will be returned to you ungraded!) called Lastname_Firstname_Lab_06.zip using your name.
Place
both
of your
Netbeans
project
folders in this archive. (Do
not individually zip the projects!) Place
this word doc file with your screen shots in the archive as well.
(Don’t put this in the individual project folders, put it in the
top level in the archive so I can access it easily.)
(When I
open you archive I should see each of your project folders in it
and this file.)
Submit the one Zip file (with both NetBeans projects and the Word document) for your grade.
In: Computer Science
Prof. Orlando Karam maintains an Ubuntu Linux server for his class. Every semester he needs to create an account for each student. It takes a lot of time to create these accounts one by one interactively. So he decides to automate the process by writing a script. You are Orlando’s TA and volunteered to complete the task. Please propose a solution and write a script (either Bash or Perl) to implement your solution. Basic requirements: The script reads from a CSV file for student information (exported from Excel). The file is made up of the lines like this: Jack,Zheng,jzheng3 //[first name],[last name],[campus email id] Mark,Cuban,mcuban2 … Please make up your own CSV file (with at least 5 students/lines) for testing purpose. Every student is assigned a common initial password (you will determine the password). Students are required to change their passwords at first login. All student accounts should be assigned to a “student” group. This group already exists in the system (you need to create this group first for testing purpose). Make some other assumptions if not specifically required. Reminder: you will and should do some research on how to read and parse CSV files, and how to process passwords programmatically. Execute your script and take two screen shots: a. The “passwd” file content, with the new accounts clearly shown. b. The “shadow” file content, with the new accounts clearly shown. 2. Login with one of the new student account and show that you have successfully logged in using the newly created account. Take a screen shot showing the user id in the terminal. 3. Compile one PDF document with the script, the CSV file content, and all three screen shots, clearly labeled for each part.
In: Computer Science
Financial Records
Create a program to store weekly expenses and revenues over a period of time. The program should
store the expenses and revenues in two global array variables. Values stored in the array at index k
represent the total revenues/expenses recorded during the k(th) week. Assume that the maximum number of weeks tracked is 250.
Add the following functions to your program:
-
A function that finds the total of all expenses incurred since week t for a given t.
-
A function that records the total expenses and revenues for the next unrecorded week. It must check if there is still space in the array.
-
A function that prints the number of weeks recorded
-
A function that prints all revenues and expenses recorded
-
A function that returns a pointer to the largest revenue recorded
Organize the program so the function prototypes are presented
first, and the definitions after the main
function. Your program should keep asking the user to select
one of the following options and execute
the corresponding function based on the user choice:
(A)
computed the total of all expenses,
(B)
add a new expense/revenue ,
(C)
print the number of weeks recorded,
(D)
print all revenues and expenses recorded,
(E)
print the largest revenue recorded, or
(F)
exit the program.
In: Computer Science
In Java design a class named Course to represent a course. The class contains:
Private data fields:
• courseName of type String
• courseNumber of type String
• section of type int
• numberStudents of type int
• finalGrades array of 100 double numbers
A constructor that creates a course with the specified name, number, section , and number of students.
A method setGrades() that will prompt the user to the enter the grades into double [] finalGrades.
int numberStudents, will control how many cells will be used.
A method to find and print the maximum grade.
A method to find and print the average grade.
Implement the class.
Write a test program that
Creates the course course1/CS155 with the values (CS, 155, 01, 20)
Uses setGrades to read 20 grades for the course course1/CS155. Note numberStudents or
finalGrades.length can be used in your for loop holding the value of 20.
print the maximum grade for course1/CS155
print the average grade for course1/CS155
Creates the course course2/CS300 with the values (CS, 300, 03, 30).
Uses setGrades to read 30 grades for the course course2/CS300. Note numberStudents or finalGrades.length can be used in your for loop holding the value of 20.
print the maximum grade for course2/CS300
print the average grade for course2/CS300
In: Computer Science
In: Computer Science
Java Problem:
Abstraction is the basis for good Object-Oriented design that is modular, reusable, and maintainable.
Interfaces and Abstract classes are two mechanisms in Java that provide high-level abstractions. An interface or abstract class is something which is not concrete, something which is incomplete.
For this discussion, what do you think is meant by “Programming to an interface”? What are some differences between Abstract Classes and Interfaces? Provide a simple example application with an interface definition and a class which implements the interface.
In: Computer Science
There are several models for ethical hacking that allow for effective penetration testing. Depending on the need of the company, a given penetration tester may choose to use all or one of these methods. Research White Box, Black Box, and Gray Box penetration testing models, and describe how each can be used to protect companies from black-hat hacking attempts.
In: Computer Science
Write a program to manage DVD rental in a video rental store. Create an abstract data type that represents a DVD in this store. Consider all the data and operations that may be necessary for the DVD type to work well within a rental management system. Include a print() member function that displays all the information about the DVD. Test your data type by creating an array of ten DVD instances and filling them using information read from a test input file that you create. Display the DVD information. Language C++.
In: Computer Science
Write a program that input two integer number and display results by performing the (+, -, ∗ , /) operations. It should check that divisor is not equal to zero? Secondly if user apply any operator other than that (+, -, ∗ , /) print error message? using if else (in C++)
In: Computer Science