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 the cube root function evaluated at x = 8? (
+
Math question: Write the equation of an ellipse with a horizontal major axis, a center at (2, -3), a major axis length of 8 units, and a minor axis length of 4 units.
+
What is the derivative of sin(2x) + 3cos(5x) - tan(4x) - sec(3x)?
+
New questions in Mathematics
Convert the following function from standard form to vertex form f(x) = x^2 + 7x - 1
Solve: −3(−2x+23)+12=6(−4x+9)+9.
the value of sin 178°58&#39;
What is the amount of interest of 75,000 at 3.45% per year, at the end of 12 years and 6 months?
I need .23 turned into a fraction
Consider numbers from 1 to 2023. We delete 3 consecutive numbers so, that the avarage of the left numbers is a whole number
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 ?
The beta of a company is 1.51 while its financial leverage is 27%. What is then its unlevered beta if the corporate tax rate is 40%? (4 decimal places)
Perpetual annuities are a series of payments whose duration has no end. Explain how can we calculate them, if they have no end?
What is the appropriate measurement for the weight of an African elephant?
Suppose you have a sample of 100 values from a population with mean mu = 500 and standard deviation sigma = 80. Given that P(z < −1.25) = 0.10565 and P(z < 1.25) = 0.89435, the probability that the sample mean is in the interval (490, 510) is: A)78.87% B)89.44% C)10.57% D)68.27%
sin 30
In a laboratory test, it was found that a certain culture of bacteria develops in a favorable environment, doubling its population every 2 hours. The test started with a population of 100 bacteria. After six hours, it is estimated that the number of bacteria will be:
Congratulations, you have saved well and are ready to begin your retirement. If you have $1,750,000.00 saved for your retirement and want it to last for 40 years, and will earn 10.8% compounded monthly: What is the amount of the monthly distribuion? 216.50 How much interest is earned in retirement?
Let x be an integer. Prove that x^2 is even if and only if is divisible by 4.
16.What payment (deposit) made at the end of each month will accumulate to $10473 in 13 years at 7.9% compounded monthly? Enter to the nearest cent (two decimals). Do not use $ signs or commas in the answer.
A multiple choice exam is made up of 10 questions; Each question has 5 options and only one of them is correct. If a person answers at random, what is the probability of answering only 3 good questions?
The mass of 120 molecules of X2C4 is 9127.2 amu. Identify the unknown atom, X, by finding the atomic mass. The atomic mass of C is 12.01 amu/atom
X^X =49 X=?
Find the set of points formed by the expression 𝜋<|𝑧−4+2𝑖|<3𝜋.