Programming Homework Help

Programming Homework Help. Barclay College Python Program Project

 

I’m working on a Python exercise and need support.

1/Using the following class files (in the Files section)

main.py

car.py

battery.py

electricCar.py

Create a general car (you can decide on the make and model), then create an electric car with a particular battery size.  Display all available information for both cars.

2/ Install PyQt5 (including the designer and Tools) into Python.  

Design a simple phone layout in designer. This must include at least:

2 labels

2 Buttons

1 Textbox

Any other widgets you wish.

Save the code in a .ui file.

Programming Homework Help

Programming Homework Help

Programming Homework Help. javascript

 

JavaScript foundations: Object shorthand & spread

Instructions

To complete this Practice problem, you will update the existing functions in src/solution.js to use new syntax you have learned. Use object shorthand and the spread operator whenever possible.

Note: The second function makes use of the .concat() method. While you will be replacing it, you can learn more about it at the link below.

/*

Modify each function below to continue working with the suggested syntax.

When a function’s parameters reference `product`, it is referring to an object. Each object has the following shape:

{

name: “Washed Black Denim Overalls”,

priceInCents: 12000,

availableSizes: [ 28, 30, 32, 36 ]

}

*/

// `salesTax` is a decimal number, like 0.065

function createSalesProduct(product, salesTax) {

return {

name: product.name,

availableSizes: product.availableSizes,

salesTax: 0.065,

priceInCents: product.priceInCents * (1 + salesTax),

};

}

function joinSizes(productA, productB) {

const result = …productA.availableSizes, …productB.availableSizes;

}

return result;

}

JavaScript foundations: Default parameters

Instructions

To complete this Practice problem, you will do the following:

  • Update each function to use argument defaults. You will also need to destructure objects.

getPriceInDollars()

You will need to update the function so that it works in the following ways:

// Typical use
getPriceInDollars({
  name: "Slip Dress",
  priceInCents: 8800,
  availableSizes: [0, 2, 4, 6, 10, 12, 16],
}); //> $88.00

// Missing `priceInCents` key
getPriceInDollars({
  name: "Slip Dress",
  availableSizes: [0, 2, 4, 6, 10, 12, 16],
}); //> $0.00

// No arguments
getPriceInDollars(); //> $0.00

checkIfSizeIsAvailable()

You will need to update the function so that it works in the following ways:

// Typical use
checkIfSizeIsAvailable(
  {
    name: "Slip Dress",
    priceInCents: 8800,
    availableSizes: [0, 2, 4, 6, 10, 12, 16],
  },
  10
); //> true

// Missing `availableSizes` key
checkIfSizeIsAvailable(
  {
    name: "Slip Dress",
    priceInCents: 8800,
  },
  10
); //> false

// Missing entire product
checkIfSizeIsAvailable(undefined, 10); //> false

// No arguments
checkIfSizeIsAvailable(); //> false
 /*

The following functions have various syntax errors in them. Fix the bugs to get the tests to pass!

When any of the following function’s parameters reference `product`, they are referencing an object with the following shape:

{

name: “Slip Dress”,

priceInCents: 8800,

availableSizes: [ 0, 2, 4, 6, 10, 12, 16 ]

}

*/

function getPriceInDollars(product) {

return “$” + (product.priceInCents / 100).toFixed(2);

}

// `size` is a number between 0 and 16.

function checkIfSizeIsAvailable(product, size) {

let sizes = product.availableSizes;

for (let i = 0; i < sizes.length; i++) {

if (sizes[i] === size) {

return true;

}

}

return false;

}

Programming Homework Help

Programming Homework Help

Programming Homework Help. Ashworth College Week 3 Object Compare and Contrast Discussion

 

Threaded Discussion Instructions

Review the threaded discussion question posted by the course faculty. You are required to submit at least two (2) responses to this question by 11:59pm EST on Sunday. The first response should be to the faculty; the second response can be directed either to the faculty or to other students in the class. Your responses should be substantive, and reflect analytical and critical thinking skills, as well as, a thorough understanding of your reading assignment. A typical response should consist of 100-150 words in a single-spaced format. Refer to the TDQ Rubric below for more guidance on how to respond.

Teacher vs. Student: Object compare and contrast

Your text (Section 1.6, Object Technology) uses a car as an example of an object, and walks you through many object oriented terms as they apply to “car”. You have just been told you will be helping design an application to manage the personnel in a college, and that you will be helping with the object called “Person”. You will be developing other “objects” like Teacher, Student, Administrator, Staff and several others.

