Programming Homework Help

ITS 410 Colorado University Global Database Management SQL Query Report

 

Using the “classicmodelsdatabase you installed in Module 1, list the customers who have not placed any orders. Sort your results by customer number.

  • Modify your query to list customers who have placed fewer than five orders.
  • Submit your query and query results in a Word file.

Programming Homework Help

Dallas College Create a Java Code Computer Programming Task

 

Problem Description:

RedEx Corp., a major shipping company has hired you develop a program that computes the shipping cost of packages based on the weight of the package. The company uses the following weight-based rule to compute the shipping cost:

3.75 + ????h? ? 1.25, ?? 0 < ????h? ? 15 ?????h?????? = – 8.50 + (????h? ? 7) ? 1.75, ?? 15 < ????h? ? 25

10.75 + (????h? ? 12) ? 2.25, ?? 25 < ????h? ? 35

Write a program that reads the full name of the user. Next, the program prompts the user to enter the weight of the package and then using the above rule, computes the shipping cost. If the weight of the package is greater than 35, the program should display a message informing the user that the package cannot be shipped. If the weight of the package is 0 or below, the program should display a message informing the user that the weight is not valid.

Sample Runs:

Enter your full name: Billie Eilish
Enter package weight: 8.8
Billie, the total cost for your package is 14.75

Enter your full name: Daenerys Targaryen
Enter package weight: 19.2
Daenerys, the total cost for your package is 29.85

Enter your full name: Bilbo Baggins Enter package weight: 45.2
Bilbo, the package cannot be shipped.

Hints:

Usetheappropriatedatatypetoreadthefullnameandpackageweightenteredby the user.

Extractthefirstnameusingtheappropriatemethodsfromthefullname.

Use the appropriate logical operator to evaluate the range in which the packageweight falls.

Makeuseofthemulti-wayif-elsestatementstodisplaytheappropriateoutput.

Deliverables:

Your .java file including:

1. A sample run with username as “Albus Dumbledore” and package weight as “23.8”. Include this sample run as a comment on top of your Java code.

Programming Homework Help

Saint Mary’s University Create the Game About the Battleship Java Coding Task

 

I’m working on a java report and need guidance to help me understand better.

This is the java homework that u will create the game about the Battleship, u write this project by Array, 2d array..

Programming Homework Help

ENGR 120 Grossmont College Iterative Estimation Matlab Lab Report

 

Lab 9 – Iterative Estimation

Introduction

Function and aesthetics are often governed by mathematics. Beautiful examples of this can be found in nature, from the growth pattern of plants to the feature placement on the human face. Read a low-tech blog post (Links to an external site.) about how Aston Martin uses the golden ratio in car design. The Golden Ratio, phi, is defined by:

φ=1+52φ=1+52

Equation 1. Exact Phi

One way that phi can be approximated is by taking the limit as n goes to infinity of a term in the Fibonacci sequence divided by it’s proceeding term:

φ=limnfnfn1φ=limnfnfn1

Equation 2. Estimated Phi

Be sure to read the module page on Printing to Log Files because it contains code on how to compute terms of the Fibonacci sequence. Similarly, e can be approximated by:

e=limn(1+1n)ne=limn(1+1n)n

Equation 3. Estimated E

We will use our new input and output tools to create an iterative estimation program for both e and phi and compare our estimates to the true values.

Procedure

As usual, create a script, include a comment at the top explaining the purpose of the script, your name, and the date it was created.

1. Use the menu function to ask the user if they would like to estimate e or phi. Use the input function to prompt the user to select a desired accuracy (tolerance) between .1 to .01. Include error checking to ensure the user input corresponds to your desired format. See the page on Input Error Checking for an example of how to do this. Use a conditional or switch statement to select between the two estimation functions that you will write (see below).

2. To write your function to estimate e, create a function that accepts as input the user’s desired tolerance and outputs the estimate of e and the number of iterations required to meet the desired accuracy. Your function header will look like: function [myE, numIters] = estE(tol). Use the limit equation above for large n and compare the result to MATLAB’s built-in value for e. While the absolute value of the difference between e and your estimated e is greater than the tolerance, continue looping and increasing n.

3. Use a similar method to estimate phi. Since MATLAB has no built-in constant for phi, create your own true phi using Equation 1 above.

