Questions
In Java: 1) Create a new eclipse project. 2) Create a basic SWING window 3) Create...

In Java:

1) Create a new eclipse project.

2) Create a basic SWING window

3) Create a Label Called Name

4) Create a Text Field for entering the name

5) Create a Text Field for entering and email

5) Create a text area to push the results to

6) Create two buttons, one that says submit and the other that says clear.

7) When the user enters their name and email, they should press submit and see the Text area populate with the data they submitted.

8) When the user presses clear it should clear any text from all fields.

In: Computer Science

Consider Ace Rent-A-Car, a nationwide automobile rental company. For each car that the company owns, Ace...

Consider Ace Rent-A-Car, a nationwide automobile rental company. For each car that the company owns, Ace records its unique vehicle identification number (VIN), its “make” (manufacturer), model, year of manufacture, and the manufacturer’s factory in which it was made. Each factory is identified by the combination of its company name (i.e. manufacturer name) and the city in which it is located. We also know its size and the year it was built. Each manufacturer is identified by its unique name, plus its headquarters city and the name of its president. Customers are identified by a unique customer number, plus Ace wants to store each customer’s name, address, and telephone number. Each Ace rental location has a unique rental location number, address, and telephone number. Each Ace rental location is assigned to an Ace region, which has a unique region name, a manager, and the location of the main regional office.

Ace wants to develop a data warehouse to store its historical rental data. For each rental, Ace wants to record which customer rented which car from which rental location and when the rental began and when it ended. Ace also wants to record the mileage on the car when the rental began, the mileage when it was returned, whether or not the customer bought the insurance that Ace offered, and the total cost of the rental.

Given this scenario, develop a star schema, which may be a snowflake schema, for Ace’s data warehouse.

In: Computer Science

Consider Ace Rent-A-Car, a nationwide automobile rental company. For each car that the company owns, Ace...

Consider Ace Rent-A-Car, a nationwide automobile rental company. For each car that the company owns, Ace records its unique vehicle identification number (VIN), its “make” (manufacturer), model, year of manufacture, and the manufacturer’s factory in which it was made. Each factory is identified by the combination of its company name (i.e. manufacturer name) and the city in which it is located. We also know its size and the year it was built. Each manufacturer is identified by its unique name, plus its headquarters city and the name of its president. Customers are identified by a unique customer number, plus Ace wants to store each customer’s name, address, and telephone number. Each Ace rental location has a unique rental location number, address, and telephone number. Each Ace rental location is assigned to an Ace region, which has a unique region name, a manager, and the location of the main regional office. Ace wants to develop a data warehouse to store its historical rental data. For each rental, Ace wants to record which customer rented which car from which rental location and when the rental began and when it ended. Ace also wants to record the mileage on the car when the rental began, the mileage when it was returned, whether or not the customer bought the insurance that Ace offered, and the total cost of the rental.

Given this scenario, develop a star schema, which may be a snowflake schema, for Ace’s data warehouse.

In: Computer Science

1.            Unknown bacteria #1 Gram-positive cocci Smooth, yellow colonies Growth, but not clearing or change on...

1.            Unknown bacteria #1

Gram-positive cocci

Smooth, yellow colonies

Growth, but not clearing or change on blood agar

Positive for urease production

Positive for gelatinase production

Bubbling produced when exposed to H2O2

Name: ___________________________________

2.            Unknown bacteria #2

Gram-positive cocci (mainly diplococci and chains)

Encapsulated

Produces green halo around growth on blood agar

No color change with oxidase reagent

No color change in urea broth

Produces a yellow color in glucose, lactose, and sucrose phenol red tubes

Name: ___________________________________

3.            Unknown bacteria #3

              

Gram-positive cocci

Encapsulated

No bubbling upon exposure to H2O2

VP negative

Produces a clearing around growth on blood agar

Facultative anaerobe

              

Name: __________________________________

   

4.          Unknown bacteria #4

              

Gram-negative bacillus

Abundant white growth

Encapsulated

Positive for nitrate reduction

Simmons citrate agar turns blue

Bubbling produced when exposed to H2O2

Name:__________________________________

5.            Unknown bacteria #5

Gram-negative bacillus

Creamy, mucoid, round colonies

Produces a green halo around growth on blood agar

Negative for all tests using SIM agar

No color change in nitrate test after adding reagents A and B plus zinc

