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 value of 3 to the power of 4 multiplied by the square root of 16, all divided by 2?
+
What is the probability of selecting a diamond from a standard deck of 52 cards?
+
What is the value of x if 2(x + 3) = 14?
+
New questions in Mathematics
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.
Solution to the equation y&#39;&#39; - y&#39; - 6y = 0
-11+29-18
what is 3% of 105?
3(4x-1)-2(x+3)=7(x-1)+2
What will be the density of a fluid whose volume is 130 cubic meters contains 16 technical units of mass? If required Consider g=10 m/s2
9b^2-6b-5
Emma is on a 50 m high bridge and sees two boats anchored below. From her position, boat A has a bearing of 230° and boat B has a bearing of 120°. Emma estimates the angles of depression to be about 38° for boat A and 35° for boat B. How far apart are the boats to the nearest meter?
determine the polynomial F of degree 2 that interpolates. f at points (0;1) (2;5) (4;6). calculate F(0.8). Note: Using the polynomial expression with difference operator.
The ninth term of a given geometric progression, with reason q , is 1792, and its fourth term is 56. Thus, calculate the fourth term of another geometric progression, whose ratio is q +1 and whose first term is equal to the first term of the first P.G. described.
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!
Find the zero of the linear function 8x + 24 = 0
A natural gas company has a fixed rate of 1,320 pesos plus 1,590 pesos per cubic meter of gas consumed monthly per customer. Indicate the cost function to determine the value in pesos of the cubic meters of gas consumed in a month per customer. How much did a customer who consumed 18 cubic meters of gas pay? If a customer paid 34,710 pesos, how many cubic meters of gas did he consume?
Find the area of a triangle ABC when m<C = 14 degrees, a = 5.7 miles, and b = 9.3 miles.
Solve for B write your answer as a fraction or as a whole number. B-1/7=4
2+2020202
did an analysis of dropout from the nursing faculty at the Universidad Veracruzana. With a poblation of 122 students, it turned out that according to the gender data, the female sex predominates with 82%, and the male sex male is found with 12%. The main factors why students drop out are, first of all, "Not "re-enrolled" at 49%, second place "Personal reasons" at 20%, third place "change of school" in 11%, "lack of documents" and "economic reasons" in 7%, change of residence and lack of social service in 3%. Of this sample, how many students dropped out for other reasons?
Find the orthogonal projection of a point A = (1, 2, -1) onto a line passing through the points Pi = (0, 1, 1) and P2 = (1, 2, 3).
x(squared) -8x=0
To apply a diagnostic test, in how many ways can 14 students be chosen out of 25? if the order does not matter