Determining the valid code

Assignment Help Basic Computer Science
Reference no: EM131406552

Flight Codes:

Write a Java program that requests a user to enter a flight code. The program should verify that the user enters a valid flight code. A valid flight code begins with 2 or 3 capital letters and is followed by 3 or 4 digits. This program should use the.matches(<...>) method with a regular expression. If the user does not enter a valid code, your program should continually request that they enter a valid flight code until a valid code is entered.

1) Sample run of program:

EI320                                       //user input

Flight code is valid                 //output based on value

2) Sample run of program:

rea4121                                   //user input

Flight code is NOT valid       //output based on value of code

REA4121                                 //user input

Flight code is valid                //output based on value

Reference no: EM131406552

Questions Cloud

What data type should be used for nonintelligent primary key : Using your answer to Case Question 9-39, select data types, formats, and lengths for each attribute of each relation. Use the data types and formats supported by Microsoft Access. What data type should be used for nonintelligent primary keys?
Method with a regular expression : Write a Java program that requests a user to input their age. The program should verify that the value the user enters is considered valid, lying in the range between 0 and 150. This program should use the.matches( ) method with a regular expressi..
What do hackers break in to the most : List the targets of hackers and how many report incidents there were. Determine which of these incidents were of the greatest concern to consumers.Create various ideas for how you can protect yourself from hackers seeking to gain access to informati..
What indexes do you recommend for this database : The one decision for a relational database that usually influences efficiency the most is index definition. What indexes do you recommend for this database? Justify your selection of each index.
Determining the valid code : A valid flight code begins with 2 or 3 capital letters and is followed by 3 or 4 digits. This program should use the.matches( ) method with a regular expression. If the user does not enter a valid code, your program should continually request that..
Why you do or do not agree with morieuxs assumption : Explain why you do or do not agree with Morieux's (2013) assumption that the traditional organizational methods to effect change are obsolete? Justify your response with research.
Plan to target expansion on a global level : The global strategies are the plan to target expansion on a global level that will expand the business on a very large scale. These types of strategies require that the company set their products that they offer across the international market and..
What are the various techniques of acceptance testing : What are the various techniques of acceptance testing? What issues will arise when a company opts for only one type of acceptance testing? Which technique should be adopted?
Discuss the semantic versus pragmatic meaning of the phrase : Discuss the semantic versus pragmatic meaning of the phrase, "That's a sick ring tome" in the cultural context - creative aspect of a language means being able to combine sounds (phonology), to form words (morphology), words to form phrases and phr..

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Determine the mass of the steam that has entered

An insulated, vertical piston-cylinder device initially contains 10 kg of water, 6 kg of which is in the vapor phase. The mass of the piston is such that it maintains a constant pressure of 200 kPa inside the cylinder.

  Construct a diagram using rationale to map the arguments

An article from the press that cover any of the given topics, for example there have been many articles in the media recently about government surveillance.

  Equivalence class of any space or tab character

All together the pattern ^[[:blank:]]*$ matches a string that contains any number of blanks from start to end.

  What is the total size of the memory

Part a) A memory is byte addressable and has a 12-bit address. All the addresses are valid. What is the total size of the memory?

  Specify a list of installation sources

This enables you to retrieve the required files from a removable disk or from an image file on the local network. You can also use Group Policy to specify a list of installation sources.

  Should the firm conclude that its area is unusual

A Colorado consulting firm surveys a random sample of 410 businesses in the Denver area and finds that 115 of them have women owners. Should the firm conclude that its area is unusual? Test an appropriate hypothesis and state your conclusion.

  Approves the budget for the project

The CEO also wants you to specify who in the company will be considered a user of the new DSS. He wants you to convince him about the utility of such a system before he approves the budget for the project.

  Create and interpret a 90% confidence interval

How many litters must be used to estimate the average litter size to within 1 baby hamster with 95% confidence?

  Identify the degree and cardinalities of the relationship

A vendor builds multiple types of tablet computers. Each hs a type identification number and a name. The key specifications for each type include amount of storage and display type.

  E-commerce a technique of modern business

E-business or E-commerce is a technique of modern business, which means electronic commerce that helps any organization buying and selling products online. In other word, we can say that it helps the organization in various ways, such as-:

  Creating a new record in a table

In this project, you will review a database created for the computer science department of a local college. They would like your assistance in using Access to keep track of which employees have borrowed items from the department

  Indicate the important water quality constituents

A particular wastewater stream has dissolved oxygen (DO) concentration of 2.0 mg / L and a discharge rate of 0.5 m3 / s. The river into which it is being discharged has DO equal to 8.3 mg / L, a flow rate of 4.35 m3 / s and a temperature of 20 °C...

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd