Programming Homework Help

Java Programming Questions

 

1.Consider the below java code:

import java.util.Scanner;

import java.io.File;

public class ScannerFromFile {

  public static void main(String[] args) {

     Scanner in = new Scanner(new File(“test.in”));

     // do something …

  }

}

              Write an exception to handle if the file “test.in” does not exist

2.Consider the below java code

public class Sample {

  public static void main(String[] args) {

     int num = Integer.parseInt(args[0]);

        ………………………………………………………..

     // The execution terminates if the value of num

     // is greater than 100

      System.out.println(“The assertion passed…”);

  }

}

Write an assertion that would terminate the program if the entered number is greater than 100

3.The Chinese animal zodiac is a repeating cycle of 12 years, with each year being represented by an animal and its related attributes. Traditionally these zodiac animals were used to date the years. In order, the 12 animals are: Rat, Ox, Tiger, Rabbit, Dragon, Snake, Horse, Goat, Monkey, Rooster, Dog, Pig. Each year is associated with a zodiac animal. 2019 is the year of the Pig, 2020 is the year of Rat, 2021 will be the year of Ox

Use direct access method to implement the method YearToAnimalZodiac()

4.refactor the below pieces of code:

public double areaOfCircle (double radius)  { 

   return Math.pow(radius * 3.14159, 2); 

} There is 2  more that i will attch on word file

Programming Homework Help

Central Washington University Node Structure on Java Programs Project

 

learn how to initialize a Node.js project, install third-party dependencies, and create interactive command-line applications. Node.js ships with a **standard library**. The standard library contains a number of modules that allow you to extend the functionality of Node.js, like `fs`, which you’ll use to read and write files. You’ll also learn how to add a large and robust ecosystem of third-party modules to applications to extend their functionality.

Programming Homework Help

Python Lab Codes

 

Problem 3 – Page 124

Include in your submission a test program that shows that ALL aspects of your modifications work correctly.

Add the methods grow and shrink to the Array class. These methods should use the strategies discussed in this chapter (chapter 4) to increase or decrease the length of the list contained in the array. Make sure that the physical size of the array does not shrink below the user-specified capacity and that the array’s cells use the fill value when the array’s size is increased.

Programming Homework Help

PU C Programming & SFML Graphic Declaration of The Body Class Lab Report

 

Programming Homework Help

AACC Create a Test Using Vocabulary Advance Java Practice

 

  1. Individual Project Part II – Create a test using vocabularyWrite a 25-question, multiple-choice test. Include an answer key. The test must contain at least 20 words from the vocabulary found in the chapters covering: Array List ( 12 questions), Big O notation ( 4 questions), sorting and searching ( 9 questions). Each question should have four answer choices. No answer choice should be none of the above or all of the above. Assignment Expectations:—All vocabulary words must be underlined.—The test should be logical and resemble a college level test that I can share with other faculty members. The answer choices should not be challenging the four choices. None of the choices should be none of the above and/or all of the above.—Pay attention to grammar, punctuation, style, clarity, and spelling. — There should not be any two assignments that look exactly alike, if so both or all will be given a grade of zero. Create a Test Rubric
    CATEGORY Met expectations(20 points) Met most of the expectations (15 points) Met some of the expectations (10 points) Did not meet expectations (5 points)
    Vocabulary All questions contain all required vocabulary words that are defined correctly and demonstrate comprehension of the terms. Less than 2 questions contain vocabulary words that are clearly defined. For the most part the test demonstrates comprehension of the other vocabulary terms. Less than 5 questions contain vocabularywords that are clearly defined. For the most part the test questions demonstrate comprehension of the other vocabulary terms. More than 5 questions contain that do not contain vocabularywords that are clearly defined. For the most part the test questions do not demonstrate comprehension of the other vocabulary terms.
    Question All questions are accurate. Less than 2 test questions are mostly accurate. Less than 5 test questions are somewhat accurate. More than 5 test questions are not relevant to the content.
    Quality All test questions demonstrate college level inquisition. Less than 2 test questions demonstrate college level inquisition. Less than 5 test questions demonstrate college level inquisition. More than 5 test questions are very simply stated without any thought.
    Grammar and Mechanics Capitalization and punctuation are correct throughout the study guide. There are no grammatical errors. There is less than 2 grammatical errors. There is less than 4 grammatical errors. There are many grammatical errors.

