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 measure in degrees of an angle that is
+
Math question: What is the derivative of the function f(x) = 3x^4 + 2x^3 - 5x^2 + 7x - 1?
+
Question: Determine the period and amplitude of the cosine function f(x) = cos x. What are the x-intercepts and the maximum value of f(x)?
+
New questions in Mathematics
a to the power of 2 minus 16 over a plus 4, what is the result?
calculate the following vector based on its base vectors a= -18i,26j
A brass cube with an edge of 3 cm at 40 °C increased its volume to 27.12 cm3. What is the final temperature that achieves this increase?
The bus one way of the road which is 10km is heading with speed of 20km/h ,then the bus the other 10km is heading with speed of 60km/h. The middle speed of the road is it equal with arithmetic speed of the v1 and v2 ?
A bird randomly chooses to land on 1 of 12 perches available in its aviary. Determine the Probability of it landing on a perch numbered 8 and then on a perch marked with a prime number; take into account that he never lands on the same perch in the sequence.
9b^2-6b-5
In a store, a person carries 14 kilos of rice and 28 kilos of flour. In what ratio are the kilos found? (Remember to simplify until you reach an irreducible fraction)
Let f(x) = x² − 1. Find the equation of the tangent line to the graph of f at the point x0 = 2.
The sum of two numbers is equal to 58 and the largest exceeds by at least 12. Find the two numbers
solve for x 50x+ 120 (176-x)= 17340
Determine the reduced equation of the straight line that is perpendicular to the straight line r: y=4x-10 and passes through the origin of the Cartesian plane
The thermal representation f(x) = 20 times 0.8 to the power of x is known from an exponential function f. Specify the intersection point with the y-axis
The physician orders 15mg of tramadol(liquid). On hand is 30mg/2mL vials. How many mL will the MA administer?
1. A pediatric client is prescribed digoxin for congestive heart failure. The dose prescribed is 40 mcg/kg twice daily. The child weighs 33 pounds. What is the dosage in mg to be given per dose? Round to the nearest hundredth. Calculate your answer in mg per dose. Enter numerical value only.____mg
The simple average of 15 , 30 , 40 , and 45 is
Calculate the difference between 407 and 27
Find the number of pounds of nails required for 17850 square feet of drywall if each thousand square feet requires 4.5 pounds of nails.
effectiveness of fiscal and monetary policy under closed and open economies
f(r) = 1/r+9 find f(x^2) + 1
f(x)= 9-x^2 find (f(x+h)-f(x) )/h