AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |
Back to Blog
![]() Specify the hash parameters KeySpec spec = new PBEKeySpec( password. Generate a random cryptographic salt SecureRandom random = new SecureRandom() Use the following code snippet to as a template for computing the hash given a password string: We will store the salted password hash and the salt itself to avoid storing passwords in plain text. Usernames and passwords are checked case-insensitively. It should return an error if negative, or if the username already exists. It creates a new user account with the initial balance. (see the method stubs in the starter code for full specification as to what error message to return, etc):Ĭreate takes in a new username, password, and initial account balance as input. The following are the functional specifications for the flight service system, to be implemented in Query.java Reservations: A booking for an itinerary, which may consist of one (direct) or two (one-hop) flights.Įach reservation can either be paid or unpaid, cancelled or not, and has a unique ID.Ĭreate other tables or indexes you need for this assignment in createTables.sql (see below). Itineraries are returned by the search command. Itineraries: An itinerary is either a direct flight (consisting of one flight: origin -> destination) orĪ one-hop flight (consisting of two flights: origin -> stopover city, stopover city -> destination). You can assume that all usernames and passwords have at most 20 characters. Since we are salting and hashing our passwords through the Java application, passwords are case sensitive. Usernames are case insensitive (this is the default for SQL Server). Each user can have any number of reservations. Users: A user has a username ( varchar), password ( varbinary), and balance ( int) in their account.Īll usernames should be unique in the system. It is up to you to decide what entities to store persistently and create a physical schema design that has the ability to run the operations below,įlights / Carriers / Months / Weekdays: modeled the same way as HW3.įor this application, we have very limited functionality so you shouldn't need to modify the schema from HW3 nor add any new table to reason about the data. These entities are not necessarily database tables. The flight service system consists of the following logical entities. *** Please enter one of the following commands *** Every query to the Flights tables from your database will be redirected to a faster class server. To improve performance and make sure you don't alter the flights data, reference the Flights tables as EXTERNAL TABLEs. You will need to access your Flights database on SQL Azure from HW3.Īlternatively, you may create a new database and define the Flights data as follows. ![]() ![]() Connect your application to your database ![]() In real life, you would develop a web-based interface instead of a CLI, but we use a CLI to simplify this homework.įor this lab, you can use any of the classes from the Java 11 standard JDK. We have already provided code for a UI ( FlightService.java) and partial backend ( Query.java).įor this homework, your task is to implement the rest of the backend. You will also be writing a few test cases and explaining your design in a short writeup. Complete a working prototype of your flight booking application that connects to the database (in Azure) then allows customers to use a CLI to search, book, cancel, etc.Design a database of your customers and the flights they book.In this homework, you have two main tasks: There is a lot of valuable information here, and some implementation details depend on others.Ĭongratulations, you are opening your own flight booking service! Read through this whole section before starting this project. It should take SIGNIFICANTLY more time than your previous 344 assignments. ![]() This hw requires writing a non-trivial amount of Java codes (our solution is about 800 lines) and test cases. Instructions assume you are on the Linux lab machines, attu, or home VM.
0 Comments
Read More
Leave a Reply. |