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 sin(@π/6) in the Trigonometric table?
+
What is 0.72 expressed as a percentage?
+
What is the vertex of the parabola y = 2x² + 3x + 1?
+
New questions in Mathematics
5 . {2/5 + [ (8/-9) - (1/-7) + (-2/5) ] ÷ (2/-5)} . 8/15
A hotel in the Algarve had to offer 1 week of vacation to one of its employees as an Easter gift in a random choice. It is known that 80 people work in this hotel unit, 41 of whom are Portuguese and 39 are foreign nationals. There are 14 Portuguese men and 23 foreign women. Using what you know about conditional probability, check the probability that the gift was offered to a Portuguese citizen, knowing that it was a woman.
STUDENTS IN A CLASS LEARN ONLY ONE FOREIGN LANGUAGE. two-sevenths of the students learn German, half of the students learn Spanish, and the remaining six students learn Italian. what is the number of students in this class? detail your reasoning carefully.
Calculate the equation of the tangent line ay=sin(x) cos⁡(x)en x=π/2
Divide 22 by 5 solve it by array and an area model
How many different ways can a psychology student select 5 subjects from a pool of 20 subjects and assign each one to a different experiment?
-27=-7u 5(u-3)
Determine the minimum degree that an algebraic equation can assume knowing that it admits 2 as a double root and -i as a triple root
Calculate the minimum size of a simple random sample assuming a sampling error of 5% assuming that the population size is 100 elements
There are 3 orchards, a, b and c. Orchard a has 60 fewer trees than orchard b orchard c has 3 times as many trees as orchard b. If the three orchards have 430 trees altogether, how many trees does orchard c have?
Use a pattern approach to explain why (-2)(-3)=6
9 x² + 2x + 1 = 0
9.25=2pi r solve for r
A car travels 211 miles on 15 gallons of gasoline. The best estimate of the car’s miles per gallon is?
How to factorise 5y^2 -7y -52
In poker, a full house consists of five cards, where two of the cards have the same number (or letter) and the remaining three also have the same number (or letter) as each other (but not as the previous two cards). Use a search engine or Wikipedia to understand the concept better if necessary. In how many different ways can one obtain a full house?
Find the vertex F(x)=x^2-10x
The average weekly earnings in the leisure and hospitality industry group for a re‐ cent year was $273. A random sample of 40 workers showed weekly average ear‐ nings of $285 with the population standard deviation equal to 58. At the 0.05 level of significance can it be concluded that the mean differs from $273? Find a 95% con‐ fidence interval for the weekly earnings and show that it supports the results of the hypothesis test.
To paint a 250 m wall, a number of workers were employed. If the wall were 30 m longer, 9 more workers would be needed. How many were employed at the beginning?
Kayla started a book club at her school. The number of girls in the book club was one more than twice the number of boys. If there are 15 girls in the book club, how many boys are in the club?