answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Ksivusya [100]
1 year ago
15

You have several pictures of different sizes that you would like to frame.A local picture framing store offers two types of fram

es—regular andfancy. The frames are available in white and can be ordered in any colorthe customer desires. Suppose that each frame is 1 inch wide. The costof coloring the frame is $0.10 per inch. The cost of a regular frame is$0.15 per inch and the cost of a fancy frame is $0.25 per inch. The costof putting a cardboard paper behind the picture is $0.02 per square inchand the cost of putting glass on top of the picture is $0.07 per square inch. The customer can also choose to put crowns on the corners,which costs $0.35 per crown. Write a program that prompts the userto input the following information and then output the cost of framing the picture:a. The length and width, in inches, of the picture.b. The type of the frame.c. Customer's choice of color to color the frame.d. If the user wants to add the crowns, then the number of crowns.
Computers and Technology
1 answer:
exis [7]1 year ago
5 0

Answer:

written in java

Note :  Package name was excluded

 

import java.util.Scanner;

public class Main {

   public static void main(String[] args) {

       //declared 8 uninitialised variable  

       String input;

       double cost, colorC, frameC, paperC, glassC, crownC;

       char crowns;

       int type, color, crown, length, width, area, perimeter;

       

       //creating an instance of the Scanner class to accept value from user

       Scanner scanner = new Scanner(System.in);

       System.out.print("Enter length of frame: ");

       length = scanner.nextInt();

       System.out.print("Enter width of frame: ");

       width = scanner.nextInt();

       System.out.print("Do you want a fancy frame or a regular frame\nEnter 1 for fancy, 2 for regular: ");

       type = scanner.nextInt();

       if (type == 1) {

           frameC = 0.25;

       } else {

           frameC = 0.15;

       }

       System.out.print("Do you want a white frame or a colored frame\nEnter 1 for white, 2 for colored: ");

       color = scanner.nextInt();

       if (color == 2) {

           colorC = .10;

       } else{

           colorC = 0;

       }

       System.out.print("Do you want crowns \nEnter y for yes, n for no ");

       input = scanner.next();

       crowns = input.charAt(0);

       if (crowns == 'y' || crowns == 'Y') {

           System.out.print("How many crowns?");

           crown = scanner.nextInt();

       } else

           crown = 0;

       if (crown > 0)

           crownC = crown * .35;

       else

           crownC = 0;

       area = length * width;

       perimeter = length * 2 + width * 2;

       paperC = area * .02;

       glassC = area * .07;

       cost = glassC + paperC + crownC + colorC * perimeter + frameC * perimeter;

       System.out.println("The cost of your frame is: $" + cost);

   }

}

You might be interested in
3. Of the following pieces of information in a document, for which would you most likely insert a mail merge field? A. First nam
yuradex [85]
I would suggest the answer would be both A and D, mail merge is used to specify different field for different recipients. 
4 0
1 year ago
Read 2 more answers
Which two functions are provided to users by the context-sensitive help feature of the Cisco IOS CLI? (Choose two.)
Svetach [21]

Answer:

B. displaying a list of all available commands within the current mode*

D. determining which option, keyword, or argument is available for the entered command*

Explanation:

Cisco IOS are known for using Command line interface(CLI) that allows execution of certain commands

Cisco system make use devices such as router, switch and others. All these Commans comes with privileged levels that gives access to user that have privilege to access between level 0 and 15.

It should be noted that two functions that are provided to users by the context-sensitive help feature of the Cisco IOS CLI are ;

✓displaying a list of all available commands within the current mode

✓ determining which option, keyword, or argument is available for the

5 0
2 years ago
When long labels are required, which of these commands can you use to improve readability of a worksheet?
Morgarella [4.7K]
I believe it is wrap text! Hope this helped
6 0
2 years ago
Read 2 more answers
# 1) Complete the function to return the result of the conversion
seraphim [82]

Answer:

See explanation

Explanation:

Replace the ____ with the expressions in bold and italics

1)  <em>        return km</em>

 

return km returns the result of the computation

2)  = <em>convert_distance(my_trip_miles)</em>

convert_distance(my_trip_miles) calls the function and passes my_trip_miles to the function

3)  + <em>str(my_trip_km)</em>

The above statement prints the returned value

4)  +str(my_trip_km * 2)

The above statement prints the returned value multiplied by 2

3 0
1 year ago
Assume there is a class AirConditioner that supports the following behaviors: turning the air conditioner on and off. The follow
Dafna11 [192]

Answer:

1)

officeAC = new AirConditioner();

officeAC.turnOn();

2)

officeAC = new AirConditioner();

officeAC.turnOn();

officeAC.setTemp(69);  

Explanation:

1)

In the first statement a new object of the class AirConditioner whose reference is assigned to the officeAC. new is a keyword which creates an object of the class.

Next statement uses the method turnOn(). Reference to the new object officeAC is used to invoke this method turnOn().

2) The first two statements works the same as in 1)

The last statement invokes a method setTemp() using the reference variable and passes the value 69 to this method to set the desired temperature.

6 0
1 year ago
Other questions:
  • Write a program that prompts the user to enter the month and year and displays the number of days in the month. For example, if
    13·1 answer
  • Prompt: Which references and reference formats are you most likely to use? Why?<br><br><br> ED2020
    13·2 answers
  • Why is the following statement true - ideally, your information is abbreviated
    10·2 answers
  • Given a positive integer, output its complement number. The complement strategy is to flip the bits of its binary representation
    6·1 answer
  • A queueing system has four crews with three members each. The number of "servers" is:
    5·2 answers
  • Delete Prussia from country_capital. Sample output with input: 'Spain:Madrid,Togo:Lome,Prussia: Konigsberg' Prussia deleted? Yes
    13·1 answer
  • Print either "Fruit", "Drink", or "Unknown" (followed by a newline) depending on the value of userItem. Print "Unknown" (followe
    13·1 answer
  • A function defined beginning with void SetNegativesToZeros(int userValues[], ... should modify userValues such that any negative
    12·1 answer
  • Write an expression to print each price in stock prices.
    15·1 answer
  • Which is the correct notation to specify the following inheritance?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!