Questions
In Java Create a simple GUI that gets the exam score and shows the corresponding letter...

In Java

Create a simple GUI that gets the exam score and shows the corresponding letter grade by clicking on the “Convert Score to Letter Grade” button.

In: Computer Science

You must create two Java files. One is called LastNameFirstNameWeek6Prog.java, and the other is called  Museum.java. Ensure...

You must create two Java files. One is called LastNameFirstNameWeek6Prog.java, and the other is called  Museum.java.

Ensure you include ALL files required to make your program compile and run. I would like to see your .java files only.

5%

Museum.java Class File

1.    Create a new class called Museum that describes a Museum and includes the functionality below

2.    The new class has the following five attributes:
a. officialName – the museum’s given name (i.e.:“ New Orleans Museum of Arts”,etc.), type String
b. specialty – the museum’s type (i.e.:“Art”, “Science”, etc.), type String
c. numberOfBuildings – the number of buildings in the museum, type integer
d. area – the museum’s area in square feet, type double
e. financed - type boolean - true if the museum is financed by patrons, false if not.
Use these names for attributes exactly as given here. All attributes must be private.

3.    Be sure your classes have a good set of accessor and mutator methods. Every member variable must have at least one independent accessor and one independent mutator. (see document on Program help for examples)

Ensure you use the “this” reference from within this class when referring to every instance variable or instance method of the current object.

45%

LastNameFirstNameWeek6Prog.java Class File (Driver Program)

Write a driver program that reads information from the user about 3 museums and use this info to create 3 respective Museum objects. The following information should be read from the user per Museum:
official name
specialty
number of buildings
area in square feet
is the museum financed?

After this, using the information inside the objects the program, the driver program should evaluate and print the following output:

·        The average area of the three Museums

·        The minimum and maximum number of buildings among all the Museums

·        The name of the financed Museum with the most area.

To get the information from the objects, use accessor methods from the Museum class. Do not use local variables in main for these calculations. You may use local variables to read the information from the user, but once this information is set on the Museum objects, you must use the get methods to retrieve the information from the objects themselves.

Also do not use Arrays or any other advanced concept that was not reviewed in the class to solve this assignment. Assignments that use these concepts will only be graded 10% for presentation.

45%

NOTE: Complete your activity and submit it by clicking on "Submit Assignment".

5%

Total Possible Points

100

Example output of your program

Example Run:

Enter the official name for Museum 1: New Orleans Museum of Arts
Enter the specialty for Museum 1: Art
Enter the number of buildings for Museum 1: 3
Enter the area of the Museum 1 in square feet: 5000
Is Museum 1 financed? true or false?: true

Enter the official name for Museum 2: D-Day Museum
Enter the specialty for Museum 2: History
Enter the number of buildings for Museum 2: 2
Enter the area of the Museum 2 in square feet: 3000
Is Museum 2 financed? true or false?: false

Enter the official name for Museum 3: The Louvre
Enter the specialty for Museum 3: Art
Enter the number of buildings for Museum 3: 25
Enter the area of the Museum 3 in square feet: 100000
Is Museum 3 financed? true or false?: true

The museums average area is 36000.0
The museums minimum number of buildings is: 2
The museums maximum number of buildings is: 25
The financed museum with largest area is: The Louvre with 100000.0 square feet

In: Computer Science

what is Q learning ? how it is related to reinforcement learning ? whats the benfit...

what is Q learning ?
how it is related to reinforcement learning ?
whats the benfit of Q learing and why it important ?
provide an example of Q learning using robotics?   

In: Computer Science

Based on the tables below, write SQL command to perform the following tasks for MySql: Create...

  1. Based on the tables below, write SQL command to perform the following tasks for MySql:
  1. Create SALESREP and CUSTOMER tables
  2. Create primary and foreign keys as appropriate. The custNo should use a surrogate key as the primary key with auto-increment
  3. increase the balance of the Gonzales account by $100 to a total of $450?
  4. Find an average customer balance
  5. Display the name of the sales representative and the name of the customer for each customer that has a balance greater than 400

SALESREP

SalesRepNo

RepName

HireDate

654

Jones

01/02/2005

734

Smith

02/03/2007

345

Chen

01/25/2004

434

Johnson

11/23/2004

CUSTOMER

CustNo

CustName

Balance

SalesRepNo

9870

Winston

500

345

8590

Gonzales

350

434

7840

Harris

800

654

4870

Miles

100

345

In: Computer Science

Use Python, please type. A multiple-choice quiz with 5 questions. Each question has 4 possible answers...

Use Python, please type.

