Software Development 1

IndulgentPelican avatar
IndulgentPelican
·
·
Download

Start Quiz

Study Flashcards

19 Questions

What is the correct syntax for checking if the number of overtime hours exceeds 10?

if (overtime > 10) {

What message will be printed if both users are not feeling great in the given scenario?

looks like neither of us is great

What is the correct way to calculate tax based on deposits according to the given scenario? double balance = Console.getDouble(“Balance £ ”); double deposits = Console.getDouble(“Deposits £ ”); double withdrawals = Console.getDouble(“Withdrawals £ ”); double tax = 0.0;

tax = (deposits - 1000) / 100 * 0.5;

What is the correct syntax for checking the cost and calculating fees based on the given scenario?

if (cost > 12000) {

What does SCM stand for?

Source Code Management

What is Github?

A cloud-based web application for storing Git repositories and sharing with other developers

What loop variation is recommended when the number of loop executions is known in advance?

Counter controlled variation

What does GitLab provide as an alternative to Github?

A platform for collaboration and version control

What is the purpose of a while-loop?

To execute a sequence of instructions multiple times

What is the correct way to calculate architect's fee based on the cost of the building?

Both a and b

What is the purpose of the 'if' statement in programming?

To execute code only when a boolean condition is true

In the given code, what is the purpose of the 'if' statement?

int rentalDays = Console.getInt(“Number of rental days: ”);

// Calculate the cost when each day costs £55 double cost = rentalDays * 55.0; // check if discount due if (rentalDays >= 7) { double discount = cost / 100 * 25; cost = cost – discount; } System.out.println(“Rental Cost £ “ + String.format(”%.2f”,cost));

To check if a discount is due based on the number of rental days

What does the 'if-else' statement allow in programming?

Execution of one of two code blocks depending on a boolean condition

In the given code, what is the purpose of the 'if-else' statement? double SRATE = 10.0, ORATE = 15.0; int standard = Console.getInt(“Number of standard hours: ”); int overtime = Console.getInt(“Number of overtime hours: ”); double wages = standard * SRATE; // calculate standard wages // calculate overtime (only allowed up to 10 hours overtime)if (overtime > 10) { wages = wages + (10 * ORATE); } else { wages = wages + (overtime * ORATE);

To calculate the wages based on standard and overtime hours

What is the purpose of the 'discount' variable in the given code?

To store the amount of discount applied to the rental cost

What is the purpose of the 'else' block in the 'if-else' statement?

To execute code when the boolean condition is false

What does the 'if' statement do if the boolean condition is false and there is no 'else' block?

It does nothing and the program continues to the next statement

What is the purpose of the 'cost' variable in the given code?

To store the total rental cost

What is the purpose of the 'wages' variable in the given code?

To store the hourly wages

Test your knowledge of software development with this quiz covering selection and repetition statements, programming constructs, algorithms, and source code management systems. Perfect for revision and consolidation of learning outcomes from the COM136 – Software Development 1 course.

Make Your Own Quizzes and Flashcards

Convert your notes into interactive study material.

Get started for free

More Quizzes Like This

Use Quizgecko on...
Browser
Browser