Programming Homework Help

Dallas College Eastfield Campus Create a Program Code Java Coding Task

 

Problem Description:

Write a program in Java that reads in: (i) investment amount, (ii) annual interest rate, and (iii) number of years from the keyboard and calculates the future investment value using the following formulae:

h = × 12

h = 1200

= × (1 + h )!”#$%&'()*!+,-

Sample Run:

Enter investment amount: 1000
Enter annual interest rate in percentage points (e.g., 2.25 for 2.25%): 2.25 Enter the number of years: 2
The value of $1000.0 after 2 years is $1045.9837866210664

Hints:

  1. ImporttheScannerclassfromthejava.utilpackagetoreadthethreeinputvariables.
  2. Declare variables as “double” or “int” appropriately.
  3. UsetheMath.pow(a,b)functiontocompute !.
  4. Use the sample run in the instructions to test your program to make sure it is correctbefore you submit.

Deliverables:

Your .java file including:

  1. Asamplerunatthetopwithinvestmentamountof$2021.50,annualinterestrateof 3.5%, and 6 years. The four lines of the output (similar to those shown in the sample run above) should be inserted as a comment on the top of the Java code (before the import and class statements). (2 points)
  2. Your code with other appropriate comments. (Code: 6 points, Comments: 2 points)

Programming Homework Help

CUNY Lehman College Restaurant Customer Database Project Proposal

 

 This document provides a description of the project and must highlight the objectives clearly. Discuss how success will be measured in some detail. In other words, it must be more than, “We will complete the project on time.” The proposal must identify any assumptions. It must contain a complete list of team members and roles each will fill. If there is a plan to switch roles in each Sprint, outline this in the proposal. be clearly identified and separated.

Programming Homework Help

Returns Control of The Console Python Lab Report

 

This is an individual assignment due on Saturday (8 May) at 11:59 pm. As an open book project, you may reference notes and other course material, but you may not work together, or receive help from anyone except staff members. Otherwise, it is just like a normal lab assignment: you may use PythonTutor or other IDEs, and you may submit as many times as you’d like. We will not be style-checking this assignment.

MOSS: A Word on Plagiarism Detection

Please keep in mind that as computer science instructors, we care about academic dishonesty just as strongly as our peers in other fields of study. Unlike our peers, however, our field of expertise and the nature of the material allows us to create tools that enhance our detection of plagiarism. I’m sure you have heard of similar tools, such as TurnItIn.com, and other plagiarism detection systems for essays. Since our field is more mathematical, however, we are capable of considering not only the actual text written on the screen but the overall flow and intent of the program, and mathematically compare it to that of another to determine the level of similarity between the two. Therefore, I highly suggest that you do not “collaborate” with anyone else, as we will be able to detect it. If we catch you cheating, you will receive an automatic zero in the class, and your case will be sent to the Office of Academic Integrity & Student Conduct. With that being said, let’s all take a deep breath and try to have some fun!

Preamble

At this point in the course, you have enough knowledge about Python to do more than you think. Many simple games, for example, can be written with what we’ve already covered. So let’s do it! Let’s create a game of 2048!

Concepts being tested

  • Data Structures
    • Nested Lists
    • Dictionaries
    • Potentially Sets
  • Branching
  • Loops
    • Nested Loops
  • Functions Basics
  • Critical thinking, planning, & organization

Programming Homework Help

SDSU Develop a Program that Shows the Sales of Bikes for Bike Company C++ Program

 

Develop a program that shows the sales of bikes for a bike company. The program should use a structure to store the following data about the bike sale:

Bike Brand (Company)

Type of Bike (mountain, road, kid’s etc.)

Sale Price

Year of Sale

The program should use an array of at least 4 structures (4 variables of the same structure). It should let the user enter data into the array, change the contents of any element and display the data stored in the array. The program should have a menu driven interface.

Input Validation: When the data for a new bike sale is entered, be sure the user enters data for all the fields. No negative amounts should be entered for a “Sale Price” of the Bike.

An example:

You will use 1 structure only and then manipulate that for working with the information.

The program should use an array of at least 4 structures (4 variables of the same structure).

An example of the structure:
struct Bike
{
string name;
string type;

double price;

int year;

};