Question

Ccreate java code using methods for: Liberty is carrying out a sales campaign among its preferred clients to whom it offers the following internet package options: Internet only for $30. Internet and Cable for $50. Internet, Cable and 3 "Premium" channel packages for $75. When the client is registering, they are asked about the desired package, if they have any previous services, and if so, a 10% discount is applied to the amount. If you have a previous service and are months in arrears, a 13% tax is applied for each month in arrears. Develop a program that requests the data of the tooth to be registered and allows the selected package to be registered, if it has previous services and shows the amount to be paid per month in the rental of the service.

234

likes
1170 views

Answer to a math question Ccreate java code using methods for: Liberty is carrying out a sales campaign among its preferred clients to whom it offers the following internet package options: Internet only for $30. Internet and Cable for $50. Internet, Cable and 3 "Premium" channel packages for $75. When the client is registering, they are asked about the desired package, if they have any previous services, and if so, a 10% discount is applied to the amount. If you have a previous service and are months in arrears, a 13% tax is applied for each month in arrears. Develop a program that requests the data of the tooth to be registered and allows the selected package to be registered, if it has previous services and shows the amount to be paid per month in the rental of the service.

Expert avatar
Gene
4.5
108 Answers
importar java.util.Scanner; clase pública LibertySalesCampaign { // Constantes para precios de paquetes doble final estático privado INTERNET_ONLY = 30.0; doble final estático privado INTERNET_CABLE = 50.0; doble final estático privado INTERNET_CABLE_PREMIUM = 75.0; // objeto escáner para entrada escáner de escáner estático privado = nuevo escáner (System.in); público estático vacío principal (String [] argumentos) { System.out.println("Bienvenido a la campaña de ventas de Liberty"); // Obtener la elección del paquete por parte del usuario System.out.println("Seleccione su paquete:"); System.out.println("1 - Sólo Internet ($30)"); System.out.println("2 - Internet y cable ($50)"); System.out.println("3 - Internet, Cable y 3 canales Premium ($75)"); int eleccióndelpaquete = scanner.nextInt(); // Obtener información sobre servicios anteriores System.out.println("¿Tiene algún servicio previo con nosotros? (sí/no)"); boolean hasPreviousServices = scanner.next().equalsIgnoreCase("sí"); double Preciobase = getPackagePrice(packageChoice); si (tieneServiciosPrevios) { System.out.println("¿Está usted en mora? (sí/no)"); boolean inArrears = scanner.next().equalsIgnoreCase("sí"); int meses en atraso = 0; si (en mora) { System.out.println("¿Cuántos meses tienes de atraso?"); mesesAtrasados = scanner.nextInt(); } Preciobase = calcularPrecioFinal(Preciobase, verdadero, mesesAtrasados); } demás { Preciobase = calcularPrecioFinal(Preciobase, falso, 0); } System.out.println("El monto total a pagar por mes es: $" + String.format("%.2f", basePrice)); } getPackagePrice doble estático privado (elección int) { cambiar (elección) { caso 1: devolver INTERNET_ONLY; caso 2: devolver INTERNET_CABLE; caso 3: devolver INTERNET_CABLE_PREMIUM; por defecto: System.out.println("Elección no válida. El valor predeterminado es Sólo Internet."); devolver INTERNET_ONLY; } } cálculo doble estático privadoPrecioFinal(preciobasedoble, booleano tieneServiciosPrevios, int mesesAtrasados) { double Precio final = Precio base; si (tieneServiciosPrevios) { Precio final *= 0,90; // Aplicar 10% de descuento si (meses atrasados > 0) { for (int i = 0; i < meses en atrasos; i++) { Precio final *= 1,13; // Aplicar 13% de impuesto por mes vencido } } } devolver precio final; } }

Frequently asked questions (FAQs)
What is the maximum value of the function f(x) = x^2 - 2x + 3 in the interval [-4, 4]?
+
Question: Find the absolute extrema of the function f(x) = x^3 + 6x^2 - 15x on the interval [-2, 2].
+
Math Question: In a right triangle, if one acute angle measures 35° and the hypotenuse is 10 units long, find the length of the leg adjacent to the 35° angle.
+
New questions in Mathematics
Calculate to represent the function whose graph is a line that passes through the points (1,2) and (−3,4). What is your slope?
A normal random variable x has a mean of 50 and a standard deviation of 10. Would it be unusual to see the value x = 0? Explain your answer.
8x²-30x-10x²+70x=-30x+10x²-20x²
a ferry travels 1/6 of the distance between two ports in 3/7 hour. The ferry travels at a constant rate. At this rate, what fraction of the distance between the two ports can the ferry travel in one hour.
5(4x+3)=75
(m²-121)
4X^2 25
Margin of error E=0.30 populations standard deviation =2.5. Population means with 95% confidence. What I the required sample size (round up to the whole number)
The actual length of an object is 1.3 m . If the blueprint uses a scale of 1 : 12 , what is the length of the line on the drawing?
(-5/6)-(-5/4)
Credit title that represents a payment order. This model, which emerged in Brazil, can only be issued in two specific situations: in the purchase and sale of commercial products or in the provision of services. Select the correct alternative: Question 6Answer The. Present value B. Promissory note w. Present value d. Duplicate It is. Bill of exchange
(5y 9)-(y 7)
A mutual fund manager has a $350 million portfolio with a beta of 1.10. The risk-free rate is 3.5%, and the market risk premium is 6.00%. The manager expects to receive an additional $150 million which she plans to invest in several different stocks. After investing the additional funds, she wants to reduce the portfolio’s risk level so that once the additional funds are invested the portfolio’s required return will be 9.20%. What must the average beta of the new stocks added to the portfolio be (not the new portfolio’s beta) to achieve the desired required rate of return?
The simple average of 15 , 30 , 40 , and 45 is
The population of Pittsburgh, Pennsylvania, fell from 520,117 in 1970 to 305,704 in 2010. Write an exponential function P(t) modeling the population t years after 1970. Round the growth factor to the nearest tem thousandth.
A contractor gives a bank note for $10250 at a rate of 1% for one month. How much interest is charged for 4 months?
Calculate NPV, IRR and PAYBACK through a cash flow for a period of five years, with discount rate of: a) 10% b) 12% c) 15% initial annual cost $41,400,000
A 20-year old hopes to retire by age 65. To help with future expenses, they invest $6 500 today at an interest rate of 6.4% compounded annually. At age 65, what is the difference between the exact accumulated value and the approximate accumulated value (using the Rule of 72)?
The length of a rectangle is five more than its width. if the perimeter is 120, find both the length and the width.
97,210 ➗ 82 division