Preview

Hw java

Satisfactory Essays
Open Document
Open Document
416 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
Hw java
Department of Information Science, College for Women, Kuwait University

ICS 240 – Fall 2008-09
Home Works #1

1. Write a program that prompts the user to input the length and width of a rectangle and then prints the rectangle’s area and perimeter.

2. Write a program that does the following:
a) Prompts the user to input five decimal numbers
b) Prints the five decimal numbers
c) Converts each decimal number to the nearest integer
d) Adds the five integers
e) Prints the sum and average of the five integers

3. To make profit, a local store marks up the prices of its items by a certain percentage. Write a Java program that reads the original price of the item sold, the percentage of the marked-up price, and sales tax rate. The program then outputs the original price of the item, the mark-up percentage of the item, the store's selling price of the item, the sales tax rate, the sales tax, and the final price of the item. ( the final price of the item is the selling price plus the sales tax.)

4. The manager of a football stadium wants you to write a program that calculates the total ticket sales after each game. There are four types of tickets—box, sideline, premium, and general admission. After each game, the data is stored in a file in the following form: ticketPrice numberOfTicketsSold

Sample data are shown below:
250 5750
100 28000
50 35750
25 18750
The first line indicates that the box ticket price is $250 and that 5750 tickets were sold at that price. Output the number of tickets sold and the total sale amount. Format your output with two decimal places.

5. Write a program to calculate the property tax. Property tax is calculated on 92% of the assessed value of the property. Foe example, if the assessed value is $100000, the property tax is on $92000. Assume that the property tax rate is $1.05 for each $100 of the assessed value. Your program should prompt the user to enter the assessed value of the property. Store the output in

