Answered step by step
Verified Expert Solution
Question
1 Approved Answer
MAKE SURE YOU USE CONDITIONALS FOR 1.A AND WHILE LOOPS FOR 1.B. IF YOU DON'T, IT WILL BE FLAGGED FOR REVIEW. Make sure you input
MAKE SURE YOU USE CONDITIONALS FOR 1.A AND WHILE LOOPS FOR 1.B. IF YOU DON'T, IT WILL BE FLAGGED FOR REVIEW.
Make sure you input comments and formatting, please. These are must Use conditionals for 1.A and while loops for 1.B, please. These are must Answer both 1 . A and 1. B and incorrect answers or incomplete work will be flagg 1A. for a review. Write a Java program that prompts the user to enter in two countries. The program then prints out which country has more letters or if they have the same number of letters, the first character of both countries, and if the countries entered are the same. Test the program with two sets of data (one showing the cities have different number of characters and one showing that they have the same number of letters) The program works as follows: Enter two cities: Halifax Bedford Halifax and Bedford have the same number of letters The first character of Halifax is H. The first character of Bedford is B Halifax and Bedford are not the same city. 1.B Write a complete program that will use a Scanner to ask for the total marks for your tests, assignments and labs each as a percentage (out of 100). If the lab mark is higher than the assignments the lab mark is omitted and the tests are weighted at 60% and the assignments at 40%. Otherwise the tests are weighted at 50% the assignments at 40% and the labs at 10%. The program then computes and prints your final grade as a letter. If you get 80% or higher the letter grade is an A, 70 or higher is a B, 60 or higher a C, 50 or higher a D and less than 50 a F. Test the program with two sets of data and include the results in this report that show both outcomes for the final grade calculation (with two different letter grades)Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started