In: Computer Science
a. Discuss the merits and demerits of using a single bus.
b. How will the use of a mezzanine bus architecture solve this problem?
c. Discuss various methods of bus arbitration.
In: Computer Science
Create shell scripts, .sh file. Please include a shebang line at
the top of the script as well as appropriate comments through
out.
Write a script that plays a simple “guess the number” game with the
user. It should select a random integer in the range [0 - 10], ask
the user to guess the value, and provide feedback of the form “too
high”, “too low”, or “congratulations” as appropriate. After the
correct value is guessed, the script should terminate.
In: Computer Science
*Microprocessors*
Write a program sequence that will test the byte STATUS and branch to ROOTINE_1 if bit 1, 2, or 4 is 1. Otherwise, it is a branch to ROUTINE_2 if both bits 1 and 3 are 1 and to ROUTINE_3 if both bits 1 and 3 are 0. In all other cases, it is to execute ROUTINE_4. Assume that the routines are more than 128 bytes long. Also, give a flowchart of the sequence.
In ASSEMBLY PROGRAM
In: Computer Science
your thoughts on what is UI? What is UX? What is VD? How are they different? Why do we have them? Why do you think this is so important to large companies?
120 words minimum
In: Computer Science
In R-Syntax, create a vector of 100 employees ("Employee 1", "Employee 2", ... "Employee 100")
[Hint: use the `paste()` function and vector recycling to add a number to the word "Employee"] then create a vector of 100 random salaries for the year 2017
[Use the `runif()` function to pick random numbers between 40000 and 50000] and finally create a vector of 100 salary adjustments between -5000 and 10000 [use runif() to pick 100 random #'s in that range]
In: Computer Science
Write a C++ program that checks if the password is correct. The password is a 4-digit number combination. The program repeats to ask the password until the password is correct or you enter -1 to exit.
Input: The password is set to ‘1123’. A user input the password to proceed, or -1 to exit.
Sample Output: The program should display the following output. (The red text is a user input.)
Test case 1: when you enter the correct password.
Enter the password (or -1 to exit): 1234
Password is incorrect.
Enter the password (or -1 to exit): 1123
Password is correct. Test case 2: when you exit the program.
Enter the password (or -1 to exit): -1
You exit the program.
In: Computer Science
Discussion Prompt(s)
VLANs and VTP
What role do VLANs play in modern networks and network design?
How can the VLAN Trunking Protocol (VTP) and VTP Pruning be used by network administrators or technicians in order to increase overall efficiency?
From a network administration perspective, do you see any potential problems that could arise as a result of using VTP?
In: Computer Science
Given an array, write code to scan the array for a particular purpose.
Given a class, write a getter and/or a setter.
Given a class with a list, write code that manages the list.
In: Computer Science
Write a simple Java program that does the following:
1) Declare a constant of type String to hold the words "Oakland
University".
2) Declare variables of the type stated, and Prompt the user to
enter in the following information and store in the variables
a. Their current GPA on a 4.0 scale, into a variable of type
double
b. The number of credits they have so far into a variable of type
int
c. The amount of tuition they paid so far into a variable of type
int
d. Their last name, into a String variable
e. Their first initial, into a char variable
3) Create a variable of type char. Determine and assign a letter
grade to it using the following rules and if else statement. (Note:
this is not our class grading scheme.)
a. gpa < 1 F
b. 1 <= gpa < 2.5 D
c. 2.5 <= gpa < 3 C
d. 3 <= gpa <= 3.5 B
e. 3.5 < gpa <= 4 A
4) Create a variable of type double. Cast the either of the
variables tuition or credits to
double to calculate the tuition dollars per credit hour and assign
it to the new variable. .
5) Print out to the system console a single String using escape
characters that outputs
multiple lines with the following information, formatted the same
as this example. In
other words, the first column should indicate what is being output,
and the second column
shows the value. Use variable names in your output String, not
literals. You can use tab
escape characters to set up the second column.
a. your first initial and last name, with a period and space
following your first initial
(from problem 2)
b. your university (from problem 1)
c. your Letter GPA grade (from problem 3)
d. Your tuition cost per credit hour (from problem 4)
In: Computer Science
Write a project mission statement (including an introduction, product vision, and project scope) for a fictional new software product.
Write at least FIVE user-level requirements for the product described above.
In: Computer Science
C++
Using what you know about inputs and outputs, code a simple ATM interaction. Your ATM will start with only $500 to give out, and YOUR balance will be 1000. The amounts the ATM can dispense are $40, $80, $200 and $400. After you've received your disbursement, the console will show the amount you have left in your account, as well as how much the ATM has to dispense (we live in a small, fictional town - no one will use this information for nefarious purposes).
You may choose to use characters to show the interface, or just list the options for the user at the console.
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Choose One
| $40 |$80
| $200 |$400
EXIT
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
In: Computer Science
Write a program in python to calculate the amount each person must pay toward the bill and toward the tip, for a group of friends who are eating out together. Since you are all friends, it is okay to split the costs evenly.
Your program should take as input:
Your program should output:
For example, with the following inputs:
Restaurant bill (without tax or tip): $35 Sales tax rate: 0.08 Level of service: 7 Number of friends: 3
the output should be:
Bill per person with tax: $12.6 Tip per person: $2.4499999999999997 Total per person: $15.049999999999999 Total bill including tax and tip: $45.15
Note that because floating point values often incur rounding errors, the output might not be completely accurate. This will not affect the grading. However, please make your input and output look like the example above, so that the automated system can evaluate your results.
Things to think about when you’re writing these programs:
In: Computer Science
This is an intro to Java Question. My current solution is giving
me bad outputs. Please show me your way of solving this.
Problem 4: Min/Max Search by Value Develop a program that, given a
sequence S of integers as input, produces as two output values, the
first is the minimum value that appears in the sequence and the
second is the maximum value that appears in the sequence.
Facts
● Scanner has a method that returns a boolean indicating whether a next integer exists in its input stream ( hasNextInt() )
● Scanner objects can be initialized to to scan String data as input.
Input
The input will begin with a single line containing T , the number of test cases to follow. The remaining lines contain the T sequences, one line per sequence. Each of these lines contains the values in the sequence. Each such value is separated from the next by at least one space.
Output For each sequence given as input, there should be four lines of output. The first line echos the given sequence. The second line indicates the minimum value that occurs. The third line indicates the maximum value that occurs. The fourth line is blank.
Sample Input
3
3 6 -1 4 6 5 3
0 0 0 0 -4 45 2 0 3 5 11 -7 854 25 3 -7 4 -3
Sample Output 3 6 -1 4 6 5 3
-1
6
0 0 0 0
0
0
-4 45 2 0 3 5 11 -7 854 25 3 -7 4 -3
-7
854
So Far This is what I have:
import java.util.Scanner;
public class MinMaxSearchByValue {
public static void main(String [] args) {
Scanner input = new Scanner(System.in);
int cases = input.nextInt();
input.nextLine();
for (int i = 0; i < cases; i++) {
String givenListOfNums = input.nextLine();
Scanner stringScanner = new Scanner (givenListOfNums);
int min = stringScanner.nextint();
int max = min;
while (stringScanner.hasNextInt()) {
int nextValue = stringScanner.nextInt();
if(nextValue < min) {
min = nextValue;}
else if (nextValue > max)
{
max =
nextValue;
}
}
}
System.out.printf("%s%n%d%n%d%n%n", givenListOfNums, min, max);
}
}
In: Computer Science
What is the output of the following code snippet? (If there is some kind of syntax error indicate this by marking "error" in your answer choice)
1.
int laps = 8;
if (laps++ > --laps)
laps += 2;
else if (--laps > (laps - 1))
laps += 4;
else if (++laps)
laps -= 3;
cout << laps << endl;
2.
What is the output of the following code snippet?
3.
integer i = 67;
double d = i - 1;
i = d;
character c = i;
if i > 65
cout << "The character
is: " << c << " in the alphabet" << endl;
else i <= 65
cout << "The character
is before the alphabet" << endl;
The character is: B in the alphabet |
||
The character is: C in the alphabet |
||
The character is: c in the alphabet |
||
The character is before the alphabet |
||
Error: the code will not compile |
4.
What is the output of the following? (if there is a syntax or runtime error enter “error” for your answer)
int know = 4;
short test = 5;
long large = 28;
if (large / 5 < test && ++test > know && ++test < large)
{
test += know;
}
else if (--test == know++)
{
test -= know;
}
large -= test;
cout << large << endl;
5.
What is the output of the following code snippet? (If there is some kind of syntax error indicate this by marking "error" in your answer choice)
//Note that there are no endl's until the end of the problem
short k = 5;
float red = 7.7f;
if (++k < --red)
cout << k;
if (k < --red)
cout << 4;
if (++red > k--)
cout << 2;
cout << k << endl;
In: Computer Science