You May Also Find These Documents Helpful

  • Satisfactory Essays

    Hsm 260 Week 4 Case Study

    • 660 Words
    • 3 Pages

    Sales revenue | $580,000 | $600,000 | $20,000 | U | Cost of goods sold | $385,000 | $360,000 | $25,000 | F |…

    • 660 Words
    • 3 Pages
    Satisfactory Essays
  • Powerful Essays

    Mat 540 Assignment 1

    • 1196 Words
    • 5 Pages

    This causes the shape of the box plot to be quite spread out with the median and quartiles close together. The female writing hand box plot is also the same length as the writing hand box plot; this is because the minimum and maximum data from the writing hand came from females. When putting the male and female writing hand box plots in comparison to each other, you can see that females have a much larger range than the males as discussed before. This causes the female box plot to have a lower, lower quartile and median and a higher upper quartile. The median for males is only slightly higher than the median for females, keeping in mind that males had data from an eleven (11) year old and females had data from a forty two (42) year old. This can cause the data to be slightly swayed as there were not equal age groups for both box…

    • 1196 Words
    • 5 Pages
    Powerful Essays
  • Good Essays

    ops335 lab 2 firewall

    • 695 Words
    • 4 Pages

    4. Enter the list price of the book and include a dollar sign in the prompt. Make the list price a decimal data type or test to ensure that the user entered a numerical value.…

    • 695 Words
    • 4 Pages
    Good Essays
  • Good Essays

    CIS115 W2 Exercise

    • 757 Words
    • 10 Pages

    Your goal is to solve the following simple programming exercise. You have been contracted by a local stadium to design an algorithm determining the total seating charges for any game held at the stadium. Lower level seats cost $25 per seat, midlevel seats cost $15 per seat, and upper level seats cost $10 per seat. The algorithm should ask the user for the number of seats being purchased in each seating level. Then, the algorithm will determine the total for each level and a grand total for the entire purchase.…

    • 757 Words
    • 10 Pages
    Good Essays
  • Good Essays

    Sales and Cell

    • 445 Words
    • 2 Pages

    In this project, you will create a worksheet that calculates sales and commissions for a used car company. You will create functions that determine monthly payments, lookup commission rates, and calculate a bonus for the salespeople.…

    • 445 Words
    • 2 Pages
    Good Essays
  • Satisfactory Essays

    Pt1420 Unit 7 Study Guide

    • 582 Words
    • 3 Pages

    15.Write a program that will prompt the user to enter a hex digit character (0...9 or…

    • 582 Words
    • 3 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Pt1420 week 2

    • 320 Words
    • 3 Pages

    A customer in a store is purchasing five items. Design a program that asks for the price of each item, and then displays the subtotal of the sale, the amount of sales tax, and the total. Assume the sales tax is 6 percent.…

    • 320 Words
    • 3 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Cost Control Problem Set

    • 689 Words
    • 3 Pages

    Menu item |Number sold |Standard/budgeted portion cost | |A |580 |$4.45 | |B |285 |$6.20 | |C |600 |$4.15 | |D |200 |$6.00 | |E |475 |$5.95 | |F |320 |$7.05 | |G |545 |$6.10 | |H |200 |$6.95 | |Totals |3,205 | | | | | | |Solve all problems for 2 decimal places (x.xx) | | | |Food sales |$57,680.30 | | | | | | |1. Food cost $ based on standard cost figures |$17834.75 |(1 pt) | | | | | |2. Food cost % based on standard cost figures |30.92% |(1 pt) | | | | | |3. Contribution margin $ |$39845.55 |(1 pt) | | | | | |Actual inventory figures | | | |Opening inventory |$6,415.60 | | |Purchases |$19,950.30 | | |Ending inventory |$6,852.65 | | | | | | |4. Cost of goods sold $ |$19513.25 |(1 pt) | | | | | | | | | |5. Food cost % based on actual cost figures |33.83% |(1 pt) | | | | | | | | | |6. Difference between standard and actual cost in $ |+1678.5 |(1 pt) + or | | | | | |7. Difference between standard and actual cost % |+2.91% |(1 pt) + or | |…

    • 689 Words
    • 3 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Yorktown Technology

    • 483 Words
    • 2 Pages

    The purpose of this paper is to gather data for this company that wants to know how to find the price, revenue, and marginal revenue of their shoes through the given equation. After a series of plugging in formulas, and solving equations you will find solutions. In order to find out the revenue you have to know the price. So the first step towards finding out the price is to solve the first given equation. After finding the price for their company’s shoes the next step would be to find the company’s revenue. Then finding the marginal revenue will follow.…

    • 483 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Checkpoint 2

    • 294 Words
    • 2 Pages

    The manager of the Supermarket would like to be able to compute the unit price for the product sold here. To do this, the program should input the name and price of an item and its weight in pounds and ounces.…

    • 294 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    assignment lab 1

    • 751 Words
    • 4 Pages

    This program will determine the usable area of a house. The rooms are rectangular in shape and maximum of four rooms are allowed to be calculated at once. It will use the area formula for a rectangle to find the usable area of each room and once the calculation are made for each room it will print out the total usable area of a house to the output screen.…

    • 751 Words
    • 4 Pages
    Good Essays
  • Satisfactory Essays

    To get the Total Sales of each item is to multiply the volume and the selling price like for the computer paper: 3,000 x 14 = 420,000. To get the Material cost, have to multiply the volume and the material cost of each item and like for the computer paper: 3,000 x 6 = 180,000. Lastly, to get the total Variable overheads, would have to multiply the Variable Overhead per unit by the volume like for the computer paper: 1.5 x 3,000 = 45,000. For the Grand Total Sales is to add all the Total Sales of each item: $420,000 + $840,000 + $540,000 + $680,000 = $2,480,000. In order to get the Contribution Margin, for an example for the computer paper:…

    • 983 Words
    • 4 Pages
    Satisfactory Essays
  • Satisfactory Essays

    5.) Design a While loop that lets the user enter a number. The number should be multiplied by 10, and the result stored in a variable named product. The loop should stop once product contains a value > 100.…

    • 651 Words
    • 4 Pages
    Satisfactory Essays
  • Satisfactory Essays

    formulas to have Excel calculate the profits for all 3 ticket prices and the number…

    • 268 Words
    • 2 Pages
    Satisfactory Essays
  • Powerful Essays

    Tax Structue

    • 1717 Words
    • 7 Pages

    Many provisions of property tax law affect affordable housing. Property taxes are based on a property’s assessed value. If the property is built and the property value rises drastically, the property tax bill is also going to rise. In order to correctly assess the amount of property tax revenue that comes from owners of Habitat for Humanity homes, the market data or comparable sales approach can be used to estimate the value of a home by comparing it to similar properties. The market approach uses information directly produced by the market about how property owners value properties (Mikesell, 2010). Property tax in dollar terms is calculated by taking the assessed property value and the mill rate, which is the amount of tax payable per dollar of the assessed value of a property, and dividing by 1,000. A property may be subject to tax by a number of different authorities, mill rates are set by…

    • 1717 Words
    • 7 Pages
    Powerful Essays