Java Program Using Eclipse Project

Description

Create a Java Program do to the following. These tasks can all be done in the main() method. For Tasks 1-3, use a variable name of your choosing.

  1. Create a Scanner object for keyboard input.
  2. Create a File Object using the file name “MyGrades.txt”.
  3. Create a PrintWriter Object using the FileObject created from Step 2.
    1. Allow PrintWrite to throw a FileNotFoundException as part of the main() method header.
  4. Create a double variable named myGrade.
  5. Create a do while loop with the following tasks in the loop body.
    1. Prompt for a grade and store the result in myGrade
    2. If myGrade is not equal to -99 – Use PrintWriter to “println” myGrade to disk.
    3. If myGrade == -99 – The loop should exit.
  6. Close the PrintWriter Object.
  7. Create a Scanner Object using the File Object created in Step 2.
  8. Create the double variables totalScore and average. Initialize these variables to zero.
  9. Create the int variable counter and initialize it to zero.
  10. Create a while loop to read each double data item found in the Scanner Object
    1. Increment the counter variable for each loop iteration
    2. Read the file’s double variable into myGrade (As defined in Step 4)
    3. Add myGrade to the totalScore variable.
  11. Calculate the average as totalScore / counter
  12. Display the counter, totalScore and Average.
    1. Use printf and format specifiers to display the double variables in #####.## format.
  13. Close the File Scanner object from Step 7.
  14. Close the Scanner object from Step 1.

UNT Java coding Animal Shelter Software Paper

Description

Welcome back to Java coding with our Mav’s Animal Shelter Software (MASS) project! We’ll wrap up this project over the next two weeks.

In Sprint 1 we created the model – the non-GUI portion. In Sprint 2, we created a very basic GUI with a main window and some JOptionPane dialogs. In Sprint 3, we added the ability to create a new shelter, save it to the current or a newly selected filename, and load it from a selected filename. If you are unhappy with your Sprint 3 code, you may ask me about adopting the suggested solution BUT you will be required to acknowledge this in your Help > About dialog box.

For Sprint 4, we will add 2 key features – the ability to track our beloved clients who adopt our lovable animals, and a generic custom “Add [animal type]” dialog that will ease adding additional animal types to our shelter.

This is a class diagram for P10 / Sprint 4. Look at how much you’ve written and how far you’ve come with Object-Oriented Programming! You are allowed to make modest changes to this diagram for your implementation, but be careful to implement all of the core requirements in the Scrum spreadsheet and the PDF document.

P10_diagram.png

MySQL Essays

Description

Here are two sets of data:

Q1:

Data Set #1PERSONTop5_1Top5_2Top5_3Top5_4Top5_5PhilipSeptemberSuperstitionSuper FreakRock SteadyFlashlightJelloRiotAnarchyLabotomyTV PartyLast CaressRobertBlack DogI Feel FineSatisfactionBack In BlackPurple HazeNoelleWonderwallCreepEverlongScatteredGigantorDebbieSunday GirlCarsChristineTemptationWhip ItFlorianOperatorCinemaTitaniumFirestarterTsunamiPatsyAfter MidnightWalk The LineJoleneBreatheFancy

Data Set #2PERSONTop5_1Top5_2Top5_3Top5_4Top5_5JohhnyBlitzkrieg BopRise AbovePunk Rock GirlInstitutionalizedBasket CaseRobertBlack DogI Feel FineSatisfactionBack In BlackPurple HazePhilipSeptemberSuperstitionSuper FreakRock SteadyFlashlightNoelleWonderwallCreepEverlongScatteredGigantorSiouxsieKiss ThemTake On MeRock LobsterLove My WayTainted LovePatsyAfter MidnightWalk The LineJoleneBreatheFancyJelloRiotAnarchyLabotomyTV PartyLast Caress

Perform the following set operations using the above data sets:

1. Intersection of Data Set #1 and Data Set #2

