In Java, I need a program that will ask a user to input how many tests they want the average of. For example, It needs to ask the user how many tests would you like the average of? When the user enters the amount of tests they want the average score of, the program needs to give them that many test scores to input. Then with the average, determine what their grade is, if 90-100=A if 80-90 = B etc. Java and please explain.
In: Computer Science
Use C++
The ADT UnsortedType List function ‘DeleteItem(ItemType item)’ creates an endless loop error when trying to delete a word or key that is not in the list.
Example: Delete the word “letter” from the unsorted list.
Here are the lists contents before the DeleteItem(ItemType item) call:
super formula travel free thick Josephine Clara education
The question is ‘how can I exit gracefully from the DeleteItem(itemType Item) call when the word or key is not in the unsorted list and not get an endless loop but instead printing out a message that the word ‘letter’ is not in the loop? What code can be added?
void UnsortedType::DeleteItem(ItemType item)
{
NodeType* location;
NodeType* tempLocation;
location = listData;
if (item.ComparedTo(location->info) == EQUAL)
{
tempLocation = location;
listData = listData->next;
}
else
{
while (!((item.ComparedTo((location->next)->info) == EQUAL)))
location = location->next;
tempLocation = location->next;
location->next = (location->next)->next;
}
delete tempLocation;
length--;
}
In: Computer Science
Suppose A and B are regular language. Prove that AB is regular
In: Computer Science
1. Write CREAT TABLE statements for the following tables (primary keys are underlined, foreign keys are in italic and bold). Make sure you have all needed constraints and appropriate datatypes for attributes: Student (stID, stName, dateOfBirth, advID, majorName, GPA) Advisor (advID, advName, specialty) 2. Insert several records in each table.
In: Computer Science
Convert the decimal floating point value 8.125 to a 12 bit binary floating point value. Use a sign bit, 3 bits (excess 3) for the exponent and an 8 bit significand. Enter just a 12 digit binary value ( e.g. 0 000 11110000 ) spaces ignored.
In: Computer Science
Discuss how companies use social media information to identify trends for products. Provide an example of a software or analytics tool that is used to gather data. What legal or ethical issues does this type of information gathering present? Provide two examples and justify your ideas with specific reasons, facts, and examples.
In: Computer Science
In: Computer Science
1. True or False? If one programmer in a large team is given the task of writing a single function for the team project, this programmer is more likely to need a function driver than a function stub.
2. A(n) ____________________ is a dummy function that is included for testing the higher-level code.
3. ____________________ is the principle that a module should perform exactly one abstract action.
4.
For the function definition
int SomeFunc( /* in */ int alpha,
/* in */ int beta )
{
int gamma;
alpha = alpha + beta;
gamma = 2 * alpha;
return gamma;
}
what is the function postcondition?
a. // Postcondition: gamma == 2*alpha
b. // Postcondition: alpha == alpha@entry + beta
// && gamma == 2*alpha
c. // Postcondition: Function value == gamma
d. // Postcondition: Function value == 2*alpha
e. // Postcondition: Function value == 2*(alpha@entry + beta)
5. ____________________ is a measure of the quantity of information passing through a module's interface.
6. In contrast to promotion, ____________________ of data values can potentially cause loss of information.
7.
Using the library functions available through the header file cctype, which of the following can be used to determine if the variable someChar contains either a digit character or a lowercase letter?
a. if (isalnum(someChar) || isdigit(someChar))
b. if (isalpha(someChar) || isdigit(someChar))
c. if (isalnum(someChar) && !isupper(someChar))
d. if (islower(someChar) || isdigit(someChar))
e. c and d above
8. True or False? For team programming to succeed, it is essential that all of the module interfaces be defined explicitly and the coded modules adhere strictly to the specifications for those interfaces.
9.
Which of the following could cause an unexpected side effect?
a. modifying a global variable
b. changing the value of a value parameter
c. referencing a global constant
d. declaring an incoming-only parameter to be a reference parameter
e. a and d above
10. True or False? Unsigned types are most appropriate for advanced techniques that manipulate individual bits within memory within memory cells to avoid errors caused by, for example, using unsigned variables for ordinary numeric computations.
In: Computer Science
Write a function which takes in X and Y arrays, a column number, and a threshold. The function should return arrays X0 and Y0 containing all rows where the value in the specified column falls strictly below the threshold, as well as arrays X1 and Y1 containing all rows where the value in the specified column is above or equal to the threshold.(use numpy)
def split_on_feature(X_test, Y_test, column, thresh):
## TYPE ANSWER HERE
In: Computer Science
public class Square {
public static final int NUM_OF_SIDES = 4;
private float length;
public Square(float l) {
setLength(l);
}
public void setLength(float l) {
if(l >= 0) {
length =
l;
}
}
public float getLength() {
return length;
}
//TODO - Add method to calculate add return area
//TODO - Add method to calculate add return
perimeter
public String toString() {
return String.format("Square
[length: %f]", length);
}
}
I am trying to add the formulas for area and perimeter but using the info provided each time I get a compile error indicating I am missing a main method. How would I go about adding these formulas without getting more compile errors?
In: Computer Science
Computer Science: Data Structures and Algorithms
Practice:
Construct a C++ program that takes two SQUARE matrices, and multiplies them and produces a new matrix:
Example:
[Matrix A] * [Matrix B] = [Matrix C]
(A 3x3 is the most preferred example to use)
(The first two matrices, A and B can be fixed numbers, hard-coded into the program. as opposed to user input)
Display Matrix C, also (cout etc.)
In: Computer Science
c++ code
Reverse the order of elements in a vector of integers using two functions:
(a) The first function takes the input vector a and return a vector b with the input data but in the reverse order, e.g. input: 1, 2, 3 and output 3, 2, 1.
(b) The second function is a recursive one and it reverses the input data in place (without using an additional vector).
In: Computer Science
You have been asked to create a list of all MAC addresses and corresponding IP addresses and computer names in your network. Propose at least two methods for performing this task. Your network has almost 100 computers in a Windows Server 2016 domain network with statically assigned IP addresses. Using the tools available in Windows Server 2016, carry out the procedure you think will work best. Write a short report of your results and submit it to your instructor.
In: Computer Science
// The QuickCopy company currently makes 100,000 copies per
year
// at 15 cents each.
// They expect to increase the number of copies produced
// by 4 percent per year each year for the next 10 years,
// starting with this year.
// They also expect the price of each copy to increase
// by 3 cents per year, starting with this year.
// This program displays the company's expected
// income for each of the next 10 years.
// Modify it to be more efficient.
start
Declarations
num year = 1
num copies = 100000
num price = 0.15
num total = 0
num COPIES_INCREASE = 0.04
num PRICE_INCREASE = 0.03
copies = copies + copies * COPIES_INCREASE
price = price + price * PRICE_INCREASE
total = total + copies * price
output year, total
year = year + 1
copies = copies + copies * COPIES_INCREASE
price = price + price * PRICE_INCREASE
total = total + copies * price
output year, total
year = year + 1
copies = copies + copies * COPIES_INCREASE
price = price + price * PRICE_INCREASE
total = total + copies * price
output year, total
year = year + 1
copies = copies + copies * COPIES_INCREASE
price = price + price * PRICE_INCREASE
total = total + copies * price
output year, total
year = year + 1
copies = copies + copies * COPIES_INCREASE
price = price + price * PRICE_INCREASE
total = total + copies * price
output year, total
year = year + 1
copies = copies + copies * COPIES_INCREASE
price = price + price * PRICE_INCREASE
total = total + copies * price
output year, total
year = year + 1
copies = copies + copies * COPIES_INCREASE
price = price + price * PRICE_INCREASE
total = total + copies * price
output year, total
year = year + 1
copies = copies + copies * COPIES_INCREASE
price = price + price * PRICE_INCREASE
total = total + copies * price
output year, total
year = year + 1
copies = copies + copies * COPIES_INCREASE
price = price + price * PRICE_INCREASE
total = total + copies * price
output year, total
year = year + 1
copies = copies + copies * COPIES_INCREASE
price = price + price * PRICE_INCREASE
total = total + copies * price
output year, total
stop
In: Computer Science
You are the IT director for XYZ Manufacturing. Your company is a B2B (business-to-business) organization that supplies auto parts to General Motors. There are 200 employees at XYZ Manufacturing with a headquarters in Detroit, Michigan, and field offices in Omaha, Nebraska; Austin, Texas; and Orlando, Florida. There are over 10,000 items in the inventory for XYZ Manufacturing and you receive raw material (i.e. steel, plastic, wiring, etc.) from China.
XYZ Manufacturing has been struggling for years with inadequate computer resources to track inventory and handle user requests from internal management, orders and invoices from General Motors, orders and invoices from your suppliers, and management reports. There is clearly an inability to store and retrieve complex “big data,” and recently there have been frequent security breaches. Your CIO is extremely frustrated with this situation and is looking for an alternative approach to providing IT services. She has asked you for input on this investigation.
Write a paper that describes advantages and disadvantages that cloud computing offers to XYZ Manufacturing. Include a sensible, detailed strategy to migrate to cloud computing, addressing the issues of performance, scalability, and economic factors.
Your paper should be 8-10 pages in length. Include at least five credible references.
In: Computer Science