Java | JSP | JSF Answers

Questions answered by Experts: 3 611

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

.Write a program to find the sum of all the prime numbers in the range n to m. Display each prime number and the final sum. 


// build and run this example #include #include #include int main(void) { BOOL bRet; STARTUPINFO si; PROCESS_INFORMATION pi; ZeroMemory(&si,sizeof(si)); si.cb=sizeof(si); ZeroMemory(&pi,sizeof(pi)); bRet=CreateProcess(NULL,"notepad.exe",NULL,NULL,FALSE,0,NULL,NULL,&si,&pi); if(bRet==FALSE) { printf("Error: %u\n",GetLastError()); return 1; } CloseHandle(pi.hProcess); CloseHandle(pi.hThread); // close handles to kernel objs return 0; }


// build and run this example #include #include #include void _tmain( int argc, TCHAR *argv[] ) { STARTUPINFO si; PROCESS_INFORMATION pi; ZeroMemory( &si, sizeof(si) ); si.cb = sizeof(si); ZeroMemory( &pi, sizeof(pi) ); if( argc != 2 ) { printf("Usage: %s [cmdline]\n", argv[0]); return; } // Start the child process. if( !CreateProcess( NULL, // No module name (use command line) argv[1], // Command line NULL, // Process handle not inheritable NULL, // Thread handle not inheritable FALSE, // Set handle inheritance to FALSE 0, // No creation flags NULL, // Use parent's environment block NULL, // Use parent's starting directory &si, // Pointer to STARTUPINFO structure &pi ) // Pointer to PROCESS_INFORMATION structure ) { printf( "CreateProcess failed (%d).\n", GetLastError() ); return; } // Wait until child process exits. WaitForSingleObject( pi.hProcess, INFINITE ); // Close process and thread handles. CloseHandle( pi.hProcess ); CloseHandle( pi.hThread ); }


1.Write and build your C program which creates a txt file and write into your name and your number 10 times. (You can use FileIO.pdf samples or you can write it on your own ). 2. And use yourprogram.exe file in another process in createProcess method as parameter. Example: bRet=CreateProcess(NULL,"yourprogram.exe",NULL,NULL,FALSE,0,NULL,NULL,&si,&pi); 3. Finally you should submit two C file 1 yourprogram.c (which creates a txt and write into your name and your number 10 times.) 2 mainprogram.c 


Develop an application in Java for automating the Banking Operations using interfaces.

Create an interface called “Transaction” which contains the functions such as deposit,

withdraw, and viewBalance. Create another interface called “Displayable” which

contains the Display () function to display the account details.

Create an abstract class called “Account” with bank account details such as acc_name,

acc_no, and balance. Add necessary constructors.

Create a “Bank” class which implements the “Transaction”, “Displayable” interfaces

and inherits “Account” class.

Perform menu driven operations like Deposit, Withdraw and Balance Enquiry, View

Account Details from a Main class. Write logics in the corresponding methods.


Using a Two-Dimensional array, produce the vehicle type sales report and the total sales made for
each vehicle type. If the total sales made per month are greater than or equal to 100, gold status
is awarded. If the monthly sales are less than 100, silver status is awarded.

Explain the following variables with example

1, static variable

2, object variable

3, instance variable


Draw a flowchart that uses while loops for the following steps:

a. Prompt the user to input two integers: firstNum and secondNum. (firstNum must be less than secondNum.)

b. Output all the odd numbers between firstNum and secondNum inclusive.

c. Output the sum of all the even numbers between firstNum and secondNum inclusive.

d. Output all the numbers and their squares between 1 and 10.

e. Output the sum of the squares of all the odd numbers between firstNum and secondNum inclusive.

Explain static variable, object variable, instance variable with example


Explain constructor with argument and without argument


LATEST TUTORIALS
APPROVED BY CLIENTS