Programming & Computer Science Answers

C++ 9913
Python 5288
Java | JSP | JSF 3611
C 1680
C# 1362
Computer Networks 989
Algorithms 652
Databases | SQL | Oracle | MS Access 641
HTML/JavaScript Web Application 588
Other 537
Visual Basic 358
Assembler 209
Software Engineering 202
AJAX | JavaScript | HTML | PHP 166
MatLAB 150
MatLAB | Mathematica | MathCAD | Maple 124
Action Script | Flash | Flex | ColdFusion 112
UNIX/Linux Programming 89
Web Development 73
Excel 36
ASP | ASP.NET 23
Delphi | Pascal 21
Perl 16
Prolog 9
Functional Programming 9
MathCAD 5
Wolfram Mathematica 4
WPF 4
Ruby | Ruby on Rails 3
NodeJS Web Application 2

Questions answered by Experts: 26 876

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search

Implement a function named largerThanN  that accepts three arguments: an array of type int,  the size of the array of type int and an int number n.

The function should display all of the numbers in the array that are greater than the number n.

in the main() function create an array named numbers containing 10 integers : 30,20,50,2,-1,44,3,12,90,32 

Ask the user to enter a number.

Call the the function  largerThanN and pass the array , the size and the number that user entered.

Sample Output:

Enter a number:

10

The number that are larger than 10 are: 30 20 50 44 12 90 32


Code a program to get the number of students and the group size from the user. Calculate and display the number of groups that must be used to divide the students in the given size. The last group would possibly not be filled. Display also the number of students in the last group.


Functions to code and use:

●CalcNumberGroups. This function must get the number of students and the group size via parameters. It must calculate and return the number of group(integer) that would be used

●CalcLastGroupSize. This function must get the number of students and the group size via parameters. It must calculate and return the number of students(integer) in the last group


The Financial officer at RGI wants you to develop an application that will evaluate the company’s asset’s annual depreciation using the double-declining balance and sum-of-the years’ digit method. The Financial officer will enter the asset’s cost, useful life (in years), and salvage value (which is the value of the asset at the end of its useful life). The interface provides text boxes for entering the asset cost and salvage value. It also provides a list box for selecting the useful life, which ranges from 3 to 20 years. The depreciation amounts are displayed in the list boxes. Create a windows form application using the name RGI annual asset depreciation App. You can use the visual basic’s Financial.DDB method to calculate the double-declining balance depreciation and use its Financial.SYD method to calculate the sum-of-the-years’ digit depreciation. Both methods return the depreciation amount as double number


Write a method/function SHOw_TODO0 in python to read contents from a text


file ABC.TXT and display those lines which have occurrence of the word "TO" or

DO"


For example IMPORTANT : If content TO of the NOTE file is THAT SUcCESS IS THE REsULT OF

HARD wORK. WE ATI. ARE EXPFcTED TO DO HARD WORK. AFTER


ALL EXPERIENCE cOMES FROM HARDwORK.


The method/funetiom should displays


THIS IS IMPORTANT TO NOTE THAT SUCCESS IS THE RESULT


OF HARD wORK.

WE ALL ARE EXPECTED to do hard work


Given a parent class "Standard Calculator" consisting of one child class "Scientific Calculator".

Create the required parent class and child class using(Object-oriented programming concept) means to use the python class object to create this relationship.

The standard calculator(parent) can perform two types of operations: an addition and a subtraction

The standard calculator(child)is capable of inputting only two integers. But the scientific calculators(child) can also interpret decimal values.

The scientific calculator(child) is capable of four operations: addition, subtraction, cosine and sine of values.



File Copy operation. You need to accept source and destination file names. data should be copied from source file to destination file. Handle all exceptions that might occur during file copy operation.


Extended Assignment

An institute have decided to automate their batch details operations. Application is to be developed

in proper directory structure to be maintained to store files.

EX:-

Academy:

Chennai: Chennai.txt

Bangalore: Bangalore.txt

Mumbai: Mumbai.txt

Pune: Pune.txt

Operations:

Create a menu based application to store batch details.


• First option in menu should allow user to create directory structure and files (if not exists) in c drive as shown in above figure.

• Second option should accept batch details from user. Based on location given by user append batch details in respective files.

• Third menu option allows user to create a backup copy of Academy folder in D Drive

• Fourth option should allow user to view details of text files as mentioned above.


Write a Code to Read and Display the contents of a text file. Accept the name of the file from the user. Handle all the exceptions that might occur during reading.


The code has some bugs. It is supposed to raise an event, whenever the File is downloaded


delegate void DownloadCompeteHandler(int perc);

public class FileDownloader

{

protected string resourceUrl;

protected string resourceSavePath;

event DownloadCompeteHandler DownLoadComplete;

public FileDownloader(string url,string savepath)

{

this.resourceUrl = url;

this. resourceSavePath = savepath;

}

public void DownLoadResource()

{

for (int i = 1; i <= 4; i++)

{

for (int j = 1; i <= 10000; i++);

OnDownLoadComplete(i * 25);

}

}

protected void OnDownLoadComplete( )

{

if (DownLoadComplete == null)

DownLoadComplete( );

}

}

public static void Main(string[] args)

{

FileDownloader fd =

new FileDownloader("http://www.microsoft.com/vstudio/expressv10.zip", "d:\\setups");

fd.DownLoadComplete += new Handler();

fd.DownLoadResource();

Console.ReadKey();

}

static void fd_DownLoadComplete(int perc)

{

Console.SetCursorPosition(10, 10);

Console.Write("Downloading {0} Percent Complete", perc);

}


Replace Elements with Zeros

Given a MxN matrix, write a program to replace all elements that do not belong to principal-diagonal & anti-diagonal with Zeros.

Principal-diagonal elements are the set of elements of a matrix that lie on the line joining the top left corner to the bottom right corner.

Anti-diagonal elements are the set of elements of a matrix that lie on the line joining the bottom left corner to the top right corner.Input


The first line of input will contain two space-separated integers, denoting MxN matrix.

The next M lines will contain N space-separated integers.Output


The output should be MxN matrix by replacing elements that do not belong to principal-diagonal and anti-diagonal with Zeros. Print each row as a space separated integers in a single line.Explanation


For example if the M and N are 5 and 5. Read the elements of 5 rows in next 5 lines. If the given elements are


Lab-11

Q1. ICICI Bank want’s to implement SMS alert fascility to the customers whenever they pay the Credit Card Bill. The CreditCard class contains the following fields.

CreditCardNo, CardHolderName, BalanceAmount, CreditLimit.


The class has three functions. GetBalance(), GetCreditLimit(), and MakePayment(). Whenever the MakePayment() method is called, it should update the BalanceAmount and raise an event. The event should send a message. ( You don’t need to write a logic to send the sms. Only print the message saying amount is credited.)


Task to be performed:

Define a class CreditCard

Define a Delegate to Handle the Event

Define an event which will be raised whenever the payment is made.

Create a Console client application, and try the functionality.


LATEST TUTORIALS
APPROVED BY CLIENTS