Java Class Write A Program That Calculates The Average Of N Integers The Program

jAVA CLASS

Write a program that calculates the average of N integers. The program should promptthe user to enter the value for N and then afterward must enter all N numbers. Use anarray to save the N integers. If the user enters a nonpositive value for N, then anexception should be thrown (and caught) with the message “N must be positive.” If thereis any exception as the user is entering the N numbers, an error message should bedisplayed, and the user prompted to enter the number again.

 
"Looking for a Similar Assignment? Get Expert Help at an Amazing Discount!"
ORDER NOW

Java Create An Itinerary Class This Class Will Represent A Travel Itinerary Cont

JAVA

Create an Itinerary class. This class will represent a travel itinerary containing one or two flights in our system. It should contain two constructors, two instance variables (two different Flights) and seven methods (getFirstFlight, getSecondFlight, hasConnection, getTotalCost, getDeparture, getArrival, toString) [15 points]

overloaded constructor: will take one Flight object and use it to set up the instance variables. The second Flight variable should be set to null.

overloaded constructor: will take two Flight objects and use them to set up the instance variables.

getFirstFlight(): returns the first Flight in the itinerary.

getSecondFlight(): returns the second Flight in the itinerary.

hasConnection(): returns true if the itinerary contains two Flight objects.

getTotalCost(): returns the total cost of all Flights in the itinerary.

getDeparture(): returns the departure time of the first flight in the itinerary.

getArrival(): returns the arrival time of the last flight in the itinerary.

toString(): will return the total cost of the itinerary and the “detailed string” for the Flight or Flights in the itinerary.

Create a FlightManager class. This class will store instances of the Flight class, and support generating a list of potential itineraries. It should contain one constructor, two instance variables (an array of Flights, and something that counts the number of flights in the system), and four methods (addFlight, increaseSize, findItineraries, shrinkItineraries). [25 points]

default constructor: will set up the instances variables with zero flights.

addFlight(…): Adds a flight to the flights array. Uses the increaseSize() method if the array is full.

increaseSize(): Doubles the size of the flights array, while keeping whatever is already there. Make this a private method.

findItineraries(…): Searches the flights based on source airport, destination airport, and departure time, to find 1-flight and 2-flight itineraries meeting those criteria. When searching for 2-flight itineraries, checks that the flights have a connecting city, and that the first arrives in time for the second. Your method should create an array of potential itineraries that can be returned.  (If it helps, you may assume that this method will never find more than 100 itineraries.) Use the shrinkItineraries() method to “clean up” up the potential itineraries array; see below. Hint: use loops to search for all the flights in the flights variable, check if they meet the criteria, and then create a new Itinerary object if the criteria is met.

shrinkItineraries(…). Takes an array of itineraries, where some of the later indices are unused (null), and returns a new array of itineraries where there are no empty indices. Make this a private method.

 
"Looking for a Similar Assignment? Get Expert Help at an Amazing Discount!"
ORDER NOW

Java Java Has Operated A Chain Of Coffee Houses As A Sole Proprietorship Over Th

2.  Mr. Java (“Java”) has operated a chain of coffee houses as a sole proprietorship over the past three years and is now interested in expanding his horizons and limiting his liability.  To do so, he wishes to incorporate, raise$150,000 of additional capital and hire an experienced person to manage the business.He has located Venturer, who is willing to invest $150,000 cash and Manager, who has agreed to serve as chief operating officer if the terms are right.    The parties have decided to join forces and form Java Jyve, Inc. (“Jyve”) to expand the coffee house business and offer access to the Internet at every location.Java will transfer assets with an aggregate basis of $50,000 and a FMV of $200,000 (do not be concerned with the character of the individual assets for this problem); Venturer will contribute $150,000 cash; and Manager will enter into a five-year employment contract.Java would like effective control of the business; Venturer is interested in a guaranteed preferred return on his investment but also wants to share in the growth of the company; and Manager wants to be fairly compensated(she believes her services are worth approximately $80,000 per year) and receive stock in the company, but she cannot afford to make a substantial cash investment .All the parties wish to avoid adverse tax consequences.

 2Consider the following alternative proposals and evaluate whether they meet the tax and non-tax objectives of the parties:(a)   In exchange for their respective contributions, Java will receive 200- shares and Venturer will receive 150 shares of Jyve stock. Manager will agree to a salary of $40,000 per year for five years and will receive 150 shares of Jyve common stock upon the incorporation. (Assume that the value of the stock is $1,000 per share.)(b)   Same as (a), above, except Manager will receive compensation of$80,000 per year and will pay $150,000 for her Jyve stock. Any difference if Manager, unable to raise the cash, gave Jyve the unsecured $150,000 promissory note, at market rate interest, payable in five equal installments, in exchange for her 150 shares?(c)   Same as (a), above, except Manager will pay $1,000 for her 150 shares and the incorporation documents specify that she is receiving those shares in exchange for her cash contribution rather than for future services.(d)   Same as (c), above, except Manager will pay $20,000 cash rather than $1,000.(e)   Same as (d), above, except Manager will receive only 20 shares of stock without restrictions; the other 130 shares may not be sold by Manager for five years and will revert back to the C if Manager should cease to be an employee of the company during the five-year period. See LR.C. §83. Would you advise Manager to make a §83(b) election in this situation? What other information would you need?(f)In general, is there anotherapproach to structuring the formation of Jyve that would harmonize the goals ofthe founders?

 