TSI slant turns completely yellow

Name: ___________________________________

6.            Unknown bacteria #6

              

Gram-positive bacillus

Abundant white, waxy growth

Clearing around growth on blood agar

Ferments mannitol with acid production

Green oval structures visible using endospore stain

VP negative

Name: __________________________________

In: Nursing

Create a report that lists all the customers in alphabetical order by last name. The report...

Create a report that lists all the customers in alphabetical order by last name. The report should include first name, last name, and email address of all customers. This report involves getting data from one table.

The three items should be lined up in columns. Use one of the formatting functions available through Python (the % operator or the format function). Don’t use tabs to line up columns, this does not reliably work and is inflexible.1 Even though we won’t need formatting to line up columns in web pages, there are other aspects of formatting that we may still need. It is best to become familiar with one method now.

not sure how to print out the list alphabetically by last name

pizza_service.py

import sqlite3

class PizzaServices:

    def __init__(self):
        self.connection = sqlite3.connect("pizza-190807A.sqlite")

    def __enter__(self):
        return self

    def __exit__(self, exe_type, exc_val, exl_tb):
        crs = self.connection.cursor()

    def do_query(self, query, parameters=None):
        crs = self.connection.cursor()
        if parameters:
            crs.execute(query, parameters)
        else:
            crs.execute(query)

        return crs.fetchall()

    def customer(self):
        return self.do_query("select * from customer")

part1.py

from pizza_services import PizzaServices

with PizzaServices() as cs:
    cust = cs.customer()
    cmd1 = "select FirstName, LastName, Email from customer"
    resultSet= cs.do_query(cmd1)

templateH = "{:15}  {:15}  {:15}"
line = templateH.format("Last Name", "First Name", "email")
print(line)

for customer_row in resultSet:
    print('{:15} {:15} {:15}'.format(customer_row[0], customer_row[1], customer_row[2]))

In: Computer Science

Build and present a menu to a user like the following and enclose it into a...

  1. Build and present a menu to a user like the following and enclose it into a loop that ends when the Quit option is chosen. Scan the user's selection into an integer variable.
    1.  Enter user name.
    2.  Enter test scores.
    3.  Display average.
    4.  Display summary.
    5.  Quit.
    Selection:
  2. If the user selects Option #1, scan the user's name, and store it to a char array. Assume the user's name is under 20 characters.
  3. If the user selects Option #2, use a for-loop to scan 3 exam scores into a float array. Calculate the average and store the result in a float variable. Assume all scores are out of 100 points.  
  4. If the user selects Option #3, Display the average of the test scores. If the user has not yet entered test scores, display an error message similar to: "Please use the menu to enter test scores first"

    Hint: Use boolean values to keep track of the options that have been selected.
  5. If the user selects Option #4, display the average, the letter grade of the average, and the user's name. If the user has not yet entered their name or test scores, display an error message.

    Example: "Hello Charley, your test scores were 80, 90, and 100. Your average is 90.0 with letter grade: A."
    Example: "Please use the menu to enter your name first."

    Example: "Please use the menu to enter your test scores first."
  6. When the Quit option is chosen, end the primary loop that contains the menu.

c++ please

for while do while


could you write a c program please?

In: Computer Science

Linux Question: you will practice on creating and editing a text file by VI. How to:...

Linux Question: you will practice on creating and editing a text file by VI.

How to:

  1. Install JDK 1.8 by the following command:

$ sudo yum    –y    install    java-1.8.0-openjdk-devel.x86_64

  1. Use VI to create a file “YourFirstNameHomework.java” (e.g., “MollyHomework.java”) and add the following contents into it. (grading details: file name format:10 pts, a screenshot of the file content in the VI environment: 10pts, paragraphs: 10pts, empty lines and indentations: 10, text: 10pts)

Here's the code

import java.util.Scanner; // Import the Scanner class

class MollyHomework {

public static void main(String[] args) {

    Scanner myObj = new Scanner(System.in); // Create a Scanner object

    System.out.println("Enter your first name");

    String fName = myObj.nextLine(); // Read user input of the first name

    System.out.println("Enter your last name");

    String lName = myObj.nextLine(); // Read user input of the last name

    System.out.println("Hello " + fName + “ “ + lName); // Output user input   }

}

3.To compile the above java code, run the following command (you need to use your java file name):

$ javac MollyHomework.java

4. To execute the java program, run the following command

$ java MollyHomework

Question:

Describe how you created above file and its contents in VI.

