Home Controller code: public string Interest (double principal, int time, double rate) { double amount =...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Home Controller code: public string Interest (double principal, int time, double rate) { double amount = 0; if (time > 10) { * = principal (1 + (time* rate)); } else { amount = } else if (time >= 5) { amount = principal (0.5+ (time * rate)); amount = 1 + principal* (1 + (time * rate)); return Convert.ToString("The amount that needs to be paid is: "+ amount); What is the output if we browse to the following code based on the Home controller class (4 marks): Home Controller code: public string Interest (double principal, int time, double rate) { double amount = 0; if (time > 10) { * = principal (1 + (time* rate)); } else { amount = } else if (time >= 5) { amount = principal (0.5+ (time * rate)); amount = 1 + principal* (1 + (time * rate)); return Convert.ToString("The amount that needs to be paid is: "+ amount); What is the output if we browse to the following code based on the Home controller class (4 marks):
Expert Answer:
Answer rating: 100% (QA)
I have provided C CODE along with CODE SCREENSHOT and OUTP... View the full answer
Related Book For
Java An Introduction To Problem Solving And Programming
ISBN: 9780134462035
8th Edition
Authors: Walter Savitch
Posted Date:
Students also viewed these programming questions
-
My Topic is Investor Builder a Financial services app that helps children start investing. It also allows any investor to use the platform. The app has educational webinars on investing 101 and the...
-
A small consulting company wants to make the switch to QuickBooks Online. All of their expenses are paid at the time they are incurred, so there is no need to track bills in the system. There is only...
-
THIRD AVENUE SOFTWARE HEALTH-CARE APP PROJECT This case is new for the ninth edition of Information Technology Project Management . The case provides an opportunity to apply agile and Scrum...
-
Hakeem purchased some Apple iPhone. To make a profit he decides to use the formula below profit = iPhone cost * 2.5 Create 2 function. Main() Have the while loop call the profitcalc() and request if...
-
What are the characteristics of the functional, divisional, and matrix structures?
-
Dyna Distribution markets CDs of the performing artist King James. At the beginning of March, Dyna had in beginning inventory 1,500 King James CDs with a unit cost of $7. During March, Dyna made the...
-
The beam is made of oak, for which \(E_{0}=11 \mathrm{GPa}\). Determine the slope and displacement at point \(A\). 200 mm 400 mm I A 4 kN/m -3 m- + -3 m- B
-
The cash data of Richmond Automotive for June 2014 follow: Richmond Automotive received the following bank statement on June 30, 2014: Additional data for the bank reconciliation include the...
-
Given the below Language L (where = {a, b}), use the Pumping Lemma to show that L is not regular. (Solve) l L= {ba" ab" | n > 0}
-
The "You" Attitude Rewrite the following sentences to reflect your audience's viewpoint. 1. We request that you use the order form supplied in the back of our catalog. 2. We insist that you always...
-
Recall that Q is closed under addition and multiplication. That is, if a, b e Q then a + b = Q and ab e Q. 1. Recall that I is the set of all irrational numbers, that is I (xER:*#Q) (a) Let a e Q and...
-
Kross Company purchases an equity investment in Penno Company at a purchase price of \$2.5 million, representing \(40 \%\) of the book value of Penno. During the current year Penno reports net income...
-
Facebook is considering two proposals to overhaul its network infrastructure. They have received two bids. The first bid, from Huawei, will require a $17 million upfront investment and will generate...
-
On the basis of your answer to the previous question, is the Canadian dollar selling at a premium or discount on the forward rate? Previous question Assume that 90-day U.S. securities have a 3.5%...
-
On January 1, 2014, McKeown, Inc., issued \$275,000 of 8\%, 9-year bonds for \(\$ 242,854\), which implies a market (yield) rate of 10\%. Semiannual interest is payable on June 30 and December 31 of...
-
Lundholm, Inc., reports financial statements each December 31 and issues \(\$ 600,000\) of \(9 \%\), 15-year bonds dated May 1, 2014, with interest payments on October 31 and April 30. Assuming the...
-
An author published a book which was being sold online. The first month the author sold 4500 books, but the sales were declining steadily at 4% each month. If this trend continues, how many total...
-
Create an appropriate display of the navel data collected in Exercise 25 of Section 3.1. Discuss any special properties of this distribution. Exercise 25 The navel ratio is defined to be a persons...
-
What output will be produced by the following code? public class Demo { public static void main(String[] args) { System.out.println("The output is:"); foo(23); System.out.println(); } public static...
-
Even though a binary file is not a text file, it can contain embedded text. To find out if this is the case, write a program that will open a binary file and read it one byte at a time. Display the...
-
Write a program in a class CharacterFrequency that counts the number of times a digit appears in a telephone number. Your program should create an array of size 10 that will hold the count for each...
-
Calculate the CGT payable in relation to each of the following disposals, assuming in each case that the annual exemption is fully utilised against other gains, that there are no allowable losses and...
-
Mick Stone disposed of the following assets during tax year 2023-24: (1) On 19 May 2023, Mick sold a freehold warehouse for 522,000. This warehouse was purchased on 6 August 2011 for 258,000, and was...
-
In October 2012, Matthew bought a piece of rare porcelain for 10,000. The porcelain was damaged in early 2019 and in February of that year Matthew spent 3,850 on restoration work. In July 2019,...
Study smarter with the SolutionInn App