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)
Question: What is 3/4 of 120 expressed as a decimal?
+
Math question: Find the derivative of f(x) = 3sin(x) + 2cos(x) using the differentiation rules for trigonometric functions.
+
How many containers of 25L capacity are needed to store 375L of water?
+
New questions in Mathematics
How much volume of water in MegaLiters (ML) is required to irrigate 30 Hectare crop area with depth of 20mm?
Let 𝑢 = 𝑓(𝑥, 𝑦) = (𝑒^𝑥)𝑠𝑒𝑛(3𝑦). Check if 9((𝜕^2) u / 𝜕(𝑥^2)) +((𝜕^2) 𝑢 / 𝜕(𝑦^2)) = 0
If we have the sequence: 3, 6, 12, 24 Please determine the 14th term.
Let the vectors be u=(-1,0,2) , v=(0,2,-3) , w=(2,2,3) Calculate the following expressions a)<u,w> b) &lt;2u- 5v,3w&gt;
8x²-30x-10x²+70x=-30x+10x²-20x²
Eight acts are scheduled to perform in a variety show how many different ways are there to schedule their appearances show your work
5) A family with a father, mother and 3 children must sit on five chairs in a row and the only restriction is that the mother must be at one end. In how many different ways can they be seated?
A client did not advance L 10,000 for the rental of a parking area and it corresponds to 4 months, of which 2 months were consumed
Determine the absolute extrema of the function 𝑓(𝑥)=𝑥3−18𝑥2 96𝑥 , on the interval [1,10]
what is the annual rate on ​$525 at 0.046​% per day for 3 months?
7/6-(-1/9)
Identify a pattern in the list of numbers.Then use this pattern to find the next number. 37,31,25,19,13
By direct proof, how can you prove that “The sum of any three consecutive even integers is always a multiple of 6”.
I need to know what 20% or £3292.75
The sum of two numbers is 144. Double the first number minus thrice the second number is equal to 63. Determine the first two numbers.
In the telephone exchange of a certain university, calls come in at a rate of 5 every 2 minutes. Assuming a Poisson distribution, the average number of calls per second is: a) 1/8 b) 1/12 c) 1/10 d) 2/5 e) 1/24
I. Order to add 40.25+1.31+.45 what is the first action to do ?
1. A jeweler has two gold bars, with 80% purity and the other with 95% purity. How much of each must be melted to obtain a 5 kilo ingot with 86% purity?
To find the increased amount on a standard term deposit with the following conditions: starting amount: BGN 13000, type of deposit: annual, annual compound interest rate: 1.4%, after 4 years;
the length of the fenced in area is to be 5 ft greater than the width and the total amount of fencing to be used is 89 ft find the width and length