Questions
JAVA Program Create a class called SoccerPlayer Create 4 private attributes: First Name, Last Name, Games,...

JAVA Program

Create a class called SoccerPlayer

Create 4 private attributes: First Name, Last Name, Games, and Goals

Have two constructors

Constructor 1 – default constructor; all values to "NONE" or zero

Constructor 2 – accepts input of first name, last name, games and goals.

Create get and set methods for each of the four attributes

Create a method the returns a double that calculates the average goals per game

This method checks for zero games played:

If there are zero played, display an error and set average to 0;

If greater than zero, do the math and set average to result of calculation

Create a test program that allows you to set the first name, last name, number of games and number of goals. Call it SoccerPlayerTest.

Create two instances of players.

The first should use the default constructor and the set methods to fill the attributes

The second should use the other constructor to set the attributes

Display the info about the players including the average goals per game.

Use the same SoccerPlayer class you created in CE-SoccerPlayer

Create a test program that allows you to enter in the first name, last name, number of games and number of goals. Call it SoccerPlayerTest.

Create an array of players. There should be three players.

Create a loop and ask for the information about each player.

Create a loop and display the info about the players including the average goals per game

In: Computer Science

1 Write a Java method that takes an integer, n, as input and returns a reference...

1 Write a Java method that takes an integer, n, as input and returns a reference to an array of n random doubles between 100.0 and 200.0. Just write the method.

2. You have a class A:

public class A

{

int i, double d;

public A(double d)

{

this.d=d;

this.i=10;

}

}

In: Computer Science

