Write a Java program that displays the following picture. (Hint: Write a sequence of println statements that display lines of asterisks and blanks.)
Want to see the full answer?
Check out a sample textbook solutionChapter 1 Solutions
Java: An Introduction to Problem Solving and Programming (7th Edition)
Additional Engineering Textbook Solutions
C++ How to Program (10th Edition)
Starting Out with Java: Early Objects (6th Edition)
Starting Out with Java: From Control Structures through Objects (7th Edition) (What's New in Computer Science)
Starting Out with Java: From Control Structures through Objects (6th Edition)
Objects First with Java: A Practical Introduction Using BlueJ (6th Edition)
Differential Equations: Computing and Modeling (5th Edition), Edwards, Penney & Calvis
- Mailings Review View ell me what you want t Help Design Layout References imes New Romar - 12 A A Aa v ab 、三 B IU abs X, x A Paragraph Font Objective(s): You are required to write a program in JAVA based on the problem description given. Read the problem description and examine the sample of output; then study the program design given. Using the problem-solving tips as a guide, write a complete program with necessary useful comment for good documentation. Compile and execute the program. Learning Outcome(s): 1. To introduce business problem specification/requirement and translates into JAVA codes. 2. To practice writing simple application of deploying object-oriented programming concept using JAVA. DESCRIPTION OF PROBLEM: Write a program contained a class Student which has firstName, lastName, mark, grade. The class allows object instance to assign firstName, lastName and mark from input user and perform and assign grade based on mark's criteria displayed below. SAMPLE OF OUTPUT: Enter…arrow_forwardSolve with Java languagearrow_forwardPlease solve this problem in java languagearrow_forward
- Java Program Write expressions that simulates rolling of two 6 sided dice three times and display results. (sample output below, random numbers generated from your program will be different ) Roll 1: 2 and 3 Roll 2: 3 and 6 Roll 3: 6 and 6arrow_forwardSubject: Java Programmingarrow_forwardPlease help me with this question below using javaarrow_forward
- Fill the box with the correct answerarrow_forwardIn JAVA ASSIGNMENT DESCRIPTION: A half-life is the amount of time it takes for a substance or entity to fall to half its original value. Caffeine has a half-life of about 6 hours in humans. Given caffeine amount (in mg) as input, output the caffeine level after 6, 12, and 24 hours. Output each floating-point value with two digits after the decimal point, which can be achieved as follows:System.out.printf("After 6 hours: %.2f mg\n", yourValue); Ex: If the input is: 100 the output is: After 6 hours: 50.00 mg After 12 hours: 25.00 mg After 24 hours: 6.25 mg Note: A cup of coffee has about 100 mg. A soda has about 40 mg. An "energy" drink (a misnomer) has between 100 mg and 200 mg. THE CODE I HAVE SO FAR: import java.util.Scanner; public class LabProgram { public static void main(String[] args) { Scanner scnr = new Scanner(System.in); double caffeineMg; // "double" supports floating-point like 75.5, versus int for integers like 75. caffeineMg = scnr.nextDouble(); System.out.printf("After…arrow_forwardMust be in JAVA. Please show in simplest form and with comments.arrow_forward
- Any help with this first problem would be really helpful! Thank you so much!! 1. Write the following exercises using Java code. Add comments explaining what your code is doing: Prompt the user to enter any full name (first middle surname). Do not bother with surnames like O'Reilly, Van Helsing, de Ville etc. Then output the following: the length of the full name. the length of the middle name. the three initials of the name. the name in all upper case. Example OutputEnter a first name middle name and surnamePeggy Sue PalmerLength of your name: 16 charactersLength of your middle name: 3 charactersYour initials are PSPPEGGY SUE PALMER -Write a program that generates two random integers, both in the range 50 to 100, inclusive. Use the Math class. Print both integers and then display the positive difference between the two integers, but use a selection. Do not use the absolute value method of the Math class. -Duke Shirts sells Java t-shirts for $24.95 each, but discounts are…arrow_forwardLanguage: JAVAarrow_forwardJava Programmingarrow_forward
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education