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 of the largest angle in an isosceles triangle with base angles measuring 50 degrees each?
+
What is the surface area of a triangular prism with a base length of 6 cm, height of 10 cm, and lateral edge length of 8 cm?
+
Math question: "Graph the equation y = log₃(x - 2) and identify the x-intercept and the asymptote. (
+
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
1/2x +3 <4x-7
4.2x10^_6 convert to standard notation
Two numbers differ by 7, and the sum of their squares is 29. Find the numbers.
A National Solidarity Bond offers A 5 year bond offering a gross return of 15% Calculate the AER for this investment. (Give your answer to two decimal places, no need for the percent or € sign in your answer)
4. Show that if n is any integer, then n^2 3n 5 is an odd integer
There are four times as many roses as tulips in Claire’s garden. Claire picked half of the number of roses and 140 roses were left in the garden. How many roses and tulips were in the Garden the first?
find f(x) for f'(x)=3x+7
User Before the election, a poll of 60 voters found the proportion who support the Green candidate to be 25%. Calculate the 90% confidence interval for the population parameter. (Give your answers as a PERCENTAGE rounded to TWO DECIMAL PLACES: exclude any trailing zeros and DO NOT INSERT THE % SIGN) Give the lower limit of the 90% confidence interval Give the upper limit of the 90% confidence interval
Shows two blocks, masses 4.3 kg and 5.4 kg, being pushed across a frictionless surface by a 22.5-N horizontal force applied to the 4.3-kg block. A. What is the acceleration of the blocks? B. What is the force of the 4.3-kg block on the 5.4 -kg block? C. What is the force of the 5.4 -kg block on the 4.3 -kg block?
User One of the applications of the derivative of a function is its use in Physics, where a function that at every instant t associates the number s(t), this function s is called the clockwise function of the movement. By deriving the time function we obtain the velocity function at time t, denoted by v(t). A body has a time function that determines its position in meters at time t as S(t)=t.³√t+2.t . Present the speed of this body at time t = 8 s.
Find the complement and supplement angles of 73
A contractor gives a bank note for $10250 at a rate of 1% for one month. How much interest is charged for 4 months?
To get to a hotel on the hill you have to travel 6 km of uphill road and every kilometer there are 6 sharp curves. Each of the sharp curves is marked by three traffic signs. How many traffic signs are there on the stretch of road that leads to the arbergi?
A person runs 175 yards per minute write a variable that represents the relationship between time and distance
The mean of 4 numbers is 5 and the mean of 3 different numbers is 12. What is the mean of the 7 numbers together? Produce an algebraic solution. Guess and check is acceptable.
2x-4=8
Determine the general solution of the equation y′+y=e−x .
Find the rule that connects the first number to the second number of each pair. Apply the rule to find the missing number in the third pair. (18 is to 22) (54 is to 26) (9 is to ?)
5 1/9 + 2 2/3