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 domain of the trigonometric function f(x) = sin(x) + cos(x) in the interval [0, 2π]?
+
What is the formula for the area of a circle, given its radius?
+
Question: "Factorize the expression 3x^2 + 9x - 18 using the distributive property.
+
New questions in Mathematics
Find 2 numbers that the sum of 1/3 of the first plus 1/5 of the second will be equal to 13 and that if you multiply the first by 5 and the second by 7 you get 247 as the sum of the two products with replacement solution
If we have the sequence: 3, 6, 12, 24 Please determine the 14th term.
the value of sin 178°58&#39;
What payment 7 months from now would be equivalent in value to a $3,300 payment due 23 months from now? The value of money is 2.7% simple interest. Round your answer to 2 decimal places. Show all work and how you arrive at the answer..
B - (-4)=10
Analyze the following situation Juan is starting a new business, he indicates that the price of his product corresponds to p=6000−4x , where x represent the number of tons produced and sold and p It is given in dollars. According to the previous information, what is the maximum income that Juan can obtain with his new product?
Convert 78 percent to a decimal
prove that if n odd integer then n^2+5 is even
Let r: x - y 5 = 0. Determine a general equation of the line s parallel to the line r, which forms an isosceles triangle with area 8 with the line x = 5 and the Ox axis.
The average number of babies born at a hospital is 6 per hour. What is the probability that three babies are born during a particular 1 hour period?
Solve : 15/16 divide 12/8 =x/y
show step by step simplification: (¬𝑑∨((¬b∧c)∨(b∧¬c)))∧((𝑎 ∧ 𝑏) ∨ (¬𝑎 ∧ ¬𝑏))∧(¬𝑐∨((¬𝑑∧𝑎)∨(𝑑∧¬𝑎)))
The two sides of the triangle are 12 cm and 5 cm, and the angle between the sides is 60°. Cover the area of ​​the triangle!
Your grandfather has run a small high street pharmacy for 40 years. After much persuasion, he has agreed to open a digital store online. List 5 potential ways to improve sales and/or margins by having a digital pharmacy through the utilisation of historic or new sales data.
36 cars of the same model that were sold in a dealership, and the number of days that each one remained in the dealership yard before being sold is determined. The sample average is 9.75 days, with a sample standard deviation of 2, 39 days. Construct a 95% confidence interval for the population mean number of days that a car remains on the dealership's forecourt
Total Users with an active Wise account = Total Active Users + Total Users who haven’t transacted Total Active Users = Total MCA Users + Total Send Users = Total New Users + Retained Users Total New Users = New Send Users + New MCA Users Total MCA Users = New MCA Users + Retained Users who transacted this month via MCA Total Send Users = New Send Users + Retained Users who transacted this month via Send Send CR = Total Send Users / Total Users with an active Wise account MCA CR = Total MCA Users / Total Users with an active Wise account New Send CR = New Send Users / New Profiles Created in Month New MCA CR = New MCA Users / New Profiles Created in Month We have recently witnessed a drop in MCA conversion, but send user conversion is stable, can you help explain why?
What is the total amount due and the amount of interest on a 3-year loan of $1,000 at a simple interest rate of 12% per year?
Consider the function f(x)=1/2(x+1)^2-3. Use the preceding/following interval method to estimate the instantaneous rate of change at 𝑥 = 1.
if y=1/w^2 yw=2-x; find dy/dx
97,210 ➗ 82 division