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 standard deviation of the set: {4, 7, 9, 11, 15}?
+
What is the value of sin(π/3) - cot(π/6) - cosec(3π/4)?
+
What is the measure of an angle bisector if one of the angle's measures is 50 degrees?
+
New questions in Mathematics
Calculate to represent the function whose graph is a line that passes through the points (1,2) and (−3,4). What is your slope?
A particular employee arrives at work sometime between 8:00 a.m. and 8:40 a.m. Based on past experience the company has determined that the employee is equally likely to arrive at any time between 8:00 a.m. and 8:40 a.m. Find the probability that the employee will arrive between 8:05 a.m. and 8:30 a.m. Round your answer to four decimal places, if necessary.
find the value of the tangent if it is known that the cos@= 1 2 and the sine is negative. must perform procedures.
The gross domestic product the gdp for the United States in 2017 was approximately $2.05x10^3. If you wrote this number in standard notation , it would be 205 followed by how many zeros
The random variable Y is defined as the sum between two different integers selected at random between -4 and 2 (both included). What are the possible values of the random variable Y? What is the value of P(Y=-3)? And whether it is less than or equal to -5?
What’s 20% of 125?
Solve this mathematical problem if 3/5 of a roll of tape measures 2m. How long is the complete roll? Draw the diagram
There are four times as many roses as tulips in Claire’s garden. Claire picked half of the number of roses and 140 roses were left in the garden. How many roses and tulips were in the Garden the first?
According to a survey in a country 27% of adults do not own a credit card suppose a simple random sample of 800 adults is obtained . Describe the sampling distribution of P hat , the sample proportion of adults who do not own a credit card
You mix a powder drug with a 4.5ml of liquid to get a reconstituted solution with a concentration of 250mg/ml. The prescribers order is for 500 mg . You will give what ml of the reconstituted solution
Find all real numbers x that satisfy the equation \sqrt{x^2-2}=\sqrt{3-x}
. What will be the osmotic pressure of a solution that was prepared at 91°F by dissolving 534 grams of aluminum hydroxide in enough water to generate 2.784 ml of solution.
The volume of a cube decreases at a rate of 10 m3/s. Find the rate at which the side of the cube changes when the side of the cube is 2 m.
Which statement best describes the key changes in perspectives on inclusion? An inclusive program must consider the unique experiences of every child and family as well as the child's strengths and needs. There is a shift in thinking about individual programs as "inclusive programs" to thinking about inclusion as something that reflects the cultural influence of the family. There is a greater emphasis on barriers to full participation and the acknowledgement that all children are unique and must be fully and meaningfully engaged in a program. In an inclusive program all participants are accepted by their peers and other members of the community.
A natural gas company has a fixed rate of 1,320 pesos plus 1,590 pesos per cubic meter of gas consumed monthly per customer. Indicate the cost function to determine the value in pesos of the cubic meters of gas consumed in a month per customer. How much did a customer who consumed 18 cubic meters of gas pay? If a customer paid 34,710 pesos, how many cubic meters of gas did he consume?
Write an expression using compatible numbers that can be used to estimate the quotient 629\86
How many cards do you expect to pull from a poker deck until you get an ACE?
What is the percentage of nitrogen abundance in copper dinatrate Cu(NO3)2
calculate the product of 4 and 1/8
A small box measures 10 in. by 4 in. by 6 in. high. Find the volume of the box.