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 angle Y in triangle XYZ if the measures of angle X and angle Z are 45° and 90°, respectively?
+
What is the sine value of the angle π/6 in the unit circle?
+
What is the simplified form of (x^3 * x^4) / (x^2 * x^5)?
+
New questions in Mathematics
How to find the value of x and y which satisfy both equations x-2y=24 and 8x-y=117
Let 𝑢 = 𝑓(𝑥, 𝑦) = (𝑒^𝑥)𝑠𝑒𝑛(3𝑦). Check if 9((𝜕^2) u / 𝜕(𝑥^2)) +((𝜕^2) 𝑢 / 𝜕(𝑦^2)) = 0
The ratio of tomatoes to red apples is 2:5. If there are 20 tomaoes in the garden, how many red apples are there?
Credit title that represents a payment order. This model, which emerged in Brazil, can only be issued in two specific situations: in the purchase and sale of commercial products or in the provision of services. Select the correct alternative: Question 6Answer The. Present value B. Promissory note w. Present value d. Duplicate It is. Bill of exchange
2x2 and how much?
Pedro had 80% of the amount needed to buy a game. Of this amount, you spent 15% on a watch and therefore, you will need to add another R$640.00 to purchase this game. Is the value of the game?
find all matrices that commute with the matrix A=[0 1]
20% of 3500
During a fishing trip Alex notices that the height h of the tide (in metres) is given by h=1−(1/2)*cos(πt/6) where t is measued in hours from the start of the trip. (a) Enter the exact value of h at the start of the trip in the box below.
28 is 92 percent of what?
Your boss asks you to plan the sample size for a randomized, double-blind, controlled trial in the clinical development of a cure for irritable bowl disease. Current standard treatment shall be compared with a new treatment in this trial. The S3-guideline of AWM demonstrated a mean change of the summary score of the validated health related quality of life questionnaire at 8 weeks of 16 with standard deviation 23 under standard treatment. You quote the drop-out rate of 11% from literature (previous phase of clinical development). Your research yielded a clinically important effect of 4 that has been found to be the Minimal Clinically Important Difference (MCID). In order to demonstrate superiority of the new treatment over standard of care, you assume that the change in of the summary score of the validated health related quality of life questionnaire follows a normal distribution, and that the standard deviation is the same for both treatments. How many patientes would one need to recruit for the trial to demonstrate the clinically interesting difference between treatments at significance level 5% with 95% power?
Given (3x+2)E [2;14] how much money (in soles) does Sophia have if numerically it is the greatest value of x?
A researcher is interested in voting preferences on change of the governing constitution in a certain country controlled by two main parties A and B. A questionnaire was developed and sent to a random sample of voters. The cross tabs are as follows Favour Neutral Oppose Membership: Party A 70 90 85 Party B 50 50 155 Test at α = 0.05 whether party membership and voting preference are associated and state the conditions required for chi-square test results to be valid.
30y - y . y = 144
User One of the applications of the derivative of a function is its use in Physics, where a function that at every instant t associates the number s(t), this function s is called the clockwise function of the movement. By deriving the time function we obtain the velocity function at time t, denoted by v(t). A body has a time function that determines its position in meters at time t as S(t)=t.³√t+2.t . Present the speed of this body at time t = 8 s.
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
Evaluate ab+dc if a=56 , b=−34 , c=0.4 , and d=12 . Write in simplest form.
A 20-year old hopes to retire by age 65. To help with future expenses, they invest $6 500 today at an interest rate of 6.4% compounded annually. At age 65, what is the difference between the exact accumulated value and the approximate accumulated value (using the Rule of 72)?
What is the percentage of nitrogen abundance in copper dinatrate Cu(NO3)2
A gas is leaking at 3.5ft3/min in a room of 2.9m by 6.9ft by 15.7m. How long would it take (in seconds) for 22% of the room to reach the LFL, if the gas has a LFL of 2.51%?