PYTHON
(Game: Tic-tac-toe): Write a program that plays the tic-tac-toe game. Two players take turns clicking an available cell in a 3 x 3 grid with their respective tokens (either X or O). When one player has placed three tokens in a horizontal, vertical, or diagonal row on the grid, the game is over and that player has won. A draw (no winner) occurs when all the cells in the grid have been filled with tokens and neither player has achieved a win.
In: Computer Science
Show a trace of the recursive descent parser given in section 4.4.1 for the string b * (a * b) * a of Sebesta
In: Computer Science
Activity 1 – Using Netcat to Run Commands on Another Box
Activity 2 – Intro to Putty SSH
Note: you may still see some plaintext traffic (between your browser & your SSH client), but you should not be able to see any plaintext traffic going directly to mnsu.edu.
(hint: look for (i.e. filter) traffic going to the IP address of the mnsu.edu webserver)
7. Take appropriate screenshots to support your argument or have Dr. V verify it.
In: Computer Science
Write a program named Intervals.java that will take two time intervals (a starting and ending time) and compare them. The program first prompts the user for an earlier and later interval. Each interval consists of two numbers in 24-hour format (for example, 1507 for 3:07 p.m.):
Enter earlier start and end time as two 24-hour format times: 0700 1045 Enter later start and end time as two 24-hour format times: 0815 1130
You may presume that the user will enter the intervals with the start time and end time in the correct order.
The program will then calculate how many minutes are in each interval, which one is longer, and whether the intervals overlap (does the later interval start before the first one is finished):
The earlier interval is 225 minutes long. The later interval is 195 minutes long. The earlier interval is longer. These intervals overlap.
Here is output from another run of the program:
Enter earlier start and end time as two 24-hour format times: 1340 1445 Enter later start and end time as two 24-hour format times: 1500 1710 The earlier interval is 65 minutes long. The later interval is 130 minutes long. The later interval is longer. These intervals do not overlap.
If the intervals are of equal length, your output should say they are equally long. If the later interval starts at the same time that the earlier interval ends, they do not overlap.
Plan this program before you start writing it! No single part of this program is tremendously difficult, but there are many parts.
Hint: Convert the times to number of minutes after midnight. This will make your calculations much easier. For example, 0507 is 5 hours and 7 minutes past midnight, or 307 minutes past midnight. You will want to use / and % with 100 to split up the time into the hours and minutes part, but use 60 when calculating total minutes!
Extra challenge: Give the correct answer even if the user enters the beginning and end times for an interval in the wrong order, or if they enter the later interval first and the earlier interval second.
In: Computer Science
5. Write a CH program that takes the marks of a student as input and prints the grade on screen according to the following criteria: CRITERIA LESS THAN 60 GREATER THAN 60 BUT LESS THAN 65 GREATER THAN 65 BUT LESS THAN 70 GREATER THAN 70 BUT LESS THAN 75 GREATER THAN 75 BUT LESS THAN 80 GREATER THAN 80 BUT LESS THAN 85 GREATER THAN 85 BUT LESS THAN 90 GREATER THAN 90 GRADE F D D+ с C+ B B+ A
https://www.chegg.com/homework-help/questions-and-answers/5-write-ch-program-takes-marks-student-input-prints-grade-screen-according-following-crite-q58688769
In: Computer Science
Explain the implications of Management Information Systems on the Ecommerce industry.
In: Computer Science
Networking
In: Computer Science
Compare the language generated by Grammar #2 to the language generated by Grammar #1. How do the two languages compare to each other? (Is one language a proper subset of the other? Does each language contain a string that the other one does not? Do both grammars generate the very same language?)
grammar #1 where S is the start symbol
S → tV | iC | iV | i
C → tV
V → iC | iV | i
Grammar #2 where S is the start symbol
S → W
W → YW | Y
Y → CV | V
C → t
V → i
In: Computer Science
Assignment Specifications Background You are recently employed as a business analyst at Adam & Co, a Perth-based wholesaler of industrial supplies. Adam & Co sources its inventories from manufacturers in China, Thailand and Vietnam. The company has a centralised accounting system with networked terminals at different locations. Adam & Co’s expenditure cycle procedures are described as follow:
Purchases System
The process begins when the purchasing clerk checks the inventory subsidiary ledger at his/her computer terminal each morning. When the quantity of an item is deemed to be too low, the clerk selects a vendor from the valid vendor file and prepares a digital purchase order. The clerk prints two hard copies: one copy is sent to the vendor, and the other is filed in the purchasing department. Digital purchase order record is added to the purchase order file. When the goods arrive in the receiving department, the receiving clerk inspects them and reconciles the items against the information in the digital purchase order and the packing slip. The clerk then manually prepares two hard copies of the receiving reports. One of these accompanies the goods to the inventory warehouse, where the clerks shelves the goods and updates the inventory subsidiary ledger from his/her computer terminal. The clerk then files the receiving report in the department. The other copy of the receiving report is sent to the accounts payable department, where the accounts payable clerk files it until the supplier’s invoice arrives. When the accounts payable clerk receives the invoice he pull the receiving report from the temporary file, prints a hard copy of the digital purchase order, and reconcilesthe three documents. At this time, the clerk updates the digital accounts payable subsidiary ledger, the accounts payable control account and the inventory control account in the general ledger from his terminal. The clerk then sends the invoice, receiving report, and the purchase order copy to the cash disbursement department.
Cash Disbursements System
Upon the receipt of the documents from the accounts payable department, the cash disbursements clerk files the documents until their payment due date. On the due date, the clerk prepares a cheque for the invoiced account, when is sent to the treasurer who sign it and mail the cheque to the vendor. The cash disbursements clerk then updates the cheque register, accounts payable subsidiary ledger, and the accounts payable control account from his/her computer terminal. Finally, the receiving clerk files the invoice, purchase order copy, receiving report, and cheque copy in the department.
Payroll System
Adam & Co’s employees record their hours worked on time cards every day. Their supervisors review the time cards for correctness and submit them to the payroll department at the end of each week. Using a computer terminal connected to the central payroll system, which is located in the data processing department, the payroll clerk inputs the time card data, prints hard copies of the pay cheques, print two copies of the payroll register, and posts to digital employee records. The payroll clerk files the time cards in the payroll department and sends the employee pay cheques to the various supervisors for review and distribution to their respective department employees. The payroll clerk then sends one copy of the payroll register to the accounts payable department, and files the other with the time cards in the payroll department. Page 3 of 5 HA2042 Accounting Information Systems Individual Assignment The accounts payable clerk reviews the payroll register and manually prepares a disbursement voucher. The clerk sends the voucher and the payroll register to the general ledger department. The accounts payable clerk then writes a cheque for the entire payroll and deposits it in the imprest account at the bank. Finally the clerk files a copy of the cheque in the accounts payable department. Once the general ledger clerk receives the voucher and payroll register, the clerk posts to the general ledger from the department computer terminal and files the voucher and payroll register in the department.
required
System flowchart of payroll system??
In: Computer Science
Find a news article concerning a hacked website. Post a link, and summarize the article in your own words. (1-2 paragraphs)
Second question: You are hacking a website or application. Give a brief description of your attack scenario.
In: Computer Science
4.Which utilities can be used to perform remote management of servers?
5. What is the difference between the ifconfig and ifconfig commands?
6. Why should you use SSH over Telnet?
In: Computer Science
C++ program that converts a directed graph data from a user into a corresponding adjacency list format. First it will read an input graph data from a user first, after it will convert it to the adjacency matrix format. Assume that the maximum number of vertices in the input graph is less than or equal to 50.
The Sample Input 1
3 6 0 1 1 0 1 2 2 1 2 0 0 2
Output 1
0->1->2 1->0->2 2->0->1
The Sample Input 2
3 0
Output 3
0 1 2
In: Computer Science
Updating the following Java program below, I need to continue to take input for every employee in a company, and display their information until a sentinel value is entered that exits the loop and ends the program
import java.util.Scanner;
public class SalaryCalc
{
double Rpay=0, Opay=0;
void calPay(double hours, double rate)
{
if(hours<=40)
{
Rpay = hours * rate;
Opay = 0;
}
else
{
double Rhr,Ohr;
Rhr = 40;
Ohr = hours-Rhr;
Rpay = Rhr * rate;
Opay = Ohr * (1.5*rate);
}
}
public static void main(String[] args)
{
Scanner sc = new Scanner(System.in);
String name;
int shift = 0;
Double rate, hours;
System.out.println("Pay Calculator");
System.out.println("Enter Your Name");
name=sc.next();
System.out.println("Enter Your Shift, Enter 0 for Day, Enter1 for
Night");
System.out.println("0=Day, 1= Night");
System.out.println("Enter Number of Hours Worked");
hours=sc.nextDouble();
System.out.println("Enter Hourly Pay");
rate=sc.nextDouble();
SalaryCalc c= new SalaryCalc();
c.calPay(hours,rate);
Double Tpay= c.Rpay+ c.Opay;
System.out.println();
System.out.println("Calculate Pay");
System.out.println("Employee Name: "+name);
System.out.println("Employee Regular Pay: "+c.Rpay);
System.out.println("Employee Overtime Pay: "+c.Opay);
System.out.println("Employee Total Pay: "+Tpay);
if(shift==0)
{
System.out.println("Employee PayPeriod is Friday");
}
else
{
System.out.println("Employee PayPeriod is Saturday");
}
}
}
In: Computer Science
C# programming
Write a number guessing game using System.Collections.Generic.Dictionary.
e.g. Suppose we generate the following random numbers and penalty money:
1 |
3 |
4 |
6 |
7 |
11 |
12 |
13 |
19 |
20 |
333 |
234 |
12 |
500 |
1569 |
9900 |
23 |
2 |
588 |
23 |
If a user guess 5 and 3, we output "You earned 234 in total!"
If a user guess 1 and 13, we output "You earned 335 in total!"
If a user guess 1 and 1, quit
* Please use seeded random generation to help you debug your code, i.e. "Random rand = new Random(0);"
**You may have the following properties/methods useful: Count, ContainsKey, Add
Please copy and paste the final working program here:
In: Computer Science
Write a program in structured text that tells a butterfly valve to open for 10seconds and close thereafter.
In: Computer Science