In: Computer Science
You are to write a program using Java that will simulate a slot machine with four wheels. It will determine the amount of money won for each spin. The four wheels spin and stop showing a value between 0 and 9 inclusive. It costs $2 to play.
•You win $500 (but not the $2 you bet) if you get 4 wheels the same.
•You win $10 (but not the $2 you bet) if you get exactly 3 of a kind.
•You win $5 (but not the $2 you bet) if you get two pairs.
•You win $2 if you get 2 wheels the same (That is, you break even).
•You win nothing and lose your $2 bet if you get no matches.
Your program must use 4 methods:
1.One to randomly generate the 4 wheel values.
2.One to output the result of the spin.
3.One to compute the win or loss and print the correct message
4.Finally, one to output new balance and a nice line break graphic as seen below.
Input and Output:Your program will randomly generate a starting balance between $100 and $200 inclusive. Your program will randomly generate four integers (1 for each wheel).Your program will output a description of the input combination and the amount you won or lost.Your program will output your new balance after each spin.
Please help
In: Computer Science
It is very important to see oppression as a structural issue without taking on individual guilt for historical injustices. Explain what this means and why it is important. Why does this matter? Be sure to include the concept of the "luxury of obliviousness" in your answer. (Can someone answer this as long as possible)
In: Computer Science
Software Engineering Process Models
Question 4
(a) Give a description of the waterfall process model. In your
answer you should describe the main tasks that are conducted, and
the order in which they are carried out. You may want to include a
diagram to clarify your answer.
[7 marks]
(b) Describe one advantage and one disadvantage of adopting the
waterfall process model in comparison to other process
models.
[4 marks]
(c) Describe the key principles which underlie Agile software
development.
[8 marks]
(d) Risk management is an important part of software project
planning. Describe what is meant by a risk and give two examples of
risks which could seriously affect a project.
[4 marks]
In: Computer Science
Explain in your own words what is meant by the .NET term of "master pages"? Include an example.
In: Computer Science
Visit the web site of one of the following government agencies:
• Federal Trade Commission
• FFIEC
• Federal Drug Administration
Search the site for information about the agency’s standards related to information security. Study the information you find and draw some conclusions about it. How are the regulations presented? How easily can businesses access and follow these regulations? Summarize your findings in a brief report (06 - 08 pages)
In: Computer Science
In: Computer Science
Give an example of a non-regular Context-Free Language that can be recognize by a Deterministic Pushdown automata and one that cannot.
In: Computer Science
Using C# create a new grade book program for a teacher.
We have a class with 10 students who have each taken 5 tests. Create an array to hold:
Use a random number generator to generate the test scores for each student. The student names may be hard-coded into the array.
Create and call a method that calculates and stores each student’s average in the array.
Create and call a method that displays the grades and average for each student.
In: Computer Science
C++
Modify FunctionTable.cpp so each that each function returns a string(instead of printing out a message) and so that this value is printed inside of main().
//: C03:FunctionTable.cpp
// Using an array of pointers to functions
#include <iostream>
using namespace std;
// A macro to define dummy functions:
#define DF(N) void N() { \
cout << "function " #N " called..." << endl; }
DF(a); DF(b); DF(c); DF(d); DF(e); DF(f); DF(g);
void (*func_table[])() = { a, b, c, d, e, f, g };
int main() {
while(1) {
cout << "press a key from 'a' to 'g' "
"or q to quit" << endl;
char c, cr;
cin.get(c); cin.get(cr); // second one for CR
if ( c == 'q' )
break; // ... out of while(1)
if ( c < 'a' || c > 'g' )
continue;
(*func_table[c - 'a'])();
}
}
In: Computer Science
Write a fragment of MIPS code to convert temperature in Kelvin to Fahrenheit
In: Computer Science
Static methods can be called directly from the name of the class that contains the method. Static methods are usually created to do utility operations. For example: public class Test{ public static int timesTwo(int value){ return value * value; } } public class TestDriver{ public static void main(String[] args){ int var = Test.timesTwo(5); System.out.println(var); } } Create a class called ManyLinkedLists. It will contain a static method called createLinkedList(). That method takes an argument that is a constant defined in the ManyLinkedLists class. The identifier of the constants should describe a type of linked list. When the createLinkedList method is called, it should return a linked list object of the type identified by the constant. For example: DoubleEndedList del = ManyLinkedLists.createLinkedList(ManyLinkedLists.DOUBLEENDEDLIST); Give the createLinkedList method the ability to return the linked lists described below: A double-ended linked list. A doubly linked list.
In: Computer Science
2. Combine multiple files
Use Python programming to combine two text files: customer-status.txt and sales.txt
Data columns in customer-status.txt (separated by comma):
Account Number, Name, Status 527099,Sanford and Sons,bronze
Data columns in sales.txt (separated by comma):
Account Number, Name, SKU, Quantity, Unit Price, Ext Price, Date
163416,Purdy-Kunde,S1-30248,19,65.03,1235.57,2014-03-01 16:07:40 527099,Sanford and Sons,S2-82423,3,76.21,228.63,2014-03-01 17:18:01
After you combine, you will see the following:
527099,Sanford and Sons,S2-82423,3,76.21,228.63,2014-03-01 17:18:01,bronze
In: Computer Science
Using C++
Create a polymorphic banking program using the Bank-Account hierarchy created in Exercise 2 of Written Assignment 4. For each account in the vector, allow the user to specify an amount of money to withdraw from the Bank-Account using member function debit and an amount of money to deposit into the Bank-Account using member function credit. As you process each Bank-Account, determine its type. If a Bank-Account is a Savings, calculate the amount of interest owed to the Bank-Account using member function calculateInterest, then add the interest to the account balance using member function credit. After processing an account, print the updated account balance obtained by invoking base-class member function getBalance. [MO 5.1, MO 5.2]
In: Computer Science
In: Computer Science