Which life cycle model would you follow for developing New
Library Automation Software that would link various libraries in the city?
Mention the reasons behind your choice of a particular life cycle model.
write a program to print number of characters in each word in an input.
input: "hello This is hari"
output:
5
4
2
4
Can Next-generation Internet Architecture address the shortcomings in the Internet
architecture?
2. There is a binary tree given to you. In which each of the node represents the student in the class. You are playing a game in which you need to team up with one of student in class. Team can be formed in such a way that in a team both of the students can’t have same parent in tree and should be at the same level in binary tree. The number of students in the class is denoted by ‘n’. The value will be user-defined.
Input: we have given you some pair of students you need to find that is the team valid or not.
Output: ‘Yes’ if the team is valid or ‘No’ if the team is invalid.
Also, Find
(a) How many tree traversal is required for the solution of the above problem
Write a C++ program to handle the Input Mismatch Exception.
In the Main method, ask the user for the number of shirts they want to order. Implement try-catch to handle values other than an integer.
Input and Output format:
Refer to sample input and output
[All text in bold corresponds to input and rest corresponds to output]
Sample Input and Output 1:
Enter the number of t-shirts you want to order:
3
Your order for: 3 t-shirts has been successfully placed
Sample Input and Output 2:
Enter the number of t-shirts you want to order:
e
Please enter an Integer only.
Enter the number of t-shirts you want to order:
5
Your order for: 5 t-shirts has been successfully placed
Write a C++ program to get a list of usernames from the user, store it in a set and print the size of the set. Print " Invalid number " if the number of usernames to be added is less than or equal to zero.
In the main method, obtain input from the user in the console and insert the username into the set. Display the size of the set in the main method.
Problem constraints:
Use <set> container to store the values.
Use insert() method to insert the values.
Output format:
The output consists of an integer that corresponds to the size of the set.
If the number of usernames to be added is less than or equal to zero display "Invalid number ".
Output 1:
Enter the number of usernames to be added:
3
Enter the name of user 1
Enter the name:
arjun
Enter the name of user 2
Enter the name:
siva
Enter the name of user 3
Enter the name:
siva
Size of the set is:2
Owner of a Hall
Write a C++ program to find the owner name of the hall by hall number using the map.
In the main method, obtain input as CSV from the user in the console and find the Hall number to get the Owner of that hall using the map.
Problem constraints:
Create a Map as map <string, string >
Use find() to find the hall owner’s name.
Input and Output Format:
The First line of input consists of an Integer 'n' which corresponds to the number of Halls.
The next 'n' lines of Inputs are in CSV format.
For output refer to sample Input and Output for formatting specifications.
Sample Input and Output 1:
Enter the number of Halls
4
Enter details of Hall 1:
Hall-230, Binny
Enter details of Hall 2:
Hall-233, Ram
Enter details of Hall 3:
Hall-255, Annie
Enter details of Hall 4:
Hall-240, Vikram
Enter the Hall number to find its owner:
Hall-233
The owner of Hall-233 is Ram
Half Pyramid - 4
Given an integer N as a starting number and K as input, write a program to print a number pyramid of K rows as shown below.
Half Pyramid - 3
Given an integer
N as a starting number and K as input, write a program to print a number pyramid of K rows as shown below.