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
94 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 measure of an angle in radians when converting \(\frac{5\pi}{12}\) radians to degrees?
+
Question: What is the slope of the line represented by the function f(x) = 3x + 2?
+
What is the slope of a line passing through the points (4, 6) and (-2, 14)?
+
New questions in Mathematics
A particular employee arrives at work sometime between 8:00 a.m. and 8:50 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:50 a.m. Find the probability that the employee will arrive between 8:05 a.m. and 8:40 a.m. Round your answer to four decimal places, if necessary.
Let f(x)=||x|−6|+|15−|x|| . Then f(6)+f(15) is equal to:
The strength of Kefexin oral suspension is 100 mg/ml. Nora has been prescribed cefalexin at a dose of 50 mg/kg/day divided in two single doses. Nora weighs 14 kg. How many milliliters of solution for Nora should be given as a single dose?
Imagine that you are in an electronics store and you want to calculate the final price of a product after applying a discount. The product you are interested in has an original price of $1000 MN, but, for today, the store offers a 25% discount on all its products. Develop an algorithm that allows you to calculate the final price you will pay, but first point out the elements.
For a temperature range between -3 degrees Celsius to 5 degrees Celsius, what is the temperature range in degrees Farenheight
Determine the equations of the recipes that pass through the following pairs of points P1 (2;-1) and p2 (4;-1)
B - (-4)=10
what is the annual rate on ​$525 at 0.046​% per day for 3 months?
A company that manufactures personal hygiene items purchases machinery for $220,000 that is considered to last 7 years; it is estimated that at the end of the period it will have a salvage value of $1000. Find: to. The depreciation rate. b. The book value at the end of the sixth year.
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.
In the telephone exchange of a certain university, calls come in at a rate of 5 every 2 minutes. Assuming a Poisson distribution, the average number of calls per second is: a) 1/8 b) 1/12 c) 1/10 d) 2/5 e) 1/24
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=
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?
Congratulations, you have saved well and are ready to begin your retirement. If you have $1,750,000.00 saved for your retirement and want it to last for 40 years, and will earn 10.8% compounded monthly: What is the amount of the monthly distribuion? 216.50 How much interest is earned in retirement?
Twenty‐five students in a class take a test for which the average grade is 75. Then a twenty‐sixth student enters the class, takes the same test, and scores 70. The test average grade calculated with 26 students will
We plan to test whether the mean mRNA expression level differs between two strains of yeast, for each of 8,000 genes. We will measure the expression levels of each gene, in n samples of strain 1 and m samples of strain 2. We plan to compute a P-value for each gene, using an unpaired two-sample t-test for each gene (the particular type of test does not matter). a) What are the null hypotheses in these tests (in words)? [2] b) If, in fact, the two strains are identical, how many of these tests do we expect to produce a P-value exceeding 1/4? [2]
Kayla started a book club at her school. The number of girls in the book club was one more than twice the number of boys. If there are 15 girls in the book club, how many boys are in the club?
question 1 Consider a sample space S, and two events A and B such that P(A ∩ B) = 0.2, P(A ∪ B) = 0.6, P(B ∪ ̄A) = 0.8 (a) [0.5 points] Calculate P (A). (b) [0.5 points] Calculate P (B)
Mark is gluing a ribbon around the sides of a picture frame. The frame is 11 inches long and 7 includes wide. How much ribbon does Mark need?
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?