Calculate and displays the cost of computing infrastructure

Assignment Help JAVA Programming
Reference no: EM131134733

Objectives

This assessment item is designed to test your understanding of objects, classes, types, operators, standard input/output, loops, if statements and methods.

Assessment task

Write a java console application that calculates and displays the cost of computing infrastructure setup for N banks. N should be declared as a constant and it should be equal to the largest digit of your student ID number. The cost is based on number of computers to be installed as shown below in Table 1.

Table 1. Number of Computers and Cost

Number of Computers

Cost

2 or less

$1000

Over 2 but not more than 20

$1000 + $400 per computer Over 2

Over 20 but not more than 100

$1000 + $300 per computer Over 2

Over 100

$200 per computer

The application should ask the user to enter the number of computers for each bank (total N banks) and calculate the cost. The application should display the cost for each bank as shown in the example below. At the end of the Nth bank's cost, a receipt with total cost, lowest cost and average cost should be displayed. The total cost is calculated by adding the setup cost for all banks. The lowest cost is calculated by finding the lowest amount from costs for N banks. The average cost is calculated by dividing the total cost with the total number of banks. The format for your input and output must be same as given in example below.

Example for N=4 (Note that a loop should be used for reading the input and displaying the output) Your welcome message should be here
Enter the number of computers for Bank number 1: 1
The cost to setup the computing infrastructure for Bank number 1 is $1000

Enter the number of computers for Bank number 2: 10
The cost to setup the computing infrastructure for Bank number 2 is $4200

Enter the number of computers for Bank number 3: 22
The cost to setup the computing infrastructure for Bank number 3 is $7000

Enter the number of computers for Bank number 4: 100
The cost to setup the computing infrastructure for Bank number 4 is $20000

*********Receipt for Total Cost, Lowest Cost and Average Cost********* Total Cost is $32200
Lowest Cost is $1000 Average Cost is $8050

Your exit/end message containing your ID number must be here.

The application should be user-friendly by displaying appropriate welcome message at the beginning and an exit message at the end. The application should use the following classes and methods.

public class Bank
{
//declare constants
//declare fields/variables
//declare constructor
//declare and define all methods including get and set methods
}

public class BankTest
{
public static void main(String[] args)
{
//create object
//read and store quantity of computers using a set method
//get the quantity of computers using a get method and calculate the cost
//print the output as shown in the example
}
}

Reference no: EM131134733

Questions Cloud

Determine the chromosome constitution and phenotypic ratios : In Drosophila melanogaster, eyeless (ey) is a recessive trait in which the eyes are tiny or absent. Assuming random segregation of chromosomes into gametes, determine the chromosome constitution and phenotypic ratios in the offspring
Which modeling assumptions may be violated for this data : Which modeling assumptions may be violated for this data? Describe and apply techniques presented in class to alleviate the modeling violations that you found. Justify all modeling steps.
Was groupon wise to turn down six billion dollar from google : Was Groupon wise to turn down $6 billion from Google? Could it really be worth $25 billion? Why do consumers love Groupon so much? Are Groupon campaigns good for merchants?
What is a possible genotype for this plant : A series of experiments shows that oil content in a diploid grain is influenced by five genes (a through e) with additive alleles. The highest producing strain is 20% oil content; the lowest has close to 0%. A plant of unknown genotype has an oil ..
Calculate and displays the cost of computing infrastructure : Write a java console application that calculates and displays the cost of computing infrastructure setup for N banks. N should be declared as a constant and it should be equal to the largest digit of your student ID number.
Demonstrate the ability to clearly communicate ideas : The paper should demonstrate the ability to clearly communicate ideas about financial management in a professional manner and tone.
What is the frequency of crosses : Consider a population under Hardy-Weinberg equilibrium, where the frequency of the Rh-negative allele, d, is 0.3. What is the frequency of crosses that could potentially produce children with erythroblastosis fetalis
What is the maximum you are willing to pay as a finders fee : How would your answer to part (b) change if only 1 out of 10 used cars was a plum?
How can older rock be found atop younger rock : Find Martinsburg, WV, in the extreme northwest corner. Now locate Martinsburg, MD, which is just to the to the east of Harrison Island and Mason Island along a bend in the Potomac in the south central area of the map. Which is surrounded by the ol..

Reviews

Write a Review

JAVA Programming Questions & Answers

  Calculate the total commission received by a salesperson

The following program attempts to calculate the total commission received by a salesperson who earns 7% on sales of product A which total less than $40,000 and 10% on the amount of sales above $40,000

  Create a messageframe class extending jframe

Create a MessageFrame class extending JFrame and a MessagePanel class extending JPanel.

  Program mimics a rudimentary spreadsheet

Change the averages so that they are rounded to the nearest one hundredth. The example above shows averages in format - Change the program so that before the spreadsheet window is displayed, the user sees the window

  Method splitstack that takes a stack

Write a method splitStack that takes a stack of integers as a parameter and splits it into negatives and non-negatives. The numbers in the stack should be rearranged so that all the negatives appear on the bottom of the stack and all the non-negat..

  Write jvm program which accepts rpn expression

Write down the IJVM program which accepts RPN expression, with each operand and operator entered line by line. As each number (operand) is entered, push it on stack.

  Define two different physical representations for strings

Define an ADT for character strings. Your ADT should consist of typical functions that can be performed on strings, with each function defined in terms of its input and output. Then define two different physical representations for strings.

  Calls the function readarray to read data into the array

Write a function void readArray(int arr[], int length) to read in length many values into the array arr.

  Functional abstraction

Question 1: What are some of the benefits of modularity? Question 2: What is functional abstraction? Question 3: What is information hiding?

  Create a class for services offered by a hair-styling salon

Create a class for services offered by a hair-styling salon. Data fields include a String to hold the service description and write an application named Salon Report that contains an array to hold six Service objects and fill it with the data

  Why do i not create a constructor for an applet

When should one use applets and when should one use servlets? Why do I not create a constructor for an applet? Why doesn't appletviewer appletclass.class work?

  Prepare an address book to save the complete information

Prepare an address book to save the complete information of the person - Define the class Address that can store a street address, city, state, and zip code. Use the appropriate methods to print and store the address.

  Creates a list of shapes stored in an array

Identify and use the correct syntax of a common programming language (Java) - describe program functionality based on analysis of a given program;

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd