Answer:
The answer to this question can be given as:
Method Definition:
public static int secondHalfLetters(String letters)
{
int count = 0;
for (int i = 0; i < letters.length(); i++)
{
if (Character.toLowerCase(letters.charAt(i)) >= 'n')
{
count++;
}
}
return count;
}
Explanation:
In the above method definition first we declare the method that name is already given in the question that is secondHalfLetters() function. In this function we pass a string parameter that is letters.In the function we declare an integer variable count.Then we declare the for loop. In this loop we declare the conditional statement in the if block we convert character into lowercase and check that value is greater the equal to n. If this condition is true then it count increase by 1. In the lass we return count value.
Answer:
/Question.h
#include<iostream>
#include<string>
using namespace std;
class Question
{
private:
string question;
string answer[4];
unsigned int correctAnswer;
public:
Question(string ques,string *ans,unsigned int x)
{
int i;
question.assign(ques);
for(i=0;i<4;i++)
{
answer[i]=ans[i];
}
correctAnswer=x;
}
~Question()
{
}
string getQuestion()
{
return question;
}
unsigned int getCorrectAnswer()
{
return correctAnswer;
}
string getAnswer1()
{
return answer[0];
}string getAnswer2()
{
return answer[1];
}
string getAnswer3()
{
return answer[2];
}string getAnswer4()
{
return answer[3];
}
int getNoOfPossibleAnswers()
{
return 4;
}
};
Explanation:
The Question class represents one question and the possible answers for that question.
The Question class contains the question text and the 4 possible answers. It also contains the answer number of the correct answer.
The answer number is an unsigned int in the range of 1 to 4.Your Question class needs to have one or more constructors and one destructor.
It needs a member function that returns the question text. It also needs member functions that return the answer text for a specific answer
(1 through 4). The class also needs a member function that returns the number of possible answers for this question. While this is 4 today,
it could change in future versions of the class. Finally there needs to be a member function that returns the answer number of the correct answer
(a value of 1 through 4).Do not make the data members public. You can have public and private member functions as needed.
Answer:
Two users have been supported as each user has half of the link bandwidth.
Explanation:
Two users require 1Mbps when transmitting, and fewer users transfer a maximum of 2 Mbps, and the available bandwidth of the shared link is 2 Mbps; there will be no queuing delay before connection. If three users, transmit, then bandwidth will be 3Mbps, and there will be queuing delay before the link. Link size = 2Mpbs, i.e. two users ,transmit, then a maximum of 2Mbps will require and does not exceed 2Mbps of bandwidth.
Answer:
following are the responses to the given question.
Explanation:
The capability to successfully utilize IT is mutually dependent on its ability to execute strategic strategy and set business goals. The ability to compete more and more relies on the capacity of an organization of using technology. In the future, what a company wants to do will rely on what its technologies can do. It may be an example of a company investing in information technology that allows a company to manufacture new products or improve the efficiency of the distribution system to the corporation's economic efficiency.