2. Difference (Data Set #2 minus Data Set #1)

3. Union of Data Set #1 and Data Set #2

Q2:SalesOrdersExample database
Display the list of products by the order they are included in along with the category they belong to and their retail price.
Order the list by the category they are in along with the retail price in descending order.
(Hint: The solution requires a JOIN of four tables)
Show your SQL code below:

Q3:

SalesOrdersExample database

List employees and the customers for whom they booked an order
(Hint: The solution requires a JOIN of more than two tables)
Show your SQL code below:

Q4:

EntertainmentAgencyExample database
Find the agents and entertainers who live in the same postal code
(Hint: The solution requires a JOIN on matching values)
Show your SQL code below:

Q5:

RecipesExample database
List all recipes that contain a dairy ingredient
(Hint: The solution requires a JOIN of four tables)
Show your SQL code below:

UCM Python Program Project

Description

Instructions:

You need to write one Python program per question. Each program should be written in IDLE or be IDLE compatible.

Name the program after the title of the problem.

The first three lines of each program should be a comment to include your name, date and name of the program.

Create a new folder called ch2 HW and place all your programs inside. Then zip (compress) the folder and submit the single ch2 HW zipped folder.

1.Pennies for Pay

Write a program that calculates the amount of money a person would earn over a period of time if his or her salary is one penny the first day, two pennies the second day, and continues to double each day. The program should ask the user for the number of days. Display a table showing what the salary was for each day, then show the total pay at the end of the period. The output should be displayed in a dollar amount, not the number of pennies.

2.Ocean Levels

Assuming the ocean’s level is currently rising at about 1.6 millimeters per year, create an application that displays the number of millimeters that the ocean will have risen each year for the next 25 years.

Basic Python Questions

Description

1-Write a Python program to check if a string ends with a number. If it does, print True. Print False otherwise.

input: 'abcdef'

output: False

input: 'abcdef6'

output: True

input: 'sdfljsa2e923'

output: True

input: 'asdak39239d'

output: False

2-Write a Python program to check that a string contains only alphabets and numbers (a-z, A-Z and 0-9).

The program should print True if the string only contains these characters and False if it contains any other characters.

input: "ABCDEFabcdef123450"

output: True

input: "*&%@#!}{"

output: False

input: "asjgsdi043^32"

output: False

3-Write a program that takes a filename as input from the user and looks for lines of the form:

New Revision: 39772

Extract the number from each of the lines using a regular expression. Compute the average of the numbers and print out the average as an integer.

Enter filename: mbox.txt

38549

Enter filename: mbox-short.txt

39756

Write a program to ask the user to enter (i) a filename and (ii) regular expression. The program should count the number of lines that matched the regular expression.

Enter a filename: "mbox.txt"

Enter a regular expression: ^Author

Expected output: mbox.txt had 1798 lines that matched ^Author

Enter a filename: "mbox.txt"

Enter a regular expression: ^X-

Expected output: mbox.txt had 14368 lines that matched ^X-

Enter a filename: "mbox.txt"

Enter a regular expression: java$

Expected output: mbox.txt had 4218 lines that matched java$ 

Build Layered Visualizations Data Analysis

Description

  1. get the structure of the gss_sm dataframe. What is the data type of race, sex, region and income? What do the levels refer to? 
  2. create a graph that shows a count of religious preferences grouped by region
  3. turn the region counts in percentages
  4. use dodge2() to put the religious affiliations side by side within regions
  5. show the religious preferences by region, faceted version with the coordinate system swapped
  6. using pipes show a 10 random instances of the first six columns in the organdata data set
  7. create a scatterplot of donors vs. year
  8. create a faceted set of line chart graphs showing donors for year for different countries
  9. create a boxplot of the data with coordinates swapped (because the mean is calculated in every boxplot and because R throws an error when trying to calculate means when there is missing data, add the na.rm = TRUE parameter to remove the NA’s).  
  10. Replace the boxplot with points
  11. jitter the points
  12. reduce the amount of jitter
  13. using organdata, create a table of summary statistics by country called by_country (show the mean of donors, gdp, health, roads, cerebvas, and the standard deviation of donors)
  14. what is the cerebvas column referring to?
  15. What conclusions can you draw from the previous plot?

AIU Online Sql Table Statements Paper

Description

Complete the following exercise:

  • Use the cis305 database you previously created.
  • Use T-SQL to alter the booth and machine tables. Add a foreign key constraint to each table for the product_id referencing product_id in the product table.
  • Use T-SQL to alter the booth and machine tables. Add a check constraint to each table for the booth_price in the booth table and the machine_price in the machine table. The check criteria should be booth_price > 0.00 and machine_price > 0.00 respectively.
  • Now, right click on the check constraint for booth price under constraints in the booth table. Select Script To…Clipboard. You may now perform a paste (from the clipboard) into your submission document as verification of both the foreign key constraint add and the check constraint add.
  • Repeat the previous step for the check constraint in the machine table.
  • When you have successfully added the constraints to the table, ensure that you have copied and pasted all of the T-SQL statements and verification results into your assignment submission.

Once you have completed your assignment, copy and paste the script into a Word document and submit it.

C++ Code Text Processing and Pattern Matching Project

Description

For this assignment, you will be implementing the brute force, Knuth-Morris-Pratt, and Boyer-Moore-Horspoole pattern matching algorithms. Each algorithm should return an integer representing the 0-indexed position where a match is found, and -1 if the pattern is not in the string.

The starter code is provided. You have the option of completing the project in C++ . Read the following submission guidelines carefully to ensure that the autograder can properly evaluate your work.

When submitting, zip the exact files listed below for the language you use using the same directory structure,

C++:

In the C++ directory, you will find the following files.

main.cpp *
project2.h *
language.txt *
Makefile *
bmh.cpp
brute.cpp
kmp.cpp

Do not edit the files marked with an asterisk (*), as this could interfere with the autograder. Complete the three files “bmh.cpp”, “brute.cpp”, “kmp.cpp” with the corresponding pattern matching algorithms. To test your code locally, you can use make to build and compile the project, which will generate “project2”. The program will take 3 command line parameters and be run as

$ ./project2 [text string] [pattern string] [algorithm id]

Algorithm id will be one of

  • “bmh”: Boyer-Moore-Harspoole
  • “kmp”: Knuth-Morris-Pratt
  • “brute”: Brute force

University of Maryland Global Campus GUI & Polymorphism Project

Description

Before attempting this project, be sure you have completed all of the reading assignments, nongraded exercises, discussions, and assignments to date.Design and implement Java program as follows:1) Implement converter class hierarchy as follows:a. Converter class which includes:? Private attribute for input of data type double? Default constructor with no parameter which sets input to Double.NaN? Overloaded constructor with input for parameter? Get and set methods for input attribute? Method convert() which returns input valueb. TemperatureConverter class which is a child of Converter and includes:? Constructors which call parent constructors? Overridden convert() method to convert input (Fahrenheit temperature) toCelsius and returns the value. If the instance has no input value, it shouldreturn Double.NaN? Use the following formula for conversion: C = ((F-32)*5)/9c. DistanceConverter class which is a child of Converter and includes:? Constructors which call parent constructors? Overridden convert() method to convert input (distance in miles) to distancein kilometers and returns the value. If the instance has no input value, itshould return Double.NaNd. Use the following formula for conversion: KM = M * 1.609

Abraham Baldwin Agricultural College Potentiometer with Motor Worksheet

Description

PLEASE USE LIBARY GIVEN (motor.py , ledbar.py ,adc0832.py) I DO NOT accept any library different

2. The DC motor controller should have the following functionality:

a. The push button must control forward and reverse directions of the motor. This is a simple state machine: a push of the button will change the motor direction from forward to reverse. The next push of the button will change the motor direction from reverse to forward.

b. The potentiometer must control the speed of the motor such that with the potentiometer turned completely counterclockwise the motor is off and when turned completely clockwise the motor is operating at full speed.

c. The LED bar graph must show, qualitatively, the speed of the motor. When the motor is completely off, no LEDs are lit. When the motor is at full speed, all LEDs are lit. There shall be a linear relationship between the number of LED’s lit and the RPM of the DC motor. This relationship should hold whether the motor is in reverse or in forward.