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)
How does the rate of growth compare between f(x) = 10^x and f(x) = e^x as x increases?
+
What is the standard deviation of the data set {12, 15, 17, 20, 22}?
+
What is the value of (2^3 * 2^4) / (2^2) ?
+
New questions in Mathematics
-442/c+5=26 what is c?
two pails of different sizes contain 34.5 litres of water altogether When 0.68 litre of water is poured from the bigger pail into the smaller pail the amount of water in the bigger pail is 9 times that in the smaller pail. How much water was in the smaller pail at first?
The length and breadth of my rectangular vegetable garden is 12,5m and 7,25m respectively. What is the perimeter of the garden?
Elliot opened a savings account and deposited $5000.00 as principal. The account earns 4% interest, compounded annually. How much interest will he earn after 5 years? Round your answer to the nearest cent.
Log(45)
What is the appropriate measurement for the weight of an African elephant?
∫ √9x + 1 dx
19) If the temperature of -8°C decreases by 12°C, how much will it be? a)-20°C -4°C c) 4°C d) 20°C
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? (
Quadratic equation 2X = 15/X + 7
A popular cell phone family plan provides 1500 minutes. It charges 89.99/month for the first 2 lines and 9.99 for every line after that. Unlimited text messages for all phone lines costs $30.00/month, and Internet costs $10.00/month per phone line. If a family with a $200 monthly budget buys this plan and signs up for unlimited text messaging and Internet on each phone line, how many cell phone lines can they afford? Use an inequality to solve this problem. Graph your solution on the number line and explain the meaning of your graph in a sentence.
2X+2=8
What js the greatest 4-digit even number that can be formed by 3,6,1,4?
16-(x²+x+2)²
The slope of the tangent line to the curve f(x)=4tan x at the point (π/4,4)
The perimeter of a rectangular rug is 42 feet. The width is 9 feet. What is the length?
5a-3.(a-7)=-3
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.
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 ?)
The domain of the function f(x)=x+7x2−144 is (−∞,), ( ,), and ( , ∞).