Question

PROGRAM 1: Consider a class ScienceFairProjectRating that will be used to help judge a science fair project. It will use the

0 0
Add a comment Improve this question Transcribed image text
Answer #1

import java.util.*;

public class ScienceFairProjectRating

{

public int numjudge(string nmproject,int ratingability,int ratingthoughtness,int ratingtechnicalskill,int ratingcharity)

{

if(ratingability<=30 && ratingthoughtness<=30 &&ratingthoughness<=15 && ratingtechnicalskill<=15 && ratingcharity<=10)

{

totalrating=ratingability+ratingthoughtness+ratingthoughness+ ratingtechnicalskill+ratingcharity;

return totalrating;

}

}

}

public class RatingScore

{

public static void main (String[] args)

{

String nmproject, id,nmperson;

int ratingability,ratingscience, ratingthoughness , ratingtechnicalskill ,ratingcharity,totalrating;

Scanner in =new Scanner(system.in);

system.out.print("Enter name of project");

String nmproject=in.next();

system.out.print("Enter name of person");

String nmproject=in.next();

system.out.print("Enter ratingability");

String nmproject=in.nextInt();

system.out.print("Enter ratingscience");

String nmproject=in.nextInt();

system.out.print("Enter ratingthoughness");

String nmproject=in.nextInt();

system.out.print("Enter ratingtechnicalskill ");

String nmproject=in.nextInt();

system.out.print("Enter ratingcharity");

String nmproject=in.nextInt();

ScienceFairProjectRating obj=new  ScienceFairProjectRating();

obj.numjudge(nmproject,ratingability,ratingthoughtness, ratingtechnicalskill,ratingcharity)

}

}

Add a comment
Know the answer?
Add Answer to:
PROGRAM 1: Consider a class ScienceFairProjectRating that will be used to help judge a science fair...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Consider a class that could be used to play a game of hangman. The class has...

    Consider a class that could be used to play a game of hangman. The class has the following attributes: The secret word. The disguised word, in which each unknown letter in the secret word is replaced with a question mark (?). For example, if the secret word is abracadabra and the letters a, b, and e have been guessed, the disguised word would be ab?a?a?ab?a. The number of guesses made. The number of incorrect guesses. It will have the following...

  • COSC 1437 C++2 Project Assignment 3 Description: Computer Science Department is evaluating its professors to see...

    COSC 1437 C++2 Project Assignment 3 Description: Computer Science Department is evaluating its professors to see which professor has the highest rating according to student input. You will create a ProfessorRating class consisting of professor Name and three ratings. The three ratings are used to evaluate easiness, helpfulness, and clarity. The value for each rating is in the range of 1 to 5, with 1 being the lowest and 5 being the highest. Your program should contain the following functionalities:...

  • 1. Do the following a. Write a class Student that has the following attributes: - name:...

    1. Do the following a. Write a class Student that has the following attributes: - name: String, the student's name ("Last, First" format) - enrollment date (a Date object) The Student class provides a constructor that saves the student's name and enrollment date. Student(String name, Date whenEnrolled) The Student class provides accessors for the name and enrollment date. Make sure the class is immutable. Be careful with that Date field -- remember what to do when sharing mutable instance variables...

  • Create a new project in BlueJ and name it LastName-lab8-appstore, e.g., Smith-lab8-appstore. If your App class from Lab 4 is fully functional, copy it into the project. (You can drag a file from File...

    Create a new project in BlueJ and name it LastName-lab8-appstore, e.g., Smith-lab8-appstore. If your App class from Lab 4 is fully functional, copy it into the project. (You can drag a file from File Explorer onto the BlueJ project window.) Otherwise, use the instructor's App class: Create a new class using the "New Class..." button and name it App. Open the App class to edit the source code. Select and delete all the source code so that the file is...

  • Question 1 (24 Marks] 1. (4 marks) Write an immutable Person class in Java which provides...

    Question 1 (24 Marks] 1. (4 marks) Write an immutable Person class in Java which provides the following. • Two attributes: lastName and first Name of type String. • Appropriate initialization, accessors/mutator methods. 2. (6 marks) Write a Student class that is a subclass of Person class (in the previous question) which provides the following. • Two attributes: A unique student ID of type String and GPA of type float; the student ID is initialized when a Student object gets...

  • Please help. I need a very simple code. For a CS 1 class. Write a program...

    Please help. I need a very simple code. For a CS 1 class. Write a program in Java and run it in BlueJ according to the following specifications: The program reads a text file with student records (first name, last name and grade). Then it prompts the user to enter a command, executes the command and loops. The commands are the following: "printall" - prints all student records (first name, last name, grade). "firstname name" - prints all students with...

  • please help with program,these are he requirements: I am also getting a "missing return statement" in...

    please help with program,these are he requirements: I am also getting a "missing return statement" in my milestone class Create a new class Milestone which contains at least an event description, a planned completion date, and an actual completion date (which will be unset when the milestone is created). There should be a method to changed the planned completion date as well as a method to designate the Milestone as achieved. Add a method that returns whether the milestone has...

  • How can help me to create this program? PartADriver public class PartADriver {    public static...

    How can help me to create this program? PartADriver public class PartADriver {    public static void main (String [] args)    { // create two martians Martian m1 = new Martian(); Martian m2 = new Martian("Grey", 3); // display both martians Output.showMessage("After instantiation.\n" + "Martian #1: " + m1.toString() + "\nMartian #2: " + m2.toString()); // make the first martian speak 3 times for (int count = 0; count < 3; count++)    m1.speak(); // make the second martian...

  • Java 1. Develop a program to emulate a purchase transaction at a retail store. This program...

    Java 1. Develop a program to emulate a purchase transaction at a retail store. This program will have two classes, a LineItem class and a Transaction class. The LineItem class will represent an individual line item of merchandise that a customer is purchasing. The Transaction class will combine several LineItem objects and calculate an overall total price for the line item within the transaction. There will also be two test classes, one for the LineItem class and one for the...

  • I need help with this Mammal: public class Mammal extends Pet{     String Vaccin...

    I need help with this Mammal: public class Mammal extends Pet{     String Vaccination="";     public Mammal(String name, String parent, String species, String birthday, String Vaccination) {           //Accessing the super class Constructor and setting the variables.         super(name,parent,species, birthday);         this.Vaccination=Vaccination;     } // end Mammal     public String getVaccination() {         return Vaccination;     } // end getVaccination     public void setVaccination(String Vaccination) {         this.Vaccination = Vaccination;     } // end setVaccination     @Override     public String toString() {         return super.toString()+". This Mammal requires following vaccinations "+ Vaccination;     } // end...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT