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 speed of a car traveling 100 miles in 2 hours?
+
Math Question: What is the value of f(x) = 3x^2 - 2x - 4 when x = 5?
+
What is the limit as x approaches 0 of (3x^2 + 5x - 2) / (4x^2 - 7x) ?
+
New questions in Mathematics
calculate the derivative by the limit definition: f(x) = 6x^3 + 2
8x-(5-x)
58+861-87
*Question!!* *Victory saved 3,000 in first bank and 2,000 Naira in union bank PSC with interest rate of X% and Y% per annual respectively his total interest in one year is #640. If she has saved 2,000 naira with first bank and 3,000 naira in union bank for same period she would have made extra 20# as additional interest, then find the value of X and Y
132133333-33
how many arrangement can be made of 4 letters chosen from the 8 letters of the world ABBSOLUTE
Desarrolla (2x)(3y + 2x)5
A merchant can sell 20 electric shavers a day at a price of 25 each, but he can sell 30 if he sets a price of 20 for each electric shaver. Determine the demand equation, assuming it is linear. Consider (P= price, X= quantity demanded)
12(3+7)-5
Solve the equation: sin(2x) = 0.35 Where 0° ≤ x ≤ 360°. Give your answers to 1 d.p.
Solve equations by equalization method X-8=-2y 2x+y=7
Sabendo+que+o+tri%C3%A2ngulo+ABC+%C3%A9+ret%C3%A2ngulo+e+que+um+de+seus+%C3%A2ngulos+mede+30+quanto+mede+o+terceiro+ tri%C3%A2ngulo
A hardware bill totals $857.63 with discounts of 5% and 3%. What is the net cost of the Material ?
In a 24 hours period, the average number of boats arriving at a port is 10. Assuming that boats arrive at a random rate that is the same for all subintervals of equal length (i.e. the probability of a boat arriving during a 1 hour period the same for every 1 hour period no matter what). Calculate the probability that more than 1 boat will arrive during a 1 hour period. (P(X>1) ) Give your answers to 4 decimal places and in a range between 0 and 1
Find the zero of the linear function 8x + 24 = 0
A post office has three categories of letters: 60% are from businesses, 30% are individual mail, and the remaining 10% are government mail. 5% of the letters from businesses have address errors, 10% of the individual mail has address errors, while 1% of the government mail has address errors. If we receive a letter with an address error, what is the probability that it is individual mail?"
The average weekly earnings in the leisure and hospitality industry group for a re‐ cent year was $273. A random sample of 40 workers showed weekly average ear‐ nings of $285 with the population standard deviation equal to 58. At the 0.05 level of significance can it be concluded that the mean differs from $273? Find a 95% con‐ fidence interval for the weekly earnings and show that it supports the results of the hypothesis test.
The slope of the tangent line to the curve f(x)=4tan x at the point (π/4,4)
draw the condensed formula fpr 3,3,4 triethylnonane
Sin(5pi/3)