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
107 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)
Math question: In how many ways can a committee of 4 members be selected from a group of 10 people?
+
What is the length of the hypotenuse of a right triangle with legs measuring 4 cm and 9 cm?
+
What is the equation of a parabola with a vertex at (2, 4) and a vertical stretch factor of 3?
+
New questions in Mathematics
If we have the sequence: 3, 6, 12, 24 Please determine the 14th term.
Solution to the equation y&#39;&#39; - y&#39; - 6y = 0
2+2
Additionally, the boss asked Armando to determine how many toy sales branches he would have in the fifteenth year, knowing that the first year they started with two branches, by the second they already had 5 branches and, by the third year, they had 8 branches. From the above, determine the number of branches it will have for the fifteenth year.
You are planning to buy a car worth $20,000. Which of the two deals described below would you choose, both with a 48-month term? (NB: estimate the monthly payment of each offer). i) the dealer offers to take 10% off the price, then lend you the balance at an annual percentage rate (APR) of 9%, monthly compounding. ii) the dealer offers to lend you $20,000 (i.e., no discount) at an APR of 3%, monthly compounding.
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?
A pair of die is thrown and the absolute difference of the two scores is recorded. What is the probability of the absolute difference being 4 or more?
12(3+7)-5
7. Find the equation of the line passing through the points (−4,−2) 𝑎𝑛𝑑 (3,6), give the equation in the form 𝑎𝑥+𝑏𝑦+𝑐=0, where 𝑎,𝑏,𝑐 are whole numbers and 𝑎>0.
The market for economics textbooks is represented by the following supply and demand equations: P = 5 + 2Qs P = 20 - Qd Where P is the price in £s and Qs and Qd are the quantities supplied and demanded in thousands. What is the equilibrium price?
A machine produces 255 bolts in 24 minutes. At the same rate, how many bolts would be produced in 40 minutes?
The function h(t)=-5t^2+20t+60 models the height in meters of a ball t seconds after it’s thrown . Which describe the intercepts and vertex of this function
The probability of growing a seedling from a seed is 0.62. How many seeds do I need to plant so that the probability of growing at least one seedling is greater than or equal to 0.87?
For what values of m is point P (m, 1 - 2m) in the 2⁰ quadrant?
We have received our p&l statement back from accounts. The board has asked for an innovation hub. What items should we prioritise reviewing to decide if we can afford an innovation hub?
Calculate NPV, IRR and PAYBACK through a cash flow for a period of five years, with discount rate of: a) 10% b) 12% c) 15% initial annual cost $41,400,000
calculate the product of 4 and 1/8
Carmen's age was twice as old as Luis was when Carmen was Luis's age. When Luis is Carmen's age, their ages will add up to 112.
I have a complex function I would like to integrate over. I can use two approaches and they should give the same solution. If I want to find the contour integral ∫𝛾𝑧¯𝑑𝑧 for where 𝛾 is the circle |𝑧−𝑖|=3 oriented counterclockwise I get the following: ∫2𝜋0𝑖+3𝑒𝑖𝑡⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯𝑑(𝑖+3𝑒𝑖𝑡)=∫2𝜋03𝑖(−𝑖+3𝑒−𝑖𝑡)𝑒𝑖𝑡𝑑𝑡=18𝜋𝑖 If I directly apply the Residue Theorem, I would get ∫𝛾𝑧¯𝑑𝑧=2𝜋𝑖Res(𝑓,𝑧=0)=2𝜋𝑖
5 1/9 + 2 2/3