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)
Math question: "Graph the equation y = 2x + 5."
+
Question: What is the derivative of ∫[0 to x] (sin(t^2) + 3t) dt?
+
What is the scientific notation of 5,678,900?
+
New questions in Mathematics
-11+29-18
The derivative of a power is obtained just by subtracting 1 from the power True or false
1 plus 1
(3x^(2) 9x 6)/(5x^(2)-20)
If eight basketball teams participate in a tournament, find the number of different ways that first, second, and third places can be decided assuming that no ties are allowed.
calculate the area in square units of A rectangle with length 6cm and breadth 5cm
determine the polynomial F of degree 2 that interpolates. f at points (0;1) (2;5) (4;6). calculate F(0.8). Note: Using the polynomial expression with difference operator.
With the aim of identifying the presence of the feline leukemia virus (FeLV), blood samples were collected from cats sent to a private veterinary clinic in the city of Belo Horizonte. Among the animals treated, it was possible to observe that age followed a Normal distribution with a mean of 4.44 years and a standard deviation of 1.09 years. Considering this information, determine the value of the third quartile of the ages of the animals treated at this veterinary clinic. ATTENTION: Provide the answer to exactly FOUR decimal places
A box of numbered pens has 12 red, 12 blue, 12 green and 12 yellow pens. The pens for each colour are numbered from 1 to 12. There is a unique number on each pen, so no pen is exactly the same as any other pen in the box. When reaching into the box to randomly draw five pens without replacement, what is the proportion of getting exactly four pens of the same colour (Note: the numbers matter but the order does not)?
sum of 7a-4b+5c, -7a+4b-6c
Convert 5/9 to a decimal
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
In a 24 hours period, the average number of boats arriving at a port is 10. Assuming that boats arrive at a random rate that is the same for all subintervals of equal length (i.e. the probability of a boat arriving during a 1 hour period the same for every 1 hour period no matter what). Calculate the probability that more than 1 boat will arrive during a 1 hour period. (P(X>1) ) Give your answers to 4 decimal places and in a range between 0 and 1
factor the polynomial completely over the set of complex numbers b(x)=x^4-2x^3-17x^2+4x+30
Let X be a discrete random variable such that E(X)=3 and V(X)=5. Let 𝑌 = 2𝑋^2 − 3𝑋. Determine E(Y).
x²-7x+12=0
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?
answer this math question The scale on a map is drawn so that 5.5 inches corresponds to an actual distance of 225 miles. If two cities are 12.75 inches apart on the map, how many miles apart are they? (Round to the nearest tenth) miles apart. The two cities are how many miles apart
3(x-4)=156
Sarah is lining a square tray with 1 inch square tiles. the side length of the tray is 9 inches. How many tiles does Sarah need?