4. Create a text file to keep track of your progress at each iteration with the fprintf command (you may have to print every 100 iterations or even 1000 iterations if it takes a long time to reach the desired accuracy). Report the iteration, the estimated value and the absolute value of the difference between the estimated and true values at each step. Here’s a sample output:

After 133 iterations, estimated e is 2.708133 and error is 0.010149.
After 134 iterations, estimated e is 2.708208 and error is 0.010074.
After 135 iterations, estimated e is 2.708282 and error is 0.010000.

Turn-in Instructions

You will need to submit .m files for each function you define, main.m, estE.m and estPhi.m as well as your text log file. Each .m file should include your name and function description in comments. Upload your files via Canvas. Let me know if you have any questions!

Programming Homework Help

Marymount University Use of Automatic Methods for Reversing the String Program

 

Instruction are in the code what you should do

public class Palindrome {

/*

* Implement this method and return true if the word is the same

* forward and backwards

* Do not use automatic methods for reversing the string

*/

private boolean isPalindrome(String word) {

return false;

}

/*

* Open up the file.

* Break into words

* print out all Palindromes

*/

private void findAllPalindromes(String fileName) {

}

public Palindrome() {

//run some tests

if (isPalindrome(“racecar”)) {

System.out.print(“pass”);

}

else {

System.out.print(“Fail”);

}

if (isPalindrome(“mom”)) {

System.out.print(“pass”);

}

else {

System.out.print(“Fail”);

}

if (isPalindrome(“noon”)) {

System.out.print(“pass”);

}

else {

System.out.print(“Fail”);

}

}

public static void main(String[] args) {

new Palindrome();

}

}

Programming Homework Help

Marymount University Creation of a Hash Table on Java Program

 

For this Assignment you will write your own HashTable in Python or Java. Do not use any built in Hashing Structures (dictionaries, Maps,Etc). For Simplicity sake make the underlying structure a basic array or list.

You will :

  • Read in the file below
  • https://github.com/first20hours/google-10000-engli…
  • Store each word in your HashTable for easy lookup
    • You will have to build a hash() function to give an integer value for your String
    • Store the String in that index
    • If a Collision, use a collision mitigation strategy
  • Calculate and report the percentage of collisions in your structure
  • Your HashTable may not be more than 20% larger than the # of total words

Programming Homework Help

Marymount University Basic Node Definition in a Python Program Project

 

Instruction on the codes see codes below to know what to do

#Basic Node definition. Each Node contains a Value, a left child, and a right child

class Node:

def __init__(self,value):

self.left = None

self.right = None

self.val = value

#insert Value into the appropiate spot in the tree

def insert(root, node):

if root is None:

root=node

elif root.val < node.val:

if root.right is None:

root.right = node

else:

insert(root.right, node)

else:

if root.left is None:

root.left = node

else:

insert(root.left, node)

def inorder_traversal(root):

#finish code to print all values with an inorder traversal

if root is not None:

print(root.val)

bst = Node(5)

insert(bst,Node(2))

insert(bst,Node(7))

insert(bst,Node(10))

insert(bst,Node(4))

insert(bst,Node(1))

inorder_traversal(bst)

Programming Homework Help

Marymount University Use of the Queue Functions in a Python Program Project

 

Instruction are on the code for what you should do see the codes below

class Stack:

data=[]

def is_empty(self):

return self.data==[]

def push(self, node):

self.data.append(node)

def pop(self):

if not self.is_empty():

value=self.data[-1]

del self.data[-1]

return value

else:

print(“Nothing to pop”)

def print_stack(self):

print(‘not implemented yet’)

print(‘print the stack vertical so that the top is printed first’)

fruit = Stack()

fruit.pop()

fruit.push(“Apple”)

fruit.push(“Banana”)

fruit.pop()

fruit.push(“Canned Yams”)

fruit.push(“Durian”)

fruit.print_stack()

fruit.pop()

fruit.pop()

fruit.print_stack()

“””

Finish the Stack Class so that the print_stack method prints the stack vertically so that for instance [‘a’,’b’,’c’] is printed

a

b

c

“””

class Queue:

data=[]

“””

Write Queue functions for enqueue, dequeue, is_empty and print_queue

“””

q=Queue()

q.enqueue(‘Job 1’)

q.enqueue(‘Job 2’)

q.enqueue(‘Job 3’)

q.print_queue()

q.dequeue()

q.dequeue()

q.print_queue()