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)
Math Question: What is the smallest positive integer solution for the equation x^n + y^n = z^n where n > 2, according to Fermat’s Theorem?
+
What is the equation of an ellipse with a major axis of length 10 and a minor axis of length 6? (Format: x²/a² + y²/b² = 1)
+
What are the x and y components of a unit vector that makes an angle of 45 degrees with the positive x-axis?
+
New questions in Mathematics
A sample is chosen from a population with y = 46, and a treatment is then administered to the sample. After treatment, the sample mean is M = 47 with a sample variance of s2 = 16. Based on this information, what is the value of Cohen's d?
Karina has a plot of 5,000 square meters in which she has decided that 60% of it will be used to plant vegetables. Of this part, 12% will be dedicated to planting lettuce. How much surface area of the plot will be used for cultivation?
A, B, C and D are numbers; If ABCD = 23, What is the result of ABCD BCDA CDAB DABC operation?
is the x element (180,270), if tanx-3cotx=2, sinx ?
12(3+7)-5
I need to know what 20% or £3292.75
Lim x → 0 (2x ^ 3 - 10x ^ 7) / 5 * x ^ 3 - 4x )=2
Raúl, Gilberto and Arturo are playing golf; The probabilities of winning for each one are as follows: (Raúl wins) = 20% (Gilberto wins) = 0.05% (Arturo wins) = ¾%. Perform operations and order events from least to most probable.
reduce the expression (7.5x 12)÷0.3
Let A, B, C and D be sets such that | A| = |C| and |B| = |D|. Prove that |A × B| = |C × D|
DuocUC 2) The cost C, in pesos, for the production of x meters of a certain fabric can be calculated through the function: (x+185) C(x)=81300-6x+ 20000 a) It is known that C(90) 5.344. Interpret this result. (2 points) b) Calculate C'(x) (2 points) 3 x²+111x-0.87 20000 2000 c) Function C calculates the cost while producing a maximum of 500 meters of fabric. Determine the values of x at which the cost of production is increasing and the values of x at which the cost is decreasing. (3 points) d) If a maximum of 500 meters of fabric are produced, what is the minimum production cost? (
A Smooth Plane is listed for $195.00. Discounts of 12% and 10% are allowed. If the customer pays cash within 30 days, an additional discount of 3% is granted. What is the cost if a carpenter takes advantage of all the discounts offered?
Buffalo Company makes and sells shampoo. Each unit requires $1.40 labor costs, material costs per unit are $0.90 and other variable costs are $0.30. It sells shampoo for $4.45 to retailers. Fixed costs are $15,000. It sold 25,000 units in the current month. What is the Break-Even point in units? What is the Break-Even point in dollars? What is the contribution margin of Buffalo Company?
Given the word WEIRD, determine a four-letter offspring that can be formed with the letters of the word written above
7- A printing company found in its investigations that there were an average of 6 errors in 150-page prints. Based on this information, what is the probability of there being 48 errors in a 1200-page job?
Find the equation of a straight line that has slope 3 and passes through the point of (1, 7) . Write the equation of the line in general forms
Given a circle 𝑘(𝑆; 𝑟 = 4 𝑐𝑚) and a line |𝐴𝐵| = 2 𝑐𝑚. Determine and construct the set of all centers of circles that touch circle 𝑘 and have radius 𝑟 = |𝐴𝐵|
1. The cost to transport 250 packages of cement 120 kilometers is $600. What will be the cost to transport 500 packages 300 kilometers?
If the area of a circle is 75.7ft2, what is the radius? Give the answer in metres. Round answer to 2 decimal places and enter the units.
A gas is leaking at 3.5ft3/min in a room of 2.9m by 6.9ft by 15.7m. How long would it take (in seconds) for 22% of the room to reach the LFL, if the gas has a LFL of 2.51%?