Answer:
Option (C) is the correct option to the following question.
Explanation:
The following option is correct because the unit testing is the process of testing a single unit of software at a time, which means the testing of each and every program separately.
In simple words, Unit testing a process of testing in which the developer executes the single method or a function, statements or loop in the program of the software to checking is it working fine or not.
Answer:
Customer Table
- Customer name
- Customer id
Product Table
- Product id/number (primary key, auto increment)
- Product name
- Product sale price
Transactions Table
- Transaction Id
- Customer Id
- Product id
- Quantity
- Price
- Date
Explanation:
Natalie wants to fetch following information from database
- Look up customer name and sale price
- Sort items in db by product number
To lookup customer name and sale price perform a join on Transactions table and Customer table.Assuming database is build in mysql the query to fetch required results would be
select transction.productId,transaction.customerid,customer.customername from transactions join customer ON
customer.customerid=transcation.customerid
where productid="user provided product id of returned product"
For sorting products by number set produc number in product table a auto increment primary key
Answer:
Answered below
Explanation:
aFile = open("books.txt", "r")
This code uses the function open() which takes two parameters. The first parameter is the file name while the second parameter is the mode in which you are accessing the file.
The "r" mode opens the file in a reading state. That is, you can only read from the file. This code completes the reading process
aFile.read( )
The "w" mode opens the file so you can write to it and make changes.
The "a" mode opens the file so you can add contents to it.