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 f(x) at x = 2, where f(x) = (10^x) / (e^x)?
+
What is the length of the altitude drawn from vertex A in a triangle ABC if AB = 8, AC = 15, and BC = 17?
+
What is the dot product of vector A with elements (2, -3) and vector B with elements (-1, 4)?
+
New questions in Mathematics
2(2+2x)=12
5 people can complete a task in 72 hours. How many people are needed to complete the task in 60 hours.
Find the root of x^4-10x^ 5=0 using Newton's method, with a precision of the smallest positive root.
9b^2-6b-5
Answer the following questions regarding the expression below. 0.1 (a) Write the number as a fraction.
To celebrate the five-year anniversary of a consultancy specializing in information technology, the administrator decided to draw 3 different qualification courses among its 10 employees. Considering that the same employee cannot be drawn more than once, the total number of different ways of drawing among employees is:
If you randomly selected one person from the 900 subjects in this study, what is the probability that the person exhibits the minimum BMI?
78 percent to a decimal
I want you to solve this problem as a grade sixth pupil in primary school: 8 Pigs ate 6 bags of fee in 20 days. How long will it take 10 pigs to eat 15 bags of feed eating at the same rate?
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.
In a order to compare the means of two populations, independent random samples of 410 observations are selected from each population, with Sample 1 the results found in the table to the right. Complete parts a through e below. X1 = 5,319 S1= 143 a. Use a 95% confidence interval to estimate the difference between the population means (H - H2) Interpret the contidence interval. The contidence interval IS (Round to one decimal place as needed.) Sample 2 X2 = 5,285 S2 = 198 Aa. Use a 95% confidence interval to estimate the difference between the population means (A1 - M2) Interpret the contidence interval. The contidence interval Is (Round to one decimal place as needed.) b. Test the null hypothesis Ho versus alternative hypothesis Ha (H What is the test statistic? H2) + Give the significance level of the test, and interpret the result. Use a = 0.05. Z=
From 1975 through 2020 the mean annual gain of the Dow Jones Industrial Average was 652. A random sample of 34 years is selected from this population. What is the probability that the mean gain for the sample was between 400 and 800? Assume the standard deviation is 1539
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
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.
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?
How much does 7.2 moles of ammonium dichromate weigh? (NH4)2Cr2O7
16-(x²+x+2)²
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 ?)
(3b)⋅(5b^2)⋅(6b^3)
An invoice for €2,880 plus default interest of €48.40 was paid on October 28th. Interest rate 5.5%. When was the bill due?