cannon ball thrown straight into air with starting velocity v0. position of cannon ball after t seconds is given by equation s = vi t – (1/2)gt^2. You are required to confirm equation by simulation. In simulation, you consider how ball moves in very short time interval Δt. In short time interval the velocity v is constant, we can compute distance ball moves using Δs = vΔt. You assume Δt is constant with value of 0.01. You get updated position using s = s + v *Δt. In short time interval, Δv = –gΔt, you must keep velocity updated as v = v - g×Δt; In next iteration, new velocity used to update distance. You need to run simulation until cannon falls back to ground. Your program take initial velocity as input. Update position and velocity 100 times per second but print out position only every full second. printout values from exact formula s =vi t – (1/2) gt^2 for comparison.plot the path that cannon ball
Create a parent class “Account” with three variables num, title and bal with two functions withdraw and deposit. Create a child class “SavingAccount” with a function calculateProfit (that applies 7.5% profit on current balance). Finally create the class “TestApp” that creates the object of Saving account and call withdraw, deposit functions and public data members of Account class. Override withdraw function in SavingAccount to deduct Rs. 250 if the balance after withdrawal of amount is less than 10000.
Using the maximum likelihood method, adjust a power law distribution to the degree
distribution of your network and test the quality of the result by calculating the root mean square
error between the estimated and the actual degree distribution. Write down explicitly the
expression for the adjusted power law.
Describe the nature of the network by explicitly indicating what kind of objects are its
nodes and their number, what kind of relation the links represent and their number, and what actual
function does the network represent.
Create a parent class “Account” with three variables num, title and bal with two functions withdraw and
deposit. Create a child class “SavingAccount” with a function calculateProfit (that applies 7.5% profit on current balance). Finally create the class “TestApp” that creates the object of Saving account and call withdraw, deposit functions and public data members of Account class. Override withdraw function in SavingAccount to deduct Rs. 250 if the balance after withdrawal of amount is less than 10000.
Question 1 (Marks: 50) Develop a Java GUI application that will display the ink cartridge usage of three different printers with a time span of three years. Q.1.1 On the form, create two combo boxes, to allow a user to select between three different printers and years. When a user has selected a printer and year and clicked the submit button, display the amount of ink cartridges used for that year. Use the following table for the printers and yearly cartridges used: 2018 2019 2020 HP Deskjesk 650 10 35 20 Epson K750 15 22 12 Canon Z100 30 31 33 Q.1.2 You are also required to create a menu system which will allow the user to exit the application under the file menu. Under the tool’s menu, allow the form submission and an option to display the yearly ink cartridges used for each printer. The layout of the form is left to your discretion. Marks will be allocated to the presentation and effectiveness of the layout, but the following layout is displayed for your convenience.
Write a python program that prompt the user for two numbers read them in and print out the product labelled
Convert the following infix expressions to their postfix equivalents:
(a) A – B + C
(b) A * B + C / D
(c) (A – B ) + C * D / E – C
(d) (A * B) + (C / D) – ( D + E)
Create a flowchart that display numbers from 100-1.
CREATE A C++ PROGRAM THAT DIPLSYS THE NAME OF THE MONTH IN A YEAR BASED ON THE NUMBER ENTERED VIA THE KEYBOARD USING IF/ELSE IF