(please use zelle's Python Graphics library, I've already asked this question and have had to post...

(please use zelle's Python Graphics library, I've
already asked this question and have had to post
this multiple times. I am working with the Python Graphics library and nothing else. thank you! note that I will downvote anything other than python graphics. this is the 4th time I've had to post this same question, just a simple code with 1 ball is needed )

im trying to create a function that has a circle
bouncing left to right on a window and when the
circle is clicked on, it stops moving horizontally
and begins moving up and down on the window.

In: Computer Science

Suppose you wanted to create a block cipher that was based at least in part on...

Suppose you wanted to create a block cipher that was based at least in part on a hash function. We know that hash functions are one-way, while a cipher needs to be reversible in order to decrypt it. Come up with a way that you could use a hash function in this way. Looking over DES could be a good way to start thinking about this question.

In: Computer Science

Section D – BCNF Decomposition For each question in this section, you are required to decompose...

Section D – BCNF Decomposition

For each question in this section, you are required to decompose the given relation into BCNF form
and state any new relations created in the process with their functional dependencies and identify any
functional dependencies which are lost during the decomposition. You must show your working using
the tree method presented in tutorials. Consider the functional dependencies in the order presented
in the question.

Question 1
R [A, B, C, D, E, F, G, H, I, J]
{A} -> {B, C}
{B} -> {D, E, F}
{C} -> {G, H, I}
{H, I} -> {F, J}

Question 2
R [A, B, C, D, E, F, G, H]
{A, B, C} -> {D, E, F, G}
{G, H} -> {A, B, C}
{C} -> {H}

Section E – 3NF Decomposition
Question 1
Based on the following relational schema and functional dependencies, find minimal cover for
relation R.
R [A, B, C, D, E, F, G, H, I, J, K, L, M, N]
{A} -> {C, D, F, G}
{B} -> {E}
{A, G} -> {J, C}
{D, E, B} -> {H, I, J}
{J} -> {K, L, M}
{M} -> {N}

Question 2
The minimal cover has been provided below for a given relation with a set of functional
dependencies. Using the minimal cover, normalise the relation to 3NF such that all functional
dependencies are preserved.


R [A, B, C, D, E, F, G, H]
{A} -> {D, F}
{B} -> {G, E}
{F, G} -> {H}
Minimal Cover: {
{A} -> {D}, {B} -> {G}, {B} -> {E}, {A} -> {F}, {F, G} -> {H}
}

In: Computer Science

Case Project 4-1: Using System-Monitoring Tools You recently became the server administrator for a company. As...

Case Project 4-1: Using System-Monitoring Tools

You recently became the server administrator for a company. As soon as you walked in the door, users were telling you the network is running slowly quite often, but they couldn't tell you when it happened or how much it slowed down. What tests and measurements could you use to try to determine what's going on?

Case Project 4-2: Protecting the Network

You work for a company that hasn't been too concerned about network security and performance, but as more employees are hired, management is beginning to worry that employees are using the Internet for purposes that aren't work related. What types of network monitoring could you do to make sure Internet access is being used correctly in the company?

Case Project 4-3: Auditing Sensitive Data Access

You're the network administrator for a company that has contracts to store sensitive data for other companies, and clients want reassurance that you're protecting their data. The company has groups of employees who will be working with clients, and several contractors need access to the data, too. To make managing data easier, each client has been assigned his or her own disk volume. What types of auditing can you set up to reassure clients their data is protected and to check which files employees and contractors are accessing?

In: Computer Science

Consider the following situations: You are the system administrator for an ISP that provides a large...

Consider the following situations:

  1. You are the system administrator for an ISP that provides a large network (e.g., over 64,000 IP addresses). Show how you can use SYN cookies to perform a DOS attack on a web server.
  2. If you are the system administrator of the web server, how do you defend against such DOS attack?

In: Computer Science

Every time I run this code I get two errors. It's wrote in C# and I...

Every time I run this code I get two errors. It's wrote in C# and I can't figure out what I'm missing or why it's not running properly. These are two separate classes but are for the same project.

using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace RecursiveMethod
{
    class Program
    {
        static bool ordering = true;
        static string str;
        static int quantity = 0;
        static string Invoic = string.Empty;
        static double itemPrice;
        static double totalCost = 0;
        static void Main(string[] args)
        {
            int menuOption;
            int Item = 0;

            Console.WriteLine("Enter your FirstName"); //First Name 
            string sFirstName = Console.ReadLine();

            Console.WriteLine("Enter your LastName"); //Last Name
            string sLastName = Console.ReadLine();

            Console.WriteLine("Enter your ID"); //Last Name
            string sStudentID = Console.ReadLine();

            str = sFirstName + sLastName;

            //Call this methos to show student info staring of the programm
            displayStudentInfo(str,sStudentID);

            //display your message function
            displayMessage(str);


            string invoice = string.Empty;
            while (ordering)
            {
                Console.WriteLine("Enter your item");
                menuOption = Convert.ToInt32(Console.ReadLine());
                double cost;
                
                switch (menuOption)
                {
                    case 1:
                        Item = 1;
                        ProgressLogic.addItem(1, invoice, out Invoic, out quantity,out itemPrice);
                        invoice = Invoic;
                        cost = displayTotal(itemPrice, quantity);
                        break;
                    case 2:
                        Item = 2;
                        ProgressLogic.addItem(2, invoice, out Invoic, out quantity, out itemPrice);
                        invoice = Invoic;
                        cost = displayTotal(itemPrice, quantity);
                        break;
                    case 0:                       
                        done(totalCost, invoice);
                        Console.ReadLine();
                        break;
                    default:
                        Console.WriteLine("Invalid Option");
                        break;
                }
            }

        }

        /// <summary>
        /// Show the Message
        /// </summary>
        /// <param name="str"></param>
        public static void displayMessage(string str)
        {
            Console.WriteLine("Welcome " + str + " to dave onlines coffee shop");
        }

        /// <summary>
        /// Show the Student Info
        /// </summary>
        /// <param name="studentFullName"></param>
        /// <param name="iStudentID"></param>
        public static void displayStudentInfo(string studentFullName, string iStudentID)
        {
            Console.WriteLine("Welcome " + studentFullName + " Student ID - " + iStudentID);
            Console.WriteLine("Please choose the following Products code. Enter 0 to Exit");
            Console.WriteLine("Product 1 kona bled -> $14.95");
            Console.WriteLine("Product 2 cafe verona -> $9.95");
        }

        /// <summary>
        /// Done Method to show the information based on the total cost calculations
        /// </summary>
        /// <param name="totalCost"></param>
        public static void done(double totalCost, string strInvoice)
        {
            ordering = false;
            Console.WriteLine("Customer Name");
            Console.WriteLine("\n"+ strInvoice);
            Console.WriteLine("\n"+"Total Cost"+ totalCost + "$");
        }

        /// <summary>
        /// Disaply the total cost
        /// </summary>
        /// <param name="itemPrice"></param>
        /// <param name="quant"></param>
        /// <returns></returns>
        public static double displayTotal(double itemPrice, double quant)
        {
            double cost = (itemPrice * quant);
            totalCost += cost;
            return totalCost;
        }
    }
}
using Microsoft.SqlServer.Server;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace RecursiveMethod
{
    public class ProgressLogic
    {
       
       //This method will do the programming logic and will return the calculations in the out parameter       
        public static double addItem(int item, string oldInvoiceString, out string Invoice, out int quantity, out double itemPrice) {
           //we need to initialize the out parameters first so definitily it will some value instead of nothig
           //ow it will show error
            Invoice = "";
            quantity = 0;
            itemPrice = 00.00;
            
            if (item == 1) {
                itemPrice = 14.95;
                Console.WriteLine("Enter Quantity"); //Last Name
                quantity = Convert.ToInt32( Console.ReadLine());
                Invoice = oldInvoiceString + " Product 1 kona Blend -> $" + itemPrice + " * " + quantity + " = " + itemPrice * quantity + "\n";
            }

            if (item == 2)
            {
                itemPrice = 9.95;
                Console.WriteLine("Enter Quantity"); //Last Name
                quantity = Convert.ToInt32(Console.ReadLine());
                Invoice = oldInvoiceString + "Product 2 cafe verona-> $" + itemPrice + " * " + quantity + " = " + itemPrice * quantity + "\n";
            }

            return itemPrice;
        }

        
    }
}

In: Computer Science

In 4-5 paragraphs describe “rooting”. Is rooting forensically sound? Why or why not? Are you allowed...

In 4-5 paragraphs describe “rooting”. Is rooting forensically sound? Why or why not? Are you allowed to root tablets? Why or why not?

Provide scholarly examples or articles that discuss rooting in forensics or cybersecurity.

In: Computer Science

Assingment: for c++ A magic square is an n x n matrix in which each of...

Assingment: for c++

A magic square is an n x n matrix in which each of the integers 1, 2, 3...n2 appears exactly once and all column sums, row sums, and diagonal sums are equal. For example, the attached table shows the values for a 5 x 5 magic square in which all the rows, columns, and diagonals add up to 65.

The following is a procedure for constructing an n x n magic square for any odd integer n. Place 1 in the middle of the top row. Then, after integer k has been placed, move up one row and one column to the right to place the next integer k+1 unless one of the following occurs:

-If the move takes you above the top row in the jth column, move to the bottom of the jth column and place k+1 there.

-If the move takes you outside to the right of the square in the ith row, place k+1 in the ith row on the left side.

-If the move takes you to an already filled square or if you move out of the square at the upper right-hand corner, place k+1 immediately below k.

Write a program to create a magic square. Get the size of the square (an odd integer) from the user. You must use a static matrix for the magic square. A solution using a dynamic matrix is unacceptable.

My code works, but the diagonals do not work, any help would be great, with documentation.

Here's my code:

#include
#include
using namespace std;

int main()
{
int n; //variable for array size (n x n)

cout<< "Enter an odd integer less than 50: ";
cin>>n;

int MagicSq[50][50];

// Clears the array of any unwanted data
for(int x = 0; x < n; x++)
{
for(int y = 0; y < n; y++)
{
MagicSq[x][y] = 0;
}
}

// the variables being used for the arrays
int Row,
Col;
int x =0 ;
int y= n / 2;

// Filling in each element of the array using the magic array
for ( int value = 1; value <= n*n; value++ )
{
MagicSq[x][y] = value;
// Finding the next cell
Row = (x - 1) % n;
Col = (y + 1) % n;


// If the cell is empty
if ( MagicSq[Row][Col] == 0 )
{
x = Row;
y = Col;
}
else
{
// The cell is full, so use the cell above the previous one.
x = (x + 1 + n) % n;
}

}


for(int i=0; i {
for(int j=0; j cout << MagicSq[i][j]<<" ";
cout << endl;
}
return(0); //End
}

In: Computer Science

import java.util.Scanner; import java.text.value; public class Rectangle { public static void main(String[]args){ System.out.println("Find the area of...

import java.util.Scanner;

import java.text.value;

public class Rectangle

{

public static void main(String[]args){

System.out.println("Find the area of a rectangle");

System.out.println("Find the perimeter of a rectangle");

System.out.println("Enter a number of choice");

}

public static void main(String[]args){

int choice = //the user choice

double value :0 // the value returned from the method

double length; // the length of rectangle

double width;// the width of rectangle

Scanner scan = new Scanner(System.in);

System.out.println("Enter length: ");

double length = scan.nextDouble(); //the length of rectangle

System.out.println("Enter width :");

double width = scan.nextDouble(); //the width of rectangle

double area = length*width; //calculating area

double perimeter = 2*(length+width); //calculating perimeter

System.out.println("Area of rectangle is:" + value);

System.out.println("Perimeter of rectangle is:"+value);

}

}

Please fix this Java program to get output and update it  

In: Computer Science

Use rules of inference to show that the hypotheses p → q, r → s, and...

Use rules of inference to show that the hypotheses p → q, r → s, and ¬q ∨ ¬s implies ¬p ∨ ¬r

In: Computer Science

Why am I not able to connect to a site using wifi?

Why am I not able to connect to a site using wifi?

In: Computer Science

Suppose the cable company represents the channels your TV has access to with a 32-bit integer....

Suppose the cable company represents the channels your TV has access to with a 32-bit integer. Each channel from 0 to 31is represented by one bit, where 1 means the channel is enabled and 0 means the channel is disabled. Assume channel 0 is the least significant bit. When you get your cable box, the technician sets the 32-bit code.

// for example, this code enables channels 0, 1, and 2 only intcode= 7;

In cableCompany.c, write code for the following tasks. You may not call any “magic” library functions and you may not use any loops. Rather you should just use basic operations like creating and assigning variables, equality (==), ifstatements, and the bitwise operations (~, &, <<, >>, |, ^)

.a.A function that returns whether a particular channel (integer 0-31) is enabled. boolisEnabled(intA, charchannel) { ... }

b.A function that returns a new integer, with the given channel enabled.intenableChannel(intA, charchannel) { ... }

In: Computer Science

JAVA Write a Java console application that prompts the user to enter the radius of a...

JAVA

Write a Java console application that prompts the user to enter the radius of a circle, then prints its radius, diameter, circumference, and area.

The Console Output

Enter the radius of the circle: 1.2

The radius is 1.2
The diameter is 2.4
The circumference is 7.5398223686155035
The area is 4.523893421169302

Programmer Notes

  • Write and document your program per class coding conventions.
  • Add an instance variable double radius. Generate its get/set methods.
  • Manually type the methods getDiameter(), getCircumference(), and getArea(). To calculate the circumference and area, use 3.14159 or the Java defined constant Math.PI
  • In main method, create a new instance of Assign3: Assign3 circle = new Assign3();
  • Create an instance of Scanner. Call print() to prompt the user to enter the radius. Call input.nextDouble() to get the user input. Call circle.setRadius() to set the radius.
  • Then call println() 4 times, each with the value of getRadius, getDiameter, getCircumference, getArea, respectively.

In: Computer Science