Questions
Create a new PHP document (Unit Objective 1) Write a comment similar to the following: "This...

  1. Create a new PHP document (Unit Objective 1)
  2. Write a comment similar to the following: "This is my first PHP document, which displays some data in the web browser"(Unit Objective 1)
  3. Assign your name as a string value into the variable labeled myName (Unit Objective 2)
  4. Assign 53870 numeric value into the variable named randomNumber (Unit Objective 2)
  5. Assign the name of the web browser and operating system of the user accessing the file into the variable named userAgent (Unit Objective 2)
  6. Assign the file name of the currently running script into the variable named fileName (Unit Objective 3)
  7. Assign the IP address from which the user is viewing the current page into the variable named ipAddress (Unit Objective 3)
  8. Use echo command in order to display some informative descriptions followed by the values of myNem, randomNumber, userAgent, fileName, and ipAddress variables in the web browser. Each informative description and the value pair whould be displayed on a separate line (Unit Objective 4)
  9. Save the file as myFirstPHP.php
  10. Create a folder within the public_html folder in your account in people.ysu.edu, name this folder as "e_commerce".
  11. Create another folder within the "e_commerce" folder you just created, and name this folder as "Assignment_1", and upload "myFirstPHP.php" file into the "Assignment_1" folder.
  12. Attach "myFirstPHP.php" file to your response to this assignment, and submit it.

In: Computer Science

PYTHON - You are given a data.csv file in the /root/customers/ directory containing information about your...

PYTHON - You are given a data.csv file in the /root/customers/ directory containing information about your customers. It has the following columns: ID,NAME,CITY,COUNTRY,CPERSON,EMPLCNT,CONTRCNT,CONTRCOST where ID: Unique id of the customer NAME: Official customer company name CITY: Location city name COUNTRY: Location country name CPERSON: Email of the customer company contact person EMPLCNT: Customer company employees number CONTRCNT: Number of contracts signed with the customer CONTRCOST: Total amount of money paid by customer (float in format dollars.cents) Read and analyze the data.csv file, and output the answers to these questions: How many total customers are in this data set? How many customers are in each city? How many customers are in each country? Which country has the largest number of customers' contracts signed in it? How many contracts does it have? How many unique cities have at least one customer in them? The answers should be formatted as: Total customers: Customers by city: : : ... Customers by country: : : ... Country with most customers' contracts: USA ( contracts) Unique cities with at least one customer: The answers for Customers by city and Customers by country must be sorted by CITY and COUNTRY respectively, in ascending order. If there are several cities that are tied for having the most customers' contracts, print the lexicographically bigger one.

In: Computer Science

Identify every possible primary key, candidate key, and foreign key for the following relations. Separate each...

Identify every possible primary key, candidate key, and foreign key for the following relations. Separate each key using a semicolon to avoid confusion.

Assumptions: MIScompany has branches located in several states within the United States. A customer can be an individual or organization. driverId is the driving license number, ssno is the social security number and upc is the universal product code. Any equipment is rented and returned at the same branch. A customer can be a manufacturer and vice versa. (Minus 1 point for each wrong answer)

            MIScompany (name, address, phone, email, FedTaxId, StaTaxId)

           

Primary key:

Candidate key:

Foreign key: none

branch (branchId, name, address, phone, email, FedTaxId, StaTaxId)

Primary key:

Candidate key:

Foreign key:

employee (empId, driverId, ssno, name, branchId)

Primary key:

Candidate key:

Foreign key:

customer (custId, name, address, driverId, ssno, FedTaxId, StaTaxId)

Primary key:   

Candidate key:

Foreign key:

equipment (equipId, type, upc, purchaseDate, year, manufacturId, cost, rentFee, branchId)

Primary key:

Candidate key:

Foreign key:

manufacturer (manufacturId, name, FedTaxId, StaTaxId, phone, email)

Primary key:

Candidate key:

Foreign key:

rental (rentalId, equipId, custId, rentDate&time, returnDate&time, empId, branchId)

Primary key:

Candidate key:

Foreign key: equipId;

In: Computer Science

We will extend project 2 by wrapping our input and output in a while loop. Repeatedly...

We will extend project 2 by wrapping our input and output in a while loop. Repeatedly do the following:

Prompt the user for their name, get and store the user input.

Prompt the user for their age, get and store the user input. We will assume that the user will enter a positive integer and will do no error checking for valid input.

