Questions: 1 835

Answers by our Experts: 1 539

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 & Filtering

Kathy, a software developer in FIT technologies, is assigned the task of optimizing the following
code:
using System;
public class SwapNumber
{
void SwapNum(ref int a, ref int b)
{
int temp;
temp = a;
a = b;
b = temp;
}
static void Main(string[] args)
{
SwapNumber classobj = new SwapNumber();
int Number1, Number2;
Console.WriteLine("Enter the first number");
Number1 = Convert.ToInt32(Console.ReadLine());
Console.WriteLine("Enter the second number");
Number2 = Convert.ToInt32(Console.ReadLine());
Console.WriteLine("The value of first number is {0}",
Number1);
Console.WriteLine("The value of second number is {0}",
Number2);
classobj.SwapNum(ref Number1,ref Number2);
Console.WriteLine("Now the value of first number after
swaping is {0}", Number1);
Console.WriteLine("Now the value of second number after
swapping is {0}", Number2);
}
}
Optimize the preceding code for Kathy and find out the errors (if any). What would be the output of
the preceding code, if the first number is 46 while the second number is 37?
The execution goes back to the caller by default, when the last statement in a method is
reached.? Assuming that no return statement is used, do you agree with the preceding statement?
Specify the reason for your answer.
Dwayne manually calculates the interest rate using a calculator. However, he often commits
mistakes in calculating the interest due to the complex formula. Therefore, he asks Elina to build
an application that accepts the principal loan amount, rate of interest, and tenure of the loan and
calculates the EMI amount. Write the code that Elina should implement to create the applicatio
Elina has started developing the application. She needs to ensure that the application meets the
following requirements:
When the application executes for the first time, it should perform the following tasks:
Display a message to the user to specify the path of the file in which the customer details are to
be stored.
Create the customer details file at the user-defined location.
Create a configuration file and store the path of the customer details file in the configuration file.
This configuration file needs to be used by the application to retrieve the location of the customer
details file.
The user should be able to save data to the customer details file. Write the code that Elina
should use to save data to the customer details file.
The user should be able to view the data stored in the customer details file. Write the code that
Elina should use to read the data stored in the customer details file and display it to the user.
When the application executes for the first time, it should perform the following tasks:
Display a message to the user to specify the path of the file in which the customer details are to
be stored.
Define an interface. Briefly describe the benefits of using interfaces
The technical team of AutoZig Enterprise wants to develop a feature for the supervisors. Using
this feature, the details of the automobile part can be added but it should not be visible to other
employees of the company. This feature is useful for the automobile parts that are new and are
in the field for a trial run. As a software developer of WebSoft Solutions Pvt. Ltd., develop code
so that the information of a specific automobile part can be hidden from other employees of the
company. If an unauthorized user tries to access the information about a specific part, it should
display the error message, "Unauthorized Access". Develop the code that meets the
requirements given in the problem statement. Use the concept of access specifiers while
developing the code.
The development team of SoftSols Inc. has revamped the software according to the requirements
of FlyHigh Airlines and is in the process of testing the software. While testing the software, the
team encounters the following issues:
The operations-related data of FlyHigh Airlines is stored in a central database. The software
fails to respond to user inputs, if there is a connectivity problem with the database. Add the code
snippet that the development team should use to ensure that the application shows a userfriendly
message, if such a situation arises in future.[
The application used to calculate the cost of carrying additional luggage results in erroneous
amount, if the weight of the luggage is a fractional number. Help the development team modify
the code snippet so that the cost of carrying additional luggage is calculated correctly.
Michael is a software developer in FIT technologies. He wants to add a currency converter in the
application for the convenience of international customers. Help Michael in creating the currency
converter.
BS Bank Inc wants to add some additional features in the application. The company asks FIT
technologies for the following additions
? BS Bank Inc. needs to add modules to provide the following services:
a. Online share and mutual funds trading
b. General insurance for health, car, and travel
BS Bank Inc. should be able to provide other services like bill payments, mobile recharge.
LATEST TUTORIALS
APPROVED BY CLIENTS