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 √(16+9) - √(16-9) + √(16×9) ÷ √(16÷9)?
+
What is the value of sinh(2) - cosh(3) + tanh(0.5)?
+
What is the measure in degrees of an angle that is π/3 radians?
+
New questions in Mathematics
I want to divide R$ 2200.00 between Antônio, Beto and Cássia, so that Beto receives half from Antônio and Cássia receives a third of Beto. Under these conditions, how much more will Beto receive than Cássia?
the value of sin 178°58&#39;
A car that starts from rest moves for 11 min, reaching a speed of 135 km/h, calculate the acceleration it had
3x+5y=11 2x-3y=1
The ratio of tomatoes to red apples is 2:5. If there are 20 tomaoes in the garden, how many red apples are there?
v Is the following statement a biconditional? If Shannon is watching a Tigers game, then it is on television.
2x+4x=
Nice's central library building is considered one of the most original in the world, as it is a mix between a sculpture and a work of habitable architecture. It was called La Tête Carrée and is made up of part of a bust that supports a cube divided into five floors. It is known that the building has a total height of approximately 30 meters. It admits that the cubic part of the sculpture is parallel to the floor and has a volume of 2744 meters3 Calculate, in meters, the height of the bust that supports the cube. Displays all the calculations you made.
89, ÷ 10
Use a pattern to prove that (-2)-(-3)=1
Find the center coordinates and radius of a circle for an equation written as: 3x2 + 3y2 - 6y = —12× + 24
Professor Vélez has withdrawn 40 monthly payments of $3,275 from her investment account. If the investment account yields 4% convertible monthly, how much did you have in your investment account one month before making the first withdrawal? (Since you started making withdrawals you have not made any deposits.)
ind the z-score for which 72% of the distribution's area lies between -z and z. -1.7417, 1.7417 -1.1538, 1.1538 -1.0803, 1.0803 -2.826, 2.826
Take the limit of (sin(x-4))/(tan(x^2 - 16) as x approaches 4.
The business college computing center wants to determine the proportion of business students who have personal computers (PC's) at home. If the proportion is greater than 35%, then the lab will modify a proposed enlargement of its facilities. Suppose a hypothesis test is conducted and the test statistic is z= 2.6. Find the P-value for this test.
If the mean of the following numbers is 17, find the c value. Produce an algebraic solution. Guess and check is unacceptable. 12, 18, 21, c, 13
calculate the product of 4 and 1/8
Solve the system of equations by the addition method. 0.01x-0.08y=-0.1 0.2x+0.6y=0.2
Suppose a car license plate consists of 2 letters and two digits of which the first cannot be zero. How many different plates can be engraved? consider only 26 letters and 10 digits draw an example of this.
A plant found at the bottom of a lake doubles in size every 10 days. Yeah It is known that in 300 days it has covered the entire lake, indicate how many days it will take to cover the entire lake four similar plants.