Determine and store a movie ticket price based on the user's age. If their age is 12 or under, the ticket price is $5. If their age is between 13 and 64, inclusive, the ticket price is $10. If their age is 65 or greater, the ticket price is $8.

When all the user input has been gathered, print out a meaningful label such as 'Name: ' followed by the entire user name on one line. On the next line, print out a meaningful label such as 'Age: ' followed by the user's age. On the next line, print out a meaningful label such as 'Ticket Price: ' followed by the ticket price your program calculated. Your output should look something like this:

Name: Mickey M Mouse

Age: 19

Ticket Price: $10

Now prompt the user asking if they would like to enter another ticket buyer's name. If they answer 'y' for yes, perform the loop again getting the input from the user, calculate the ticket price, and output the information. If the user answers anything other than 'y' the loop should exit.

in Python please

In: Computer Science

I am getting the following error: SalaryCalc.java:41: error: variable shift might not have been initialized if(shift==0)...

I am getting the following error: SalaryCalc.java:41: error: variable shift might not have been initialized if(shift==0) ^ 1 error

Please FIX

This is my Java code:

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;
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

Updating the following Java program below, I need to continue to take input for every employee...

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

Complete each of the programs here. Create a separate Netbeans project for each program using the...

Complete each of the programs here. Create a separate Netbeans project for each program using the name I specified. Create a single java main class for each of the programs using the filename I specified.

Task 1: (5 points)
Project name: CtoFConverter
Main file name: TempConverter.java
A program that converts an inputted temperature in C and provides the equivalent temperature in F. Hint: Google is your friend! Given C, solve for F. Again, check for a valid input value and only respond with the F value if you got it, otherwise output an appropriate error msg to the user. Testing: 3 conditions: Bad Input, then test for the known freezing and boiling points.

EMBED SCREEN SHOT(S) OR COPY THE OUTPUT WINDOW OF NETBEANS HERE SHOWING YOUR PROGRAM TEST RUN(S):

Task 2: (5 points)
Project name: FuelCosts
Main file name: FuelCost.java
Write a program that asks the user to input
• The number of gallons of gas currently in the tank
• The fuel efficiency in miles per gallon
Then print how far the car can go with the gas in the tank. Again, check for valid input and exit with an error msg if you do not have it. Testing: here just use some reasonable values that you can inspect the calculations and determine they are correct.

In: Computer Science

#Below is a class representing a person. You'll see the #Person class has three instance variables:...

#Below is a class representing a person. You'll see the
#Person class has three instance variables: name, age,
#and GTID. The constructor currently sets these values
#via a calls to the setters.
#
#Create a new function called same_person. same_person
#should take two instances of Person as arguments, and
#returns True if they are the same Person, False otherwise.
#Two instances of Person are considered to be the same if
#and only if they have the same GTID. It does not matter
#if their names or ages differ as long as they have the
#same GTID.
#
#You should not need to modify the Person class.

class Person:
    def __init__(self, name, age, GTID):
        self.set_name(name)
        self.set_age(age)
        self.set_GTID(GTID)

    def set_name(self, name):
        self.name = name

    def set_age(self, age):
        self.age = age

    def set_GTID(self, GTID):
        self.GTID = GTID

    def get_name(self):
        return self.name

    def get_age(self):
       return self.age

    def get_GTID(self):
        return self.GTID

#Add your code below!

#Below are some lines of code that will test your function.
#You can change the value of the variable(s) to test your
#function with different inputs.
#
#If your function works correctly, this will originally
#print: True, then False.
person1 = Person("David Joyner", 30, 901234567)
person2 = Person("D. Joyner", 29, 901234567)
person3 = Person("David Joyner", 30, 903987654)
print(same_person(person1, person2))
print(same_person(person1, person3))

In: Computer Science

Name one macromolecule that you would expect to find in honey bee that functions as storage...

Name one macromolecule that you would expect to find in honey bee that functions as storage for glucose, and explain where you would be most likely to find large amounts of it in the organism. Name one macromolecule that you would expect to find in honey bee that functions to help maintain the cell’s shape, and describe how it does this and where it is found in the cells.

In: Biology

Which of the following circumstances illustrates the aggregate theory of partnership law? Group of answer choices...

Which of the following circumstances illustrates the aggregate theory of partnership law?

Group of answer choices

A lawsuit being required to name the partners individually as defendants

The partnership going through a dissociation upon the death of a partner

The partnership filing for bankruptcy

The partnership being allowed to hold property in its own name

None of the above circumstances illustrates the aggregate theory.

In: Operations Management