SophiaPretty

(5)

$14/per page/Negotiable

About SophiaPretty

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Accounting,Algebra See all
Accounting,Algebra,Applied Sciences,Architecture and Design,Art & Design,Biology,Business & Finance,Calculus,Chemistry,Communications,Computer Science,Economics,Engineering,English,Environmental science,Essay writing Hide all
Teaching Since: Jul 2017
Last Sign in: 304 Weeks Ago, 1 Day Ago
Questions Answered: 15833
Tutorials Posted: 15827

Education

  • MBA,PHD, Juris Doctor
    Strayer,Devery,Harvard University
    Mar-1995 - Mar-2002

Experience

  • Manager Planning
    WalMart
    Mar-2001 - Feb-2009

Category > Engineering Posted 11 Oct 2017 My Price 10.00

Please help me with creating a program of the attached documents. Please help

 

Course Code

Type Course Code Here

Description

Computer Programming 2

College / Department:

Online Education

Laboratory

Exercise No.

008

LABORATORY EXERCISE

Page 1 of 4

 

Instructions:

·   Upload your solution to the link provided on the course page.

 

·   Create one NetBeans project for the 2 problems below.  The project name should be               Project Name:  Lab8_<lastname_firstname>

          Example:       Lab8_Blanco_Maria

 

·         Compress theNetBeans project into .rar or .zip format.  

 

·         The class names to be created are specified in each problem. 

 

·         There should only be one main class (the class that contains the main method) where the implementation of the 2 problems will be done.  Name it as Lab8Main.  Follow the project structure below.

 

 

 

·   Only NetBeans project compressed in .rar or .zip format will be accepted.

 

 

1. Extending StudentRecord

 

Class Names:     Lab8Main (main class)

StudentRecord

                ComputerScienceStudentRecord

 

The StudentRecord class is given for your reference.  The following are your tasks:

1)      Overload the StudentRecord constructor with one that accepts 4 parameters namely the name, mathGrade, englishGrade and scienceGrade.

 

2)      Create a class that will inherit the attributes and methods of theStudentRecord class and name it ComputerScienceStudentRecord.  Use the extends keyword for inheritance.

 

 

 

 

3)      The  ComputerScienceStudentRecord class will only have a comprogGrade attribute of double data type.  Its constructor should accept 5 parameters namely the name, mathGrade, englishGrade, scienceGrade and comprogGrade.

 

4)      Inside the ComputerScienceStudentRecord constructor, use the super keyword to call on the constructor of the StudentRecord and be able to assign the first 4 parameters.  The value of the last parameter will be assigned to comprogGrade.

 

5)      Override the computeAverageGrade method of the StudentRecord class in the ComputerScienceStudentRecord class.  The result should be the average grade from the 4 subjects, Math, English, Science and Computer Programming.

 

6)      Create a class that would contain the main method and name it Lab8Main.  In the main method, instantiate a ComputerScienceStudentRecord object that has 5 parameters.   The sample output is shown below.

 

public class StudentRecord {

//these are the attributes

private String name;

private double mathGrade;

private double englishGrade;

private double scienceGrade;

 

//this is the constructor

publicStudentRecord(){

        this.name="";

this.mathGrade=0;

this.englishGrade=0;

this.scienceGrade=0;

    }  

 

Course Code

Type Course Code Here

Description

Computer Programming 2

College / Department:

Online Education

Laboratory

Exercise No.

008

LABORATORY EXERCISE

Page 2 of 4

 

//these are the mutators and accessors

public String getName() {

return name;

    }

 

public void setName(String name) {

        this.name = name;

    }

 

public double getMathGrade() {

returnmathGrade;

    }

 

public void setMathGrade(double mathGrade) {

this.mathGrade = mathGrade;

    }

 

public double getEnglishGrade() {

returnenglishGrade;

    }

 

public void setEnglishGrade(double englishGrade) {

this.englishGrade = englishGrade;

    }

 

public double getScienceGrade() {

returnscienceGrade;

    }

public void setScienceGrade(double scienceGrade) {

this.scienceGrade = scienceGrade;

    }

 

    //custom method

public double computeAverageGrade(){

return (this.mathGrade + this.englishGrade + this.scienceGrade)/3;

    }

 

}

 

 

Course Code

Type Course Code Here

Description

Computer Programming 2

College / Department:

Online Education

Laboratory

Exercise No.

008

LABORATORY EXERCISE

Page 3 of 4

 

 

Sample Output:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Course Code

Type Course Code Here

Description

Computer Programming 2

College / Department:

Online Education

Laboratory

Exercise No.

008

LABORATORY EXERCISE

Page 4 of 4

2. The Shape Abstract Class

 

Classes Names: Lab8Main (main class)

Shape

                                Circle

                                Square

 

Create an abstract class called Shape with abstract methods getArea() and getName(). Write two of its subclasses Circle and Square.  Override these methods in the Circle and Square classes.  In the main method (LabExercise8 class), instantiate an object of the Circle class of radius 4 units, and an object of the Square class of side 5 units.  The sample output is shown for your reference.

 

Sample Output:

Attachments:

Answers

(5)
Status NEW Posted 11 Oct 2017 01:10 PM My Price 10.00

-----------  ----------- H-----------ell-----------o S-----------ir/-----------Mad-----------am ----------- Th-----------ank----------- yo-----------u f-----------or -----------you-----------r i-----------nte-----------res-----------t a-----------nd -----------buy-----------ing----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n. -----------Ple-----------ase----------- pi-----------ng -----------me -----------on -----------cha-----------t I----------- am----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I w-----------ill----------- be----------- qu-----------ick-----------ly

Not Rated(0)