  1. Bash/VI commands: 20pts;
  2. Non-brute-force solution: 10pts).

Note: Brute-force solution means that entering characters one by one.

*Show how the code looks or how you got it to work in your linux machine

In: Computer Science

Code needed in Java The purpose of the application is to generate some reports about the...

Code needed in Java
The purpose of the application is to generate some reports about the people of the university. So a user of the application should be able to view information about the people in the university and generate summaries. As in implementation these are separated into two major categories, employee and students, we will be implementing these classes.  


The system should have three classes: Person, Employee and Student.Employees and students are subclasses of persons and therefore, they inherit some fields and methods from the superclass Person. What Employee class has as an extra is a field called job which is a String value that indicates the position of the employee at the university. The possible values are ‘Faculty’ and ‘Staff’ and the rest of the input should be rejected. Another significant field is UIN (you may assume it to be an integer).Students also have a similar structure. A field called level, gives information regarding the student. Possible values are ‘Undergraduate’ and ‘Graduate’ and the rest of the input should be rejected. Also A number should be implemented (you may assume A number to be a string).  
Once you create these classes write your test class with main method.  


The output of such an application would look like:  

Person’s first name is Triss, last name is Merigold. She is 25 years old.
Person’s first name is Sigismund, last name is Dijkstra. He is 37 years old. His UIN is 793942 and serves the university as a staff.
Person’s first name is Keira, last name is Metz. She is 19 years old. Her A-number is A021318 and she is an undergraduate student

In: Computer Science

This should be written in C++. Create a class with the name "Student". private data members...

This should be written in C++.

Create a class with the name "Student".

private data members of the Student class should include:

int - rollno (roll number or id number of student)

string - name (name of student)

int - alg, datastruct, architect, proglang (hold scores out of 100 for these 4 classes)

float - per (average score of 4 classes above)

char - grade (letter grade based on per.. example 90 is an A)

public member functions of the Student class should include:

getdata() (function to accept data from user

showdata() (function to show data on screen

Create a constructor that initializes all int to 0, float to 0.0, char to ' ', name = "NoName".

Prompt the user for a valid class size.

Prompt the user for student data.

Store students in a vector.

Display student data including students average score and letter grade.

The following is an example:

Enter size of class: 0
Invalid class size

Enter size of class: 1

Enter the roll number of student: 45
Enter The Name of student: Trish Duce
Enter the grade in Algorithms out of 100: 88
Enter the grade in Data Structures out of 100: 94
Enter the grade in Architecture out of 100: 98
Enter the grade in Programming Languages out of 100: 92

Roll number of student: 45
Name of student: Trish Duce
Grade in Algorithms: 88
Grade in Data Structures: 94
Grade in Architecture: 98
Grade in Programming Languages: 92
Percentage of student is: 93
Grade of student is: A

In: Computer Science

Q.1 Write a python program that will take in basic information from a student, including student...

Q.1 Write a python program that will take in basic information from a student, including student name, degree name, number of credits taken so far, and the total number of credits required in the degree program. The program will then calculate how many credits are needed to graduate. Display should include the student name, the degree name, and credits left to graduate.

Write two print statements in this program. In the first one, use the .format method with pre-specified order of the displayed outputs.

In the second print, using different % operators to display the output. Make sure to display the output in an aligned format (look into a sample of the output below..).

Student name: xyz xyz

Degree name: comp. engineering

Credit taken so far:                                       13

Total number of credits required: 33

Number of credits needed to graduate: 20

Q.2  Write a python program that will take in the number of call minutes used. Your program will calculate the amount of charge for the first 200 minutes with a rate of $0.25; the remaining minutes with a rate of $0.35. The tax amount is calculated as 13% on top of the total. The customer could have a credit that also has to be considered in the calculation process. Finally, the program displays all these information. Below is a sample run:

Customer account number:                                        12345

Minutes used:                                                                (you provide)

Charge for the first 200 minutes@ 0.25:                (you provide)

Charge for the remaining minutes@ 0.35:             (you provide)     

Taxes:                                                                              (you provide)

Credits:                                                                            (you provide)

Total bill:                                                                         (you provide)

please provide .py program file screenshot and output.

In: Computer Science