A multiple-choice quiz with 5 questions. Each question has 4 possible answers labelled A, B, C and D.   

After displaying the first question and the 4 possible answers, the user is asked to enter their choice. If their choice is correct, add 1 to the score, then display the next question and its 4 possible answers.

At the end of the quiz, display their score out of 5, their score as a percentage, and if they get a percentage score greater than or equal to 50, your program should output "You passed this quiz, well done!", otherwise the output is "You failed this time, better luck next time!"

Also, output the student's letter grade according to this scale:

A+  91-100      C+  65-69
A   86-90       C   60-64
A-  80-85       C-  55-59
B+  77-79       P   50-54
B   73-76       F   Below 50
B-  70-72

1. Which of the following is the name of an intermediate level language?

A: C++

B: Java

C: PHP

D: Assembly

Please enter your answer, A, B, C or D:

Answer: D

2. Which of the following is not an output device?

A: Monitor

B: Printer

C: Projector

D: Mouse

Please enter your answer, A, B, C or D:

Answer: D

3. Which of the following symbol is used for comments in Python?

A: @

B: **

C: #

D: /*

Please enter your answer, A, B, C or D:
Answer: C

4. What is the output of 13 % 3 in python 3?

A: 1

B: 3

C: 4

D: 6

Please enter your answer, A, B, C or D:
Answer: A

5. What is the output of 17//2 in python 3?

A: 7

B: 8

C: 9

D: 9.5

Please enter your answer, A, B, C or D:

Answer: B

In: Computer Science

(BASH) Say I have an array of strings with about 100 numbers ranging in length from...

(BASH) Say I have an array of strings with about 100 numbers ranging in length from 3-6 that represent some sort of ID. Within the array of strings, there are some duplicates numbers. What I am trying to do is represent only the top 12 numbers in the form (ID, count occurence) where its ranked by the count occurrences. So the first number would not be the ID with the most digits but it would be the one with the most occurrences.  Is there a way to do this with AWK , begin? or how could i approach this problem?

In: Computer Science

Draw the NFA for language L2 = { w | w ends in 12}. Alphabet {0,1,2}

Draw the NFA for language L2 = { w | w ends in 12}. Alphabet {0,1,2}

In: Computer Science

What is a database? Why do today’s Internet Web applications and smartphone apps need databases? For...

  1. What is a database? Why do today’s Internet Web applications and smartphone apps need databases?
  2. For the tables given as: MEMBER (MemberNumber, MemberFirstName, MemberLastName, EmailAddress)

And PAYMENT (PaymentNumber, MemberNumber, PaymentDate, PaymentAmount)

what are the primary keys of each table? Do you think that any of these primary keys could be surrogate keys? Are any of these keys composite keys? Explain how the two tables are related. Which table contains the foreign key, and what it is the foreign key?

  1. Define the terms data and information.   Explain how the two terms differ.

In: Computer Science

1. MySQL can enforce referential integrity for a delete operation performed on a parent table record...

1. MySQL can enforce referential integrity for a delete operation performed on a parent table record by ____________________ .

A. returning an error instead of deleting any rows.

B. setting the foreign key values in the related child table rows to null.

C. deleting the related rows in the corresponding child table(s).

D. applying any one of the above, (a, b or c), depending on how the foreign key constraint is defined.

2. Third normal form (3NF) eliminates which of the following issues in a table?

A. Transitive dependencies

B. Functional dependencies

C. Partial dependencies

D. Repeating, or multi-valued columns

3. For a table to be in the second normal form (2NF), each non-primary key column in the table must __________________

A. depend on only one column that is part of the composite primary key of the given table.

B. depend on all columns that make up the composite primary key of the given table.

C. have a unique value.

D. have a non-NULL value.

In: Computer Science

In Perl: Create a dictionary of at least 5 key/value pairs. Add a new key/value pair...

In Perl:

  1. Create a dictionary of at least 5 key/value pairs.
  2. Add a new key/value pair to the dictionary.
  3. Change one of the values through reassignment.
  4. Access at least 3 values using the keys.
  5. Access at least 3 keys using the values.
  6. Delete an element.
  7. Test for key inclusion for 3 elements.
  8. Loop through the dictionary, printing out the key and value on the same line separated by a space.

Key1, value1

Key2, value2

…,     …

(Please if you can, provide screenshots)

Thank YOU!

In: Computer Science

This has to be in java and will be uploaded onto zybooks. Write a Java program...

This has to be in java and will be uploaded onto zybooks.

Write a Java program that asks the user for a date entered as 4 integers: dayNumber monthNumber date year. Where:

dayNumber

An integer from 1-7, where 1 = Sunday, 2 = Monday, ..., 7 = Saturday

monthNumber

An integer from 1-12, where 1 = January, 2 = February, ..., 12 = December

date

An integer from 1-31 representing the date.

year

An integer representing the year.

Your prompt to the user should be:

    Enter 4 integers representing dayNumber monthNumber date year:
  

You program will compute the proper dayName from the specified dayNumber and the proper monthName from the specified monthNumber. Your program will print out the specified date in the following format:

    dayNumber monthNumber date year is dayName monthName date, year
  

Please note your program will have to error check the input as follows:

Please note your program will have to error check the input as follows:

  1. First the dayNumber is checked for being in the range 1..7. If that is not the case, your program should print out the following message and terminate execution:
        Invalid day number: dayNumber, please enter a number from 1..7.
          
  2. Then the monthNumber is checked for being in the range 1..12. If that is not the case, your program should print out the following message and terminate execution:
        Invalid month number: monthNumber, please enter a number from 1..12.
          
  3. Then the date is checked for being in the range 1..31. If that is not the case, your program should print out the following message and terminate execution:
        Invalid date number: date, please enter a number from 1..31.
          
  4. Then the date must be checked for validity. For example, there is no February 30, February 31, April 31, June 31, September 31, November 31. If the date is invalid, your program should print out the following message and terminate execution:
        Invalid date: monthName, does not have date days, please enter a valid date.
          
  5. Lastly, if the monthNumber = 2, and date = 29 you must verify that the year entered is a leap year, which is the only time that February 29 exists. Please see Wikipidia's Page on Leap Year. If the year is not a leap year and the user entered a date = 29, your program should print out the following message and terminate execution:
        Invalid date: year is not a leap year, February does not have date days, please enter a valid date.
          

Please note that your class should be named DateConverter.

In: Computer Science

This is a multiple answer question. Meaning any number of the four could be true. This...

This is a multiple answer question. Meaning any number of the four could be true. This is from an O/S class

We discussed in class the ability to create new processes in a Linux environment by way of the fork() function. What is true about this function?

fork() takes a parameter which is the priority of the process that is going to be created

It spawns a new process that is a child of the calling process. The child process is its own, unique process and shares nothing with the parent. The two processes are seen as equal and have no interaction with each other.

The function has a return value.

-1 if the function failed to create a new process

0 if we are in the child process that was created

a positive integer if we are the in the parent. The positive integer reflects the process ID of the newly created process.

fork() allows you to create handlers for the new process during the creation

In: Computer Science

Identify what is the goal of `Requirement Engineering`. What are some common requirement elicitation activities; which...

  • Identify what is the goal of `Requirement Engineering`.
  • What are some common requirement elicitation activities; which activity do you think is more appropriate to use for your class project and why.
  • Discuss and contrast `User Requirements` vs `System Requirement` and `Functional requirement` vs `Non-functional requirement`; Which type of requirements more important for the success of a software project.
  • Discuss the two main method for capturing and modeling user requirement.
  • What is the purpose of the `User Goal Technique`; what is the purpose of `Event Decomposition Technique`.
  • Which technique would you use for your group project to identify and model user requirements , and why?

In: Computer Science

One of the basic motivations behind the Minimum Spanning Tree Problem is the goal of designing...

One of the basic motivations behind the Minimum Spanning Tree Problem is the goal of designing a spanning network for a set of nodes with minimum total cost. Here we explore another type of objective: designing a spanning network for which the most expensive edge is as cheap as possible.

Specifically, let G = (V, E) be a connected graph with n vertices, m edges, and positive edges costs that are all distinct. Let T = (V, E0 ) be a spanning tree of G; we define the bottleneck edge of T to be the edge of T with the greatest cost.

A spanning tree T of G is a minimum-bottleneck spanning tree if there is no spanning tree T 0 of G with a cheaper bottleneck edge.

(a) Is every minimum-bottleneck tree of G a minimum spanning tree of G? Prove or give a counterexample.

(b) Is every minimum spanning tree of G a minimum-bottleneck tree of G? Prove or give a counterexample.

In: Computer Science

This is a multiple answer question, meaning any of the 4 statements could be true. From...

This is a multiple answer question, meaning any of the 4 statements could be true. From O/S class

A semaphore, in its purest form (like the one we used in the Dining Philosopher's solution), is what

A busy waiting lock.

An atomic integer that has two functions it can use - one that increments it by 1 and one that decrements it by 1.

A Monitor

An atomic integer that can be changed to any value from any other value directly.

In: Computer Science