Organize the terminology mentioned in the section above, and report to your classmates how you will create the objects Teacher and Student. Use as many of the Section 1.6 terms as you can to describe how your objects will function. Compare and contrast the objects Teacher and Student.

Programming Homework Help

Programming Homework Help

Programming Homework Help. Ashworth College Week 1 Object Oriented Programming Discussion

 

Threaded Discussion Instructions

Review the threaded discussion question posted by the course faculty. You are required to submit at least two (2) responses to this question by 11:59pm EST on Sunday. The first response should be to the faculty; the second response can be directed either to the faculty or to other students in the class. Your responses should be substantive, and reflect analytical and critical thinking skills, as well as, a thorough understanding of your reading assignment. A typical response should consist of 100-150 words in a single-spaced format. Refer to the TDQ Rubric below for more guidance on how to respond.

Two Text Boxes and a Submit Button: How do OOP terms relate to them?

On a web site, you are looking at a small form that has the following:

  • A text box with the label “Name:” to the left,
  • A text box with the label “Email Address:” to the left, and underneath both,
  • A button that says “Submit”.

Analyze what you see, and report to your classmates how the things you are looking at fit into the Object Oriented Programming (OOP) world. As best you can use five or more of the terms below, and relate them to the three things described above:

Class, object, instance, instantiate, interface, abstract class, Class Name, Class Attributes, Class Operations, methods, attributes.

Programming Homework Help

Programming Homework Help

Programming Homework Help. WU Demonstrate the Observer Pattern in Java Question

 

I need support with this Java question so I can learn better.

I am trying to learn how to create an observable or observer class in java.

The use case is that the user is developing a plan and I am trying to set it up so that there is a notification if a plan is created.

Programming Homework Help

Programming Homework Help

Programming Homework Help. java coding help

 

In this lab you will experiment with sorting array of integers problem. You will implement different sorts we covered in class and labs and write a test problem to compare running time on different input sizes. Separated into 6 parts, but you will submit only one program and report. See question 6.

1. (3 points) Implement merge sort.

2. (3 points) Implement selection sort.

3. (3 points) Implement heap sort using java.util.* PriorityQueue structure.

4. (3 points) Implement binary search tree sort using our binary search tree structure from the lab.

5. (2 points) Write a method to create a random array of integers of given size n. The array values should be between -1000 and 1000 inclusive. Use random!

6. (5 points) Create a program that includes all the methods above. The program first generates (using method from 5) arrays of size 100, 1000, 10000, 100000, 1000000, 1000000000. Than calls each of the sorts on each of the arrays and reports running time of the execution (prints on console). Use System.currentTimeMillis(); to time the execution. Submit both program and report (how long each sort takes on every input).

public class testSort{

public static void main(String[] args){

}

public static void mergeSort(int[] a){

}

public static void selectionSort(int[] a) {

}

public static void heapSort(int[] a){

}

public static void bstSort(int[] a){

}

public static int[] createRA(int n){

}

}

Report should have structure:

mergeSort on 100 elements takes:

mergeSort on 1000 elements takes:

bstSort on 1000000 elements takes:

bstSort on 1000000000 elements takes:

Programming Homework Help

Programming Homework Help

Programming Homework Help. DVC Private Variables Class Definition & Default Constructor C Programming Exercise

 

Assignment

Write a class called Month that represents a calendar month. The class should have the following data field:

  • An int representing the number of the month (1 for January, 2 for February, etc.).

Define and write the code for these member functions:

  • A constructor that sets the month from an integer parameter (if 1 is passed, “January” is set, etc.).
  • A constructor that sets the month from a string parameter (“January” as a string, etc.).
  • A default constructor that sets the month to a default month (any default of your choice).
  • An output function that returns the name of the month as a string.
  • An output function that returns the number of the month.

The file is included in this module. The starter file has the beginnings of the class definition at the top of the file.

For the constructors, if an invalid value is passed (month greater than 12, or less than 1, or an invalid string), set the month to a default value of your choice.

Testing Your Code

Write a short main() that creates an class of type Month, and sets the month with one of the constructors. Then, write a ‘cout’ statement that prints the month using the string output function you wrote above (no need to test the output function for a number — that one should be trivial!).

What to Submit in Canvas

To complete this lab, submit these files in Canvas:

  • Your .cpp file that contains your Month class definition and functions, and your test code in main().
  • Optionally, you can write your class in a separate file (.h), submit this as well. If you wrote both your class and test code in main() you will only need to submit one file.

Programming Homework Help