"Looking for a Similar Assignment? Get Expert Help at an Amazing Discount!"
ORDER NOW

Java Numbers Assignment 1 100

Create a Java class called Numbers to add numbers from 1 to 100 and print the result.

You must place the class file and java file into a zip folder

 
"Looking for a Similar Assignment? Get Expert Help at an Amazing Discount!"
ORDER NOW

Java Program 6

java program

 
"Looking for a Similar Assignment? Get Expert Help at an Amazing Discount!"
ORDER NOW

Java Program That Displays Three Top Sales Made By Employees Rows And Columns Re

Java program that displays three top sales made by employees. Rows and columns represent sales made by each employee identified by their employee number. 

Sales 1

EmpNum 101111 – R3000

EmpNum 101122 – R2500

EmpNum 101133 – R1100

EmpNum 101144 – R1700

EmpNum 101155 – R5000

Sales 2

EmpNum 101111 – R2000

EmpNum 101122 – R5500

EmpNum 101133 – R2000

EmpNum 101144 – R2700

EmpNum 101155 – R2900

Sales 3

EmpNum 101111 – R3500

EmpNum 101122 – R3500

EmpNum 101133 – R4500

EmpNum 101144 – R2500

EmpNum 101155 – R5900

Using two dim array produce employee sales report and total sales made by each employee 

 
"Looking for a Similar Assignment? Get Expert Help at an Amazing Discount!"
ORDER NOW

Java Programming Language Design And Implement A Class Called Book That Contains

JAVA PROGRAMMING LANGUAGE: Design and implement a class called Book that contains instance data for the title, author, publisher, and copyright date. Define the Book constructor to accept and initialize this data. Include setter and getter methods for all instance data. Include a toString method that returns a nicely formatted, multiline description of the book. Create a driver class called Bookshelf, whose main method instantiates and updates several Book objects.

 
"Looking for a Similar Assignment? Get Expert Help at an Amazing Discount!"
ORDER NOW

Java Programmingt1

   java programmingT1. Write a program that models checkout lines at a supermarket; you have to use one of the data

structures being covered in the lectures and explain why your choice of the data structure is well

justified. Several lines of customers should be displayed. You can add a new customer by pressing a

key. You’ll need to determine how the customer will decide which line to join. The checkers will

take random amounts of time to process each customer (presumably depending on how many

groceries the customer has.) Once checked out, the customer is removed from the line. For

simplicity, you may simulate the passing of time by pressing a key. Perhaps every key-press

indicates the passage of one minute. (Java may have more sophisticated ways to handle time.)

• Submit the source code that you have created to complete the assignment, but not the existing

library code (e.g., library code related to data structures and associated algorithms); specify the

origin of the library code you used (e.g., the textbook website) in the report

The report should also contain the text that explains and discusses your work:

1. It should be easily comprehensible to anyone who has taken a module on Data Structures

and Algorithms.

2. One of the main purposes is to convincingly demonstrate that you understand what you are

presenting.

3. It should be self-contained as much as possible and, thus, should contain the key code

fragments rather than merely referring to the submitted full source code.

4. Discuss any (potential) limitations or weakness of your work and how you would improve

if you have more time. Discussing the weakness would not negatively count towards your

mark. It is a recommended practice

import javax.swing.*;public class Supermarket {private int pArray;private String deptArray;private boolean storeArray;public Supermarket() {int pNum = 3;int sNum = 4;pArray = new…

 
"Looking for a Similar Assignment? Get Expert Help at an Amazing Discount!"
ORDER NOW

Java The Length Method Of The String Class Takes No Argument And Returns An Int

Java:The length method of the String class takes no argument and returns an intA) TrueB) False

The length() method of String class has got the following definition.public int length()This method takes no argument, and returns the length of the string(an integer)on which this method is…

 
"Looking for a Similar Assignment? Get Expert Help at an Amazing Discount!"
ORDER NOW

Javascript Assistance To Asks The User To Enter Five Test Scores It Should Displ

 Javascript assistance to asks the user to enter five test scores. It should display a letter grade for each score and the average test score. Write the following methods in the program: 

calcAverage

determineGrade

 
"Looking for a Similar Assignment? Get Expert Help at an Amazing Discount!"
ORDER NOW