Skip to main content

Programming using Java Hands On - Control Structures | Print Username

 

Print Username

Jeffy, who is going to complete the higher education in this year needs to create a simple application which accept the name of a person and welcome them with a message along with their name. She wants to read the data using the class "Scanner". Implement this scenario using Java.

Sample Input 1: 

Enter the name:

Johson

Sample Output 1:

Welcome Johnson.


Sample Input 2: 

Enter the name:

Stain Polson

Sample Output 2:

Welcome Stain Polson.



 

Result Description

Summary of tests
*Note: All the test cases might not have same weightage
+------------------------------+
|  2 tests run/ 2 tests passed |
+------------------------------+
 

Comments

Must Read:

Accenture Mock Quiz | Part 1

Question  1 Incorrect Marked out of 1.00 Remove flag Question text Select the true statement ? Select one: a.  Inheritance forms a is-a part of relationship between classes.   b.  Aggregation is the stronger form of Inheritance. c.  Aggregation forms the is-a type of relationship between classes. d.  Aggregation forms a is-a part of relationship between classes. Composition is the stronger form of Aggregation. Feedback The correct answer is: Aggregation forms a is-a part of relationship between classes. Composition is the stronger form of Aggregation. Question  2 Correct Marked out of 1.00 Flag question Question text What is the diagram that depicts the interaction between objects by arranging the objects in time sequence ? Select one: a.  Use Case Diagram b.  Sequence Diagram   c.  Component Diagram d.  Activity Diagram Feedback The correct answer is: Sequence Diagram Question  3 Incorrect Marked out of 1.00 Flag question...

Programming using Java Hands On - Control Structures | Check for Leap Year

  Given a year, check if the year is leap year or not.  If yes, the output should be “Leap Year”.  Else output should be “Not a Leap Year”.  The input should be a positive four digit number.  Else,  the output should be “Invalid Year”. Sample Input  1 : Enter the Year 2016 Sample Output  1 : Leap Year Sample Input  2 : Enter the Year 2001 Sample Output  2 : Not a Leap Year Result Description Summary of tests *Note: All the test cases might not have same weightage +------------------------------+ | 12 tests run/12 tests passed | +------------------------------+

RDBMS Data Definition Language | Create Buses table

 efer the below schema and create the buses table. Column Name Datatype Size Constraint Constraint name Bus_no Number 11 Primary key PK_BUSES Bus_name Varchar2 20   Type Varchar2 20   Total_seats Number 11   Avail_seats Number 11     Result Description Summary of tests +------------------------------+ | 3 tests run / 3 test passed | +------------------------------+

Data Formats ( XML & JSON ) XML AND JSON | Generate XSD for Persons

  Generate XSD for Persons Generate XSD for the following XML. XYZ organization wants to store the details of persons in an xml file. The following scenario helps in designing the XML document. Here PersonList  is the root tag. PersonList contains the entry of each person with adhaarno, name, age and address. <?xml version="1.0"  encoding="UTF-8"?> <PersonList xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="PersonList.xsd">     <Person>         <adhaarno>414356782345</adhaarno>         <name>             <firstname>Zeenath</firstname>         </name>         <age>28</age>         <address>             <doorno...

Coin Change Combination

1. You are given a number n, representing the count of coins. 2. You are given n numbers, representing the denominations of n coins. 3. You are given a number "amt". 4. You are required to calculate and print the number of combinations of the n coins using which the       amount "amt" can be paid. Note 1: You have an infinite supply of each coin denomination i.e. same coin denomination can be                    used for many installments in payment of "amt" Note 2: You are required to find the count of combinations and not permutations i.e.                   2 + 2 + 3 = 7 and 2 + 3 + 2 = 7 and 3 + 2 + 2 = 7 are different permutations of same                    combination. You should treat them as 1 and not 3. Input Format A number n n1 n2 .. n number of elements A number amt Output Format A number representing the count of ...

DFA Solutions

  Question  1 Correct Mark 1.00 out of 1.00 Flag question Question text To secure the http messages in the API calls, its necessary to: Select one: a. All the above b. Use cryptography c. implement identity management d. avoid hardcoding any sensitive data in the messages Feedback The correct answer is: All the above Question  2 Correct Mark 1.00 out of 1.00 Remove flag Question text A team has completed 10 Sprints and moving to the 11th Sprint. Till Sprint 10, the team has achieved an average of 50 story points per sprint. The same is projected as their velocity for the upcoming sprints with the Client. What is this approach called? Select one: a. Velocity Driven Sprint Planning b. Velocity Driven Commitment c. Commitment Driven Velocity d. Commitment Driven Sprint Planning Feedback The correct answer is: Velocity Driven Sprint Planning Question  3 Incorrect Mark 0.00 out of 1.00 Remove flag Question text Jack is grooming himself to be a potential Product Owner. Kno...

Programming using Java Running case study - Requirement 1 / 6 | State Board of Cricket Council –V1.0 *

  State Board of Cricket Council –V1.0 * State Board of Cricket Council   State Board of Cricket Council (SBCC) is one of the leading cricket selection academies in the state . They are in need of an automated system that should manipulate the player details provided and also find the players who have secured star rating between a specific range from the database. You being their software consultant have been approached to develop a pilot java application which can be used by the  admin for the above mentioned requirement . UserInterface.java package  com.sbcc.main; import  com.sbcc.model.*; import  java.util.*; import  java.lang.*; import  com.sbcc.skeletonvalidator.SkeletonValidator; public   class   UserInterface  {      public   static   Player   pl ;      public   static   void   main ( String []  args ) {        ...

Programming using Java Hands On - Control Structures | Celcius to Farenheit Conversion

  Celcius to Farenheit Conversion Write a program to convert  Celsius to Farenheit.  Display the result correct to 1 decimal. Create a class "CelsiusConversion.java" and write the main method. Hint : 5 * (F – 32) = 9 * C,   F-Farenheit , C- Celsius   Sample Input  1 : 80 Sample Output  1 : 176.0 Sample Input  2 : 88 Sample Output  2 : 190.4 Result Description Summary of tests *Note: All the test cases might not have same weightage +------------------------------+ | 7 tests run/ 7 tests passed | +------------------------------+

Data Formats ( XML & JSON ) XML AND JSON | Generate XSD for Students

  Generate XSD for Students   Generate XSD for the following XML. XYZ School wants to store the details of students in an xml file. The following scenario helps in designing the XML document. Here StudentList  is the root tag. StudentList contains the entry of each student with rollno, name, age, address and department. <?xml version="1.0" encoding="UTF-8"?> <StudentList  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  xsi:noNamespaceSchemaLocation="StudentList.xsd">     <Student rollno="2017CSE0055">         <name>             <firstname>Savitha</firstname>         </name>         <age>20</age>         <address>             <doorno>35</doorno>     ...

Subscribe